mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Creatures: Moved autoattack handling from scripts to game
This commit is contained in:
@@ -283,21 +283,13 @@ void SmartAI::UpdateAI(uint32 diff)
|
||||
|
||||
CheckConditions(diff);
|
||||
|
||||
bool hasVictim = UpdateVictim();
|
||||
UpdateVictim();
|
||||
|
||||
GetScript()->OnUpdate(diff);
|
||||
|
||||
UpdatePath(diff);
|
||||
UpdateFollow(diff);
|
||||
UpdateDespawn(diff);
|
||||
|
||||
if (!IsAIControlled())
|
||||
return;
|
||||
|
||||
if (!hasVictim)
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool SmartAI::IsEscortInvokerInRange()
|
||||
|
||||
Reference in New Issue
Block a user