Core/AI: Implemented functionality for _isCombatMovementAllowed in ScriptedAI, only when AttackStart is called.

This commit is contained in:
m7nu3l
2013-02-03 14:46:17 -03:00
parent 118c1d8c2c
commit 124b5ed6e7
2 changed files with 16 additions and 1 deletions

View File

@@ -108,6 +108,14 @@ void ScriptedAI::AttackStartNoMove(Unit* who)
DoStartNoMovement(who);
}
void ScriptedAI::AttackStart(Unit* who)
{
if (IsCombatMovementAllowed())
CreatureAI::AttackStart(who);
else
AttackStartNoMove(who);
}
void ScriptedAI::UpdateAI(uint32 const /*diff*/)
{
//Check if we have a current target