diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-02-12 03:23:54 +0100 | 
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-02-12 03:23:54 +0100 | 
| commit | f6bf9bc04ddb4e310a6086a6081b1d4b3455fc6d (patch) | |
| tree | 36beabcd024a980a3f0ea09592fd45b0f102e728 /src | |
| parent | b243a7929bac02509594f5f25da476cfcea3d64a (diff) | |
Revert "Scripts/ScarletEnclave: fix Massacre at Light's Point mine cart escort to work again (tag #20310)"
This reverts commit 6ff71dffbb774b8ea715053cd9223edc5c67bb0f.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 36 | 
1 files changed, 16 insertions, 20 deletions
| diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 90e174364b9..7a5e35e9ed8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1056,6 +1056,11 @@ class npc_scarlet_miner_cart : public CreatureScript                  if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID))                  {                      me->SetWalk(false); + +                    // Not 100% correct, but movement is smooth. Sometimes miner walks faster +                    // than normal, this speed is fast enough to keep up at those times. +                    me->SetSpeedRate(MOVE_RUN, 1.25f); +                      me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0);                  }              } @@ -1105,21 +1110,25 @@ class npc_scarlet_miner : public CreatureScript          {              npc_scarlet_minerAI(Creature* creature) : EscortAI(creature)              { +                Initialize();                  me->SetReactState(REACT_PASSIVE);              } -            void InitializeAI() override +            void Initialize()              { +                carGUID.Clear();                  IntroTimer = 0;                  IntroPhase = 0; -                carGUID.Clear(); -                playerGUID.Clear();              }              uint32 IntroTimer;              uint32 IntroPhase;              ObjectGuid carGUID; -            ObjectGuid playerGUID; + +            void Reset() override +            { +                Initialize(); +            }              void IsSummonedBy(Unit* summoner) override              { @@ -1161,12 +1170,9 @@ class npc_scarlet_miner : public CreatureScript              void SetGUID(ObjectGuid const& guid, int32 /*id*/) override              { -                playerGUID = guid; -            } - -            void Reset() override -            { -                EscortAI::Reset(); +                InitWaypoint(); +                Start(false, false, guid); +                SetDespawnAtFar(false);              }              void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override @@ -1194,16 +1200,6 @@ class npc_scarlet_miner : public CreatureScript                  }              } -            void JustAppeared() override -            { -                EscortAI::JustAppeared(); -                if (!playerGUID) -                    return; -                InitWaypoint(); -                Start(false, false, playerGUID); -                SetDespawnAtFar(false); -            } -              void UpdateAI(uint32 diff) override              {                  if (IntroPhase) | 
