mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 15:01:38 -04:00
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:
@@ -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