*Some tweaks to Razorscale's flight behavior, and a little cleanup.
--HG-- branch : trunk
This commit is contained in:
@@ -342,11 +342,11 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
|||||||
uiTotal_scourge = ENCOUNTER_TOTAL_SCOURGE;
|
uiTotal_scourge = ENCOUNTER_TOTAL_SCOURGE;
|
||||||
uiSummon_counter = 0;
|
uiSummon_counter = 0;
|
||||||
|
|
||||||
uiAnti_magic_zone = 1000 + rand()%5000;
|
uiAnti_magic_zone = urand(1000,6000);
|
||||||
uiDeath_strike = 5000 + rand()%5000;
|
uiDeath_strike = urand(5000,10000);
|
||||||
uiDeath_embrace = 5000 + rand()%5000;
|
uiDeath_embrace = urand(5000,10000);
|
||||||
uiIcy_touch = 5000 + rand()%5000;
|
uiIcy_touch = urand(5000,10000);
|
||||||
uiUnholy_blight = 5000 + rand()%5000;
|
uiUnholy_blight = urand(5000,10000);
|
||||||
|
|
||||||
uiFight_speech = 15000;
|
uiFight_speech = 15000;
|
||||||
uiSpawncheck = 1000;
|
uiSpawncheck = 1000;
|
||||||
@@ -463,7 +463,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
|||||||
|
|
||||||
void WaypointReached(uint32 i)
|
void WaypointReached(uint32 i)
|
||||||
{
|
{
|
||||||
switch(i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
@@ -585,7 +585,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
|||||||
if (uiPhase_timer <= diff)
|
if (uiPhase_timer <= diff)
|
||||||
{
|
{
|
||||||
// ******* Before battle *****************************************************************
|
// ******* Before battle *****************************************************************
|
||||||
switch(uiStep)
|
switch (uiStep)
|
||||||
{
|
{
|
||||||
case 0: // countdown
|
case 0: // countdown
|
||||||
//UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 1);
|
//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;
|
} else uiTargetcheck -= diff;
|
||||||
|
|
||||||
// Battle end
|
// Battle end
|
||||||
if (uiFight_duration < diff + 5000)
|
if (uiFight_duration <= diff + 5000)
|
||||||
{
|
{
|
||||||
if (!uiTirionGUID)
|
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))
|
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->SetFlying(IsFlying);
|
||||||
m_creature->SendMovementFlagUpdate();
|
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 (Phase == 1) // Flying Phase
|
||||||
{
|
{
|
||||||
if (m_creature->GetPositionZ() > FlightHeight) // Correct height, stop moving
|
if (m_creature->GetPositionZ() > FlightHeight) // Correct height, stop moving
|
||||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
else // Incorrect height
|
else // Incorrect height
|
||||||
{
|
{
|
||||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
// TODO: Move faster while flying
|
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, FlightHeight + 0.5f); // Fly to slightly above (x, y, FlightHeight)
|
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);
|
const float CurrentGroundLevel = m_creature->GetBaseMap()->GetHeight(m_creature->GetPositionX(), m_creature->GetPositionY(), MAX_HEIGHT);
|
||||||
//if (StunTimer == 30000) // Only fly around if not stunned.
|
//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
|
if (IsFlying && m_creature->GetPositionZ() > CurrentGroundLevel) // Fly towards the ground
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), CurrentGroundLevel);
|
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), CurrentGroundLevel);
|
||||||
// TODO: Move faster while flying
|
|
||||||
// TODO: Swoop up just before landing
|
// TODO: Swoop up just before landing
|
||||||
else
|
else
|
||||||
IsFlying = false; // Landed, no longer flying
|
IsFlying = false; // Landed, no longer flying
|
||||||
|
|||||||
Reference in New Issue
Block a user