diff options
| author | Manuel <manue.l@live.com.ar> | 2011-01-09 00:00:08 -0300 |
|---|---|---|
| committer | Manuel <manue.l@live.com.ar> | 2011-01-09 00:00:08 -0300 |
| commit | 5cf76896eb07c449327aaca7c36046027fb955df (patch) | |
| tree | fb4844e27a521668a79f5fc4a69cce0ec4060f57 /src/server/scripts/Northrend | |
| parent | 57173df80f29d796a6de56b877fceff7abe181bc (diff) | |
Core/Battleground: Implemented blizzlike script for Isle of Conquest, written by gyullo and me, based on Socolin's and Josh's patch -BIG THANKS TO THEM-
Anyway the map is not yet playable, there are issues not related with the script.
I also want to thanks to QAston, linencloth, Shauren and Machiavelli to be so patient with my questions.
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/isle_of_conquest.cpp | 72 |
2 files changed, 73 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt index cad76883781..f1c80b14bd1 100644 --- a/src/server/scripts/Northrend/CMakeLists.txt +++ b/src/server/scripts/Northrend/CMakeLists.txt @@ -1,5 +1,6 @@ set(scripts_STAT_SRCS ${scripts_STAT_SRCS} + Northrend/isle_of_conquest.cpp Northrend/storm_peaks.cpp Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp new file mode 100644 index 00000000000..b70f8de4b4c --- /dev/null +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008-2011 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/>. + */ + +#include "ScriptPCH.h" +#include "BattlegroundIC.h" + +// TO-DO: This should be done with SmartAI, but yet it does not correctly support vehicles's AIs. +// Even adding ReactState Passive we still have issues using SmartAI. + +class npc_four_car_garage : public CreatureScript +{ + public: + npc_four_car_garage() : CreatureScript("npc_four_car_garage") {} + + struct npc_four_car_garageAI : public NullCreatureAI + { + npc_four_car_garageAI(Creature* pCreature) : NullCreatureAI(pCreature) { } + + void PassengerBoarded(Unit* who, int8 seatId, bool apply) + { + if (apply) + { + uint32 spellId = 0; + + switch(me->GetEntry()) + { + case NPC_DEMOLISHER: + spellId = 68365; + break; + case NPC_GLAIVE_THROWER: + spellId = 68363; + break; + case NPC_SIEGE_ENGINE_H: + case NPC_SIEGE_ENGINE_A: + spellId = 68364; + break; + case NPC_CATAPULT: + spellId = 68362; + break; + default: + return; + } + + me->CastSpell(who,spellId,true); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_four_car_garageAI(creature); + } +}; + +void AddSC_isle_of_conquest() +{ + new npc_four_car_garage(); +}
\ No newline at end of file |
