diff options
| author | maximius <none@none> | 2009-11-05 17:14:54 -0800 |
|---|---|---|
| committer | maximius <none@none> | 2009-11-05 17:14:54 -0800 |
| commit | c532e9a225908f48b5ebec11651aa894908b8aeb (patch) | |
| tree | 1f188c9b04fc7b6b14382a28aad7ddc48657f999 /src | |
| parent | 426ae1c35e9fc8ac66d85eaf18d1b6dc1bc11b81 (diff) | |
*Some tweaks to Razorscale's flight behavior.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 0ee5b099420..5df351a072e 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -273,12 +273,13 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI if (Phase == 1) // Flying Phase { - if (m_creature->GetPositionZ() == FlightHeight) // Correct height, stop moving - m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + if (m_creature->GetPositionZ() > FlightHeight) // Correct height, stop moving + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ROOT); else // Incorrect height { - m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); - m_creature->GetMotionMaster()->MovePoint(0, x, y, FlightHeight); + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); + // TODO: Move faster while flying + m_creature->GetMotionMaster()->MovePoint(0, x, y, FlightHeight + 0.5f); // Fly to slightly above (x, y, FlightHeight) } } else // Ground Phases @@ -286,9 +287,11 @@ 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->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); 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 //} |
