diff options
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 61d546ef17d..2c7e93cb0af 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -70,7 +70,7 @@ void SmartAI::StartPath(bool run/* = false*/, uint32 pathId/* = 0*/, bool repeat if (invoker && invoker->GetTypeId() == TYPEID_PLAYER) { _escortNPCFlags = me->m_unitData->NpcFlags[0]; - me->SetNpcFlags((NPCFlags)0); + me->ReplaceAllNpcFlags((NPCFlags)0); } me->GetMotionMaster()->MovePath(_path, _repeatWaypointPath); @@ -194,7 +194,7 @@ void SmartAI::EndPath(bool fail) if (_escortNPCFlags) { - me->SetNpcFlags((NPCFlags)_escortNPCFlags); + me->ReplaceAllNpcFlags((NPCFlags)_escortNPCFlags); _escortNPCFlags = 0; } diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index b7e78371973..b28edb29ef0 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1645,7 +1645,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { for (WorldObject* target : targets) if (IsCreature(target)) - target->ToUnit()->SetNpcFlags(NPCFlags(e.action.flag.flag)); + target->ToUnit()->ReplaceAllNpcFlags(NPCFlags(e.action.flag.flag)); break; } case SMART_ACTION_ADD_NPC_FLAG: |
