*Some tweaks to Razorscale's flight behavior, and a little cleanup.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-18 23:19:03 -08:00
parent 2878b4e701
commit 13d954cc88
2 changed files with 13 additions and 13 deletions
@@ -342,11 +342,11 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiTotal_scourge = ENCOUNTER_TOTAL_SCOURGE;
uiSummon_counter = 0;
uiAnti_magic_zone = 1000 + rand()%5000;
uiDeath_strike = 5000 + rand()%5000;
uiDeath_embrace = 5000 + rand()%5000;
uiIcy_touch = 5000 + rand()%5000;
uiUnholy_blight = 5000 + rand()%5000;
uiAnti_magic_zone = urand(1000,6000);
uiDeath_strike = urand(5000,10000);
uiDeath_embrace = urand(5000,10000);
uiIcy_touch = urand(5000,10000);
uiUnholy_blight = urand(5000,10000);
uiFight_speech = 15000;
uiSpawncheck = 1000;
@@ -463,7 +463,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
void WaypointReached(uint32 i)
{
switch(i)
switch (i)
{
case 0:
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -585,7 +585,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
if (uiPhase_timer <= diff)
{
// ******* Before battle *****************************************************************
switch(uiStep)
switch (uiStep)
{
case 0: // countdown
//UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 1);
@@ -1360,7 +1360,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
} else uiTargetcheck -= diff;
// Battle end
if (uiFight_duration < diff + 5000)
if (uiFight_duration <= diff + 5000)
{
if (!uiTirionGUID)
if (Unit* pTemp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].x, LightofDawnLoc[0].y, LightofDawnLoc[0].z, 1.528, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
@@ -270,15 +270,16 @@ 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
{
if (m_creature->GetPositionZ() > FlightHeight) // Correct height, stop moving
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
else // Incorrect height
{
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
// TODO: Move faster while flying
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
m_creature->GetMotionMaster()->MovePoint(0, x, y, FlightHeight + 0.5f); // Fly to slightly above (x, y, FlightHeight)
}
}
@@ -287,10 +288,9 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
const float CurrentGroundLevel = m_creature->GetBaseMap()->GetHeight(m_creature->GetPositionX(), m_creature->GetPositionY(), MAX_HEIGHT);
//if (StunTimer == 30000) // Only fly around if not stunned.
//{
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
if (IsFlying && m_creature->GetPositionZ() > CurrentGroundLevel) // Fly towards the ground
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), CurrentGroundLevel);
// TODO: Move faster while flying
// TODO: Swoop up just before landing
else
IsFlying = false; // Landed, no longer flying