Core/Creatures: Moved autoattack handling from scripts to game
Port From (https://github.com/TrinityCore/TrinityCore/commit/605e5f94c0d71cad8e83fa5a07eaec4e6bed9cc3)
This commit is contained in:
@@ -11,7 +11,8 @@ namespace Game.AI
|
||||
{
|
||||
public PassiveAI(Creature creature) : base(creature)
|
||||
{
|
||||
creature.SetReactState(ReactStates.Passive);
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
me.SetCanMelee(false);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
@@ -43,8 +44,6 @@ namespace Game.AI
|
||||
{
|
||||
if (!me.IsValidAttackTarget(me.GetVictim()))
|
||||
me.AttackStop();
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user