*Still use the old updatevictim functions for most scripts because some old scripts may cause crash using new function.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-05 14:37:15 -05:00
parent 13fd9ea601
commit 5aa9fdb556
5 changed files with 14 additions and 3 deletions
+10
View File
@@ -145,6 +145,16 @@ bool CreatureAI::UpdateVictimWithGaze()
}
bool CreatureAI::UpdateVictim()
{
if(!me->isInCombat())
return false;
if(Unit *victim = me->SelectVictim())
AttackStart(victim);
return me->getVictim();
}
bool CreatureAI::UpdateCombatState()
{
if(!me->isInCombat())
return false;
+1
View File
@@ -72,6 +72,7 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
bool UpdateVictim();
bool UpdateVictimWithGaze();
bool UpdateCombatState();
void SelectNearestTarget(Unit *who);
public: