mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[11460] Use ObjectGuids in last missing cases in AI classes.
This commit is contained in:
parent
44f2c26389
commit
b4f2e3d1a0
13 changed files with 38 additions and 34 deletions
|
|
@ -37,7 +37,7 @@ AggressorAI::Permissible(const Creature *creature)
|
|||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
AggressorAI::AggressorAI(Creature *c) : CreatureAI(c), i_victimGuid(0), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK)
|
||||
AggressorAI::AggressorAI(Creature *c) : CreatureAI(c), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ void AggressorAI::EnterEvadeMode()
|
|||
if (!m_creature->isAlive())
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, he is dead [guid=%u]", m_creature->GetGUIDLow());
|
||||
i_victimGuid = 0;
|
||||
i_victimGuid.Clear();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->DeleteThreatList();
|
||||
return;
|
||||
|
|
@ -114,7 +114,7 @@ void AggressorAI::EnterEvadeMode()
|
|||
}
|
||||
|
||||
m_creature->DeleteThreatList();
|
||||
i_victimGuid = 0;
|
||||
i_victimGuid.Clear();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ AggressorAI::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();
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ AggressorAI::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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue