mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*code cleanup
*totally destroyed m_creature, use "me" for future coding --HG-- branch : trunk
This commit is contained in:
@@ -44,16 +44,16 @@ ReactorAI::MoveInLineOfSight(Unit *)
|
||||
void
|
||||
ReactorAI::UpdateAI(const uint32 /*time_diff*/)
|
||||
{
|
||||
// update i_victimGuid if m_creature->getVictim() !=0 and changed
|
||||
// update i_victimGuid if me->getVictim() !=0 and changed
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_creature->isAttackReady())
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
if (me->IsWithinMeleeRange(me->getVictim()))
|
||||
{
|
||||
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
||||
m_creature->resetAttackTimer();
|
||||
me->AttackerStateUpdate(me->getVictim());
|
||||
me->resetAttackTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user