Core/SmartAI: Allow SMART_ACTION_SET_ACTIVE to take a parameter for on/off (true/false). Required for upcoming EAI to SAI conversion (https://github.com/Discover-/EventAI-to-SmartAI)
This commit is contained in:
1 parent
5164caa9ff
commit
d87b0fff2f
2 files changed
+9
-4
No files matched your search
@@ -1133,13 +1133,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
case SMART_ACTION_SET_VISIBILITY:
|
||||
{
|
||||
if (me)
|
||||
me->SetVisible(e.action.visibility.state ? true : false);
|
||||
me->SetVisible(e.action.visibility.state);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_ACTIVE:
|
||||
{
|
||||
if (GetBaseObject())
|
||||
GetBaseObject()->setActive(true);
|
||||
if (WorldObject* baseObj = GetBaseObject())
|
||||
baseObj->setActive(e.action.active.state);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_ATTACK_START:
|
||||
|
||||
Reference in new issue
Block a user