mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[11109] Move DoMeleeAttackIfReady to CreatureAI and reuse more wide.
This commit is contained in:
parent
d1007e49ca
commit
caf9f0cae2
8 changed files with 28 additions and 45 deletions
|
|
@ -113,14 +113,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/)
|
|||
|
||||
i_victimGuid = m_creature->getVictim()->GetGUID();
|
||||
|
||||
if (m_creature->isAttackReady())
|
||||
{
|
||||
if (m_creature->CanReachWithMeleeAttack(m_creature->getVictim()))
|
||||
{
|
||||
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
||||
m_creature->resetAttackTimer();
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool GuardAI::IsVisible(Unit *pl) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue