*Check reactstate in UpdateVictim.
--HG-- branch : trunk
This commit is contained in:
@@ -202,7 +202,7 @@ struct TRINITY_DLL_DECL boss_gothikAI : public BossAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(!UpdateVictimByReact() || !CheckInRoom())
|
if(!UpdateVictim() || !CheckInRoom())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_nothAI : public BossAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(!UpdateVictimByReact() || !CheckInRoom())
|
if(!UpdateVictim() || !CheckInRoom())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
|
|||||||
if(!phase)
|
if(!phase)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!UpdateVictimByReact() || !CheckInRoom())
|
if(!UpdateVictim() || !CheckInRoom())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|||||||
+2
-11
@@ -134,12 +134,12 @@ bool CreatureAI::UpdateVictimWithGaze()
|
|||||||
return me->getVictim();
|
return me->getVictim();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreatureAI::UpdateVictimByReact()
|
bool CreatureAI::UpdateVictim()
|
||||||
{
|
{
|
||||||
if(!me->isInCombat())
|
if(!me->isInCombat())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(me->HasReactState(REACT_AGGRESSIVE))
|
if(!me->HasReactState(REACT_PASSIVE))
|
||||||
{
|
{
|
||||||
if(Unit *victim = me->SelectVictim())
|
if(Unit *victim = me->SelectVictim())
|
||||||
AttackStart(victim);
|
AttackStart(victim);
|
||||||
@@ -154,15 +154,6 @@ bool CreatureAI::UpdateVictimByReact()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreatureAI::UpdateVictim()
|
|
||||||
{
|
|
||||||
if(!me->isInCombat())
|
|
||||||
return false;
|
|
||||||
if(Unit *victim = me->SelectVictim())
|
|
||||||
AttackStart(victim);
|
|
||||||
return me->getVictim();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CreatureAI::_EnterEvadeMode()
|
bool CreatureAI::_EnterEvadeMode()
|
||||||
{
|
{
|
||||||
if(me->IsInEvadeMode() || !me->isAlive())
|
if(me->IsInEvadeMode() || !me->isAlive())
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
|
|||||||
Creature * const m_creature;
|
Creature * const m_creature;
|
||||||
|
|
||||||
bool UpdateVictim();
|
bool UpdateVictim();
|
||||||
bool UpdateVictimByReact();
|
|
||||||
bool UpdateVictimWithGaze();
|
bool UpdateVictimWithGaze();
|
||||||
|
|
||||||
void SelectNearestTarget(Unit *who);
|
void SelectNearestTarget(Unit *who);
|
||||||
|
|||||||
Reference in New Issue
Block a user