diff options
author | Kudlaty <none@none> | 2009-11-28 15:19:31 +0100 |
---|---|---|
committer | Kudlaty <none@none> | 2009-11-28 15:19:31 +0100 |
commit | 3f4bf697b8eb6239748ca728ec17a67322f7924d (patch) | |
tree | 9a698d3db8486883621ac3979b5b030f5776c2e5 | |
parent | 03e43761d0935cf6435471983165694596eeca78 (diff) |
Shuld fix quest The Light of Dawn ( #85 ), and some escort that use STATE_ESCORT_PAUSED
--HG--
branch : trunk
-rw-r--r-- | src/bindings/scripts/base/escort_ai.cpp | 11 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp | 7 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/bindings/scripts/base/escort_ai.cpp b/src/bindings/scripts/base/escort_ai.cpp index 08adf6a534b..a0d2d4a0d66 100644 --- a/src/bindings/scripts/base/escort_ai.cpp +++ b/src/bindings/scripts/base/escort_ai.cpp @@ -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) diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp index 8b5f464decf..a3a0dc40165 100644 --- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp +++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp @@ -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; } |