From c9874ee715480b41881704d40cc26f72562d5836 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 14 Mar 2009 09:20:23 -0600 Subject: *Fix the bug that possessed creature cannot melee. --HG-- branch : trunk --- src/game/NullCreatureAI.cpp | 5 +++++ src/game/NullCreatureAI.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/game/NullCreatureAI.cpp b/src/game/NullCreatureAI.cpp index 1bb787b25c3..8bea03d0216 100644 --- a/src/game/NullCreatureAI.cpp +++ b/src/game/NullCreatureAI.cpp @@ -27,6 +27,11 @@ void PassiveAI::UpdateAI(const uint32) EnterEvadeMode(); } +void PossessedAI::AttackStart(Unit *target) +{ + me->Attack(target, true); +} + void PossessedAI::UpdateAI(const uint32 diff) { if(me->getVictim()) diff --git a/src/game/NullCreatureAI.h b/src/game/NullCreatureAI.h index b64bf43ce5f..d20d727690a 100644 --- a/src/game/NullCreatureAI.h +++ b/src/game/NullCreatureAI.h @@ -41,6 +41,7 @@ class TRINITY_DLL_DECL PossessedAI : public PassiveAI public: PossessedAI(Creature *c) : PassiveAI(c) {} + void AttackStart(Unit *target); void UpdateAI(const uint32); void EnterEvadeMode() {} -- cgit v1.2.3