mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 12:12:34 -04:00
Core/Script: Use DoMeleeAttackIfReady in default ScriptedAI::UpdateAI method (fixes offhand attacks if not UpdateAI is overridden)
This commit is contained in:
@@ -114,15 +114,7 @@ void ScriptedAI::UpdateAI(uint32 const /*diff*/)
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
//If we are within range melee the target
|
||||
if (me->IsWithinMeleeRange(me->getVictim()))
|
||||
{
|
||||
me->AttackerStateUpdate(me->getVictim());
|
||||
me->resetAttackTimer();
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void ScriptedAI::DoStartMovement(Unit* victim, float distance, float angle)
|
||||
|
||||
Reference in New Issue
Block a user