aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/base
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-11-28 15:19:31 +0100
committerKudlaty <none@none>2009-11-28 15:19:31 +0100
commit3f4bf697b8eb6239748ca728ec17a67322f7924d (patch)
tree9a698d3db8486883621ac3979b5b030f5776c2e5 /src/bindings/scripts/base
parent03e43761d0935cf6435471983165694596eeca78 (diff)
Shuld fix quest The Light of Dawn ( #85 ), and some escort that use STATE_ESCORT_PAUSED
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts/base')
-rw-r--r--src/bindings/scripts/base/escort_ai.cpp11
1 files changed, 7 insertions, 4 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)