Core/SAI: Make SMART_ACTION_SET_INGAME_PHASE_MASK set the phasemask of the target_type instead of always the source calling the action type.
This commit is contained in:
1 parent
1339d38d4c
commit
54b7162f1d
1 file changed
+12
-2
@@ -1046,8 +1046,18 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_SET_INGAME_PHASE_MASK:
|
||||
{
|
||||
if (WorldObject* baseObj = GetBaseObject())
|
||||
baseObj->SetPhaseMask(e.action.ingamePhaseMask.mask, true);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (!IsUnit(*itr))
|
||||
continue;
|
||||
|
||||
(*itr)->ToUnit()->SetPhaseMask(e.action.ingamePhaseMask.mask, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user