*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:
@@ -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;
|
||||
|
||||
@@ -72,6 +72,7 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
|
||||
|
||||
bool UpdateVictim();
|
||||
bool UpdateVictimWithGaze();
|
||||
bool UpdateCombatState();
|
||||
|
||||
void SelectNearestTarget(Unit *who);
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user