feat(Core/Unit): NPCFlags helpers (#11286)
* cherry-pick commit (TrinityCore/TrinityCore@d611925) Co-Authored-By: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
parent
e2370446a5
commit
edb7cac19b
75 changed files with 293 additions and 285 deletions
|
|
@ -2167,7 +2167,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsCreature(*itr))
|
||||
(*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_FLAGS, e.action.flag.flag);
|
||||
(*itr)->ToUnit()->ReplaceAllNpcFlags(NPCFlags(e.action.flag.flag));
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
|
|
@ -2180,7 +2180,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsCreature(*itr))
|
||||
(*itr)->ToUnit()->SetFlag(UNIT_NPC_FLAGS, e.action.flag.flag);
|
||||
(*itr)->ToUnit()->SetNpcFlag(NPCFlags(e.action.flag.flag));
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
|
|
@ -2193,7 +2193,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsCreature(*itr))
|
||||
(*itr)->ToUnit()->RemoveFlag(UNIT_NPC_FLAGS, e.action.flag.flag);
|
||||
(*itr)->ToUnit()->RemoveNpcFlag(NPCFlags(e.action.flag.flag));
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue