diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-07-21 01:49:58 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2019-07-21 01:50:52 +0200 |
| commit | 0e7c66cb4c7ff7d44e232d0b50703a48605ffd24 (patch) | |
| tree | 4ffe19100d1173ff3641bf6d4be82d826d729924 /src/server/scripts/Kalimdor | |
| parent | eba10f309eb541a7246754285bea6b821710d9fd (diff) | |
Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time.
Diffstat (limited to 'src/server/scripts/Kalimdor')
3 files changed, 9 insertions, 6 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 9abbf1269c5..c5b67fdd915 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -424,9 +424,10 @@ void hyjalAI::EnterEvadeMode(EvadeReason /*why*/) if (me->GetEntry() != JAINA) me->RemoveAllAuras(); me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); + + EngagementOver(); + me->LoadCreaturesAddon(); - if (me->IsAlive()) me->GetMotionMaster()->MoveTargetedHome(); diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index e57fb68463c..ffe447d5cfa 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -90,9 +90,11 @@ public: me->UpdateEntry(NPC_TAMED_KODO); me->CombatStop(); - me->GetThreatManager().NotifyDisengaged(); me->SetFaction(FACTION_FRIENDLY); me->SetSpeedRate(MOVE_RUN, 0.6f); + + EngagementOver(); + me->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, me->GetFollowAngle()); me->setActive(true); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 90ce8c130f6..3bf0afe1c7d 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -221,11 +221,11 @@ public: { me->RemoveAllAuras(); me->CombatStop(true); - me->GetThreatManager().NotifyDisengaged(); - me->StopMoving(); + + EngagementOver(); + me->GetMotionMaster()->MoveIdle(); - me->SetFaction(FACTION_FRIENDLY_F); me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); } |
