mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Script/Quest: Script Quest 24125 Rite of the Winds
By Malcrom, closes #18262
This commit is contained in:
91
src/server/scripts/Kalimdor/zone_mulgore.cpp
Normal file
91
src/server/scripts/Kalimdor/zone_mulgore.cpp
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* 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
|
||||||
|
######*/
|
||||||
|
|
||||||
|
enum EagleSpirit
|
||||||
|
{
|
||||||
|
SPELL_EJECT_ALL_PASSENGERS = 50630
|
||||||
|
};
|
||||||
|
|
||||||
|
G3D::Vector3 const Flightpath[7] =
|
||||||
|
{
|
||||||
|
{ -2884.155f, -71.08681f, 242.0678f },
|
||||||
|
{ -2720.592f, -111.0035f, 242.5955f },
|
||||||
|
{ -2683.951f, -382.9010f, 231.1792f },
|
||||||
|
{ -2619.148f, -484.9288f, 231.1792f },
|
||||||
|
{ -2543.868f, -525.3333f, 231.1792f },
|
||||||
|
{ -2465.321f, -502.4896f, 190.7347f },
|
||||||
|
{ -2343.872f, -401.8281f, -8.320873f }
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_eagle_spirit : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_eagle_spirit() : CreatureScript("npc_eagle_spirit") { }
|
||||||
|
|
||||||
|
struct npc_eagle_spirit_AI : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_eagle_spirit_AI(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
me->SetCanFly(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PassengerBoarded(Unit* /*who*/, int8 /*seatId*/, bool apply) override
|
||||||
|
{
|
||||||
|
if (!apply)
|
||||||
|
return;
|
||||||
|
|
||||||
|
me->GetMotionMaster()->MoveSmoothPath(1, Flightpath, 7, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MovementInform(uint32 type, uint32 pointId) override
|
||||||
|
{
|
||||||
|
if (type == EFFECT_MOTION_TYPE && pointId == 1)
|
||||||
|
{
|
||||||
|
DoCast(SPELL_EJECT_ALL_PASSENGERS);
|
||||||
|
me->DespawnOrUnsummon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
{
|
||||||
|
return new npc_eagle_spirit_AI(creature);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_mulgore()
|
||||||
|
{
|
||||||
|
new npc_eagle_spirit();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user