Shuld fix quest The Light of Dawn ( #85 ), and some escort that use STATE_ESCORT_PAUSED

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-11-28 15:19:31 +01:00
parent 03e43761d0
commit 3f4bf697b8
2 changed files with 13 additions and 5 deletions

View File

@@ -181,9 +181,10 @@ void npc_escortAI::EnterEvadeMode()
debug_log("TSCR: EscortAI has left combat and is now returning to last point");
}
else
{
m_creature->GetMotionMaster()->MoveTargetedHome();
Reset();
Reset();
}
}
bool npc_escortAI::IsPlayerOrGroupInRange()
@@ -302,8 +303,10 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
void npc_escortAI::UpdateEscortAI(const uint32 uiDiff)
{
if (CanMelee && UpdateVictim())
DoMeleeAttackIfReady();
if (!CanMelee && !UpdateVictim())
return;
DoMeleeAttackIfReady();
}
void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)

View File

@@ -354,6 +354,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
me->SetStandState(UNIT_STAND_STATE_STAND);
me->Mount(25279);
me->SetVisibility(VISIBILITY_ON);
UpdateWorldState(me->GetMap(), WORLD_STATE_REMAINS, 0);
//UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 0);
@@ -1283,7 +1284,11 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
case 72:
SetHoldState(false); // Escort ends
JumpToNextStep(0);
JumpToNextStep(25000);
break;
case 73:
me->ForcedDespawn();
break;
}