*Instead of changing react states and using UpdateVictim (which causes Razorscale to start chasing and attacking the victim), just search for a possible victim. Only attack the victim during the ground phase.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-21 16:06:05 -08:00
parent dd9ed3912b
commit 79f8acbaf5

View File

@@ -107,7 +107,9 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
Unit *victim = me->SelectVictim();
if (victim == NULL)
return;
if(m_creature->GetPositionY() > -60 || m_creature->GetPositionX() < 450) // Not Blizzlike, anti-exploit to prevent players from pulling bosses to vehicles.
@@ -203,6 +205,8 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
} else FlameBuffetTimer -= diff;
}
if (me->getVictim() != victim && (Phase != 3 || FlameBuffetTimer <= 15000)) // Not sure about this.
AttackStart(victim);
DoMeleeAttackIfReady();
}
else if (Phase == 1) //Flying Phase
@@ -270,7 +274,6 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
m_creature->SetFlying(IsFlying);
m_creature->SendMovementFlagUpdate();
m_creature->SetReactState(IsFlying ? REACT_PASSIVE : REACT_AGGRESSIVE);
m_creature->SetSpeed(MOVE_WALK, IsFlying ? 7.0f : 2.5f, IsFlying);
if (Phase == 1) // Flying Phase