diff options
| author | Aokromes <Aokromes@users.noreply.github.com> | 2017-01-14 15:09:09 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-14 15:09:09 +0100 | 
| commit | 820c69ed8cc2523b69c22fd5dec78fae0ee590ba (patch) | |
| tree | 59a341b5829a24eae6f19d18496898d712834097 /src/server/scripts/Kalimdor | |
| parent | b53513ec11b27501a6272b3f958d3529ff16e378 (diff) | |
Core/Scripts: update npc_eagle_spirit
By Malcrom
Diffstat (limited to 'src/server/scripts/Kalimdor')
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_mulgore.cpp | 28 | 
1 files changed, 8 insertions, 20 deletions
diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp index c7fff6a410c..f4a546c1f5c 100644 --- a/src/server/scripts/Kalimdor/zone_mulgore.cpp +++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp @@ -15,19 +15,8 @@   * with this program. If not, see <http://www.gnu.org/licenses/>.   */ -/* Script Info -Name: Mulgore -Comment: Support for quest: 24215 -*/ - -/* Included Scripts -npc_eagle_spirit: Used by Creature Eagle Spirit, Entry 36790 - */ -  #include "ScriptMgr.h"  #include "ScriptedCreature.h" -#include "Player.h" -#include "SpellInfo.h"  /*######  ## npc_eagle_spirit @@ -35,10 +24,12 @@ npc_eagle_spirit: Used by Creature Eagle Spirit, Entry 36790  enum EagleSpirit  { -    SPELL_EJECT_ALL_PASSENGERS = 50630 +    SPELL_EJECT_ALL_PASSENGERS = 50630, +    SPELL_SPIRIT_FORM          = 69324  }; -G3D::Vector3 const Flightpath[7] = +uint32 const EagleSpiritflightPathSize = 7; +G3D::Vector3 const EagleSpiritflightPath[EagleSpiritflightPathSize] =  {      { -2884.155f, -71.08681f, 242.0678f },      { -2720.592f, -111.0035f, 242.5955f }, @@ -56,25 +47,22 @@ public:      struct npc_eagle_spirit_AI : public ScriptedAI      { -        npc_eagle_spirit_AI(Creature* creature) : ScriptedAI(creature) -        { -            me->SetCanFly(true); -        } +        npc_eagle_spirit_AI(Creature* creature) : ScriptedAI(creature) { }          void PassengerBoarded(Unit* /*who*/, int8 /*seatId*/, bool apply) override          {              if (!apply)                  return; -            me->GetMotionMaster()->MoveSmoothPath(1, Flightpath, 7, false); +            me->GetMotionMaster()->MoveSmoothPath(EagleSpiritflightPathSize, EagleSpiritflightPath, EagleSpiritflightPathSize, false); +            me->CastSpell(me, SPELL_SPIRIT_FORM);          }          void MovementInform(uint32 type, uint32 pointId) override          { -            if (type == EFFECT_MOTION_TYPE && pointId == 1) +            if (type == EFFECT_MOTION_TYPE && pointId == EagleSpiritflightPathSize)              {                  DoCast(SPELL_EJECT_ALL_PASSENGERS); -                me->DespawnOrUnsummon();              }          }      };  | 
