diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp index c477303ff..486cc3c58 100644 --- a/src/game/GuardAI.cpp +++ b/src/game/GuardAI.cpp @@ -30,7 +30,7 @@ int GuardAI::Permissible(const Creature *creature) return PERMIT_BASE_NO; } -GuardAI::GuardAI(Creature *c) : CreatureAI(c), i_victimGuid(0), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK) +GuardAI::GuardAI(Creature *c) : CreatureAI(c), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK) { } @@ -64,7 +64,7 @@ void GuardAI::EnterEvadeMode() i_state = STATE_NORMAL; - i_victimGuid = 0; + i_victimGuid.Clear(); m_creature->CombatStop(true); m_creature->DeleteThreatList(); return; @@ -95,7 +95,7 @@ void GuardAI::EnterEvadeMode() m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); - i_victimGuid = 0; + i_victimGuid.Clear(); m_creature->CombatStop(true); i_state = STATE_NORMAL; @@ -110,7 +110,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/) if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - i_victimGuid = m_creature->getVictim()->GetGUID(); + i_victimGuid = m_creature->getVictim()->GetObjectGuid(); DoMeleeAttackIfReady(); } @@ -128,7 +128,7 @@ void GuardAI::AttackStart(Unit *u) if(m_creature->Attack(u,true)) { - i_victimGuid = u->GetGUID(); + i_victimGuid = u->GetObjectGuid(); m_creature->AddThreat(u); m_creature->SetInCombatWith(u); u->SetInCombatWith(m_creature); diff --git a/src/game/GuardAI.h b/src/game/GuardAI.h index 1530d645d..b961994a0 100644 --- a/src/game/GuardAI.h +++ b/src/game/GuardAI.h @@ -20,6 +20,7 @@ #define MANGOS_GUARDAI_H #include "CreatureAI.h" +#include "ObjectGuid.h" #include "Timer.h" class Creature; @@ -46,7 +47,7 @@ class MANGOS_DLL_DECL GuardAI : public CreatureAI static int Permissible(const Creature *); private: - uint64 i_victimGuid; + ObjectGuid i_victimGuid; GuardState i_state; TimeTracker i_tracker; }; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a8ce501ce..e5464ed36 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11460" + #define REVISION_NR "11461" #endif // __REVISION_NR_H__