diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 | ||||
-rw-r--r-- | src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/howling_fjord.cpp | 96 | ||||
-rw-r--r-- | src/bindings/scripts/system/ScriptLoader.cpp | 2 |
5 files changed, 107 insertions, 0 deletions
diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 6d16d126d26..0d7ce5daf7c 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -404,6 +404,7 @@ SET(trinityscript_LIB_SRCS scripts/northrend/borean_tundra.cpp scripts/northrend/dragonblight.cpp scripts/northrend/grizzly_hills.cpp + scripts/northrend/howling_fjord.cpp scripts/northrend/icecrown.cpp scripts/northrend/sholazar_basin.cpp scripts/northrend/storm_peaks.cpp diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 440bc0ea946..8443677330b 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2157,6 +2157,10 @@ RelativePath="..\scripts\northrend\grizzly_hills.cpp" > </File> + <File + RelativePath="..\scripts\northrend\howling_fjord.cpp" + > + </File> <File RelativePath="..\scripts\northrend\icecrown.cpp" > diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 80ce6157582..007f830dba5 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -2154,6 +2154,10 @@ RelativePath="..\scripts\northrend\grizzly_hills.cpp" > </File> + <File + RelativePath="..\scripts\northrend\howling_fjord.cpp" + > + </File> <File RelativePath="..\scripts\northrend\icecrown.cpp" > diff --git a/src/bindings/scripts/scripts/northrend/howling_fjord.cpp b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp new file mode 100644 index 00000000000..6c64fbbeafe --- /dev/null +++ b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp @@ -0,0 +1,96 @@ +/* Copyright (C) 2008-2009 Trinity <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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Sholazar_Basin +SD%Complete: 100 +SDComment: Quest support: 11253. +SDCategory: howling_fjord +EndScriptData */ + +/* ContentData +npc_plaguehound_tracker +EndContentData */ + +/*###### +## npc_plaguehound_tracker +######*/ + +enum +{ + QUEST_SNIFF_OUT_ENEMY = 11253 +}; + +struct TRINITY_DLL_DECL npc_plaguehound_trackerAI : public npc_escortAI +{ + npc_plaguehound_trackerAI(Creature* pCreature) : npc_escortAI(pCreature) { } + + + void Reset() + { + InitScriptData(); + } + + void InitScriptData() + { + Player* pPlayer = NULL; + if(me->isSummon()) + if(Unit* summoner = CAST_SUM(me)->GetSummoner()) + if(summoner->GetTypeId() == TYPEID_PLAYER) + pPlayer = CAST_PLR(summoner); + + if (!pPlayer) + return; + + me->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE); + Start(false, false, pPlayer->GetGUID()); + } + + void WaypointReached(uint32 i) + { + Player* pPlayer = NULL; + if(me->isSummon()) + if(Unit* summoner = CAST_SUM(me)->GetSummoner()) + if(summoner->GetTypeId() == TYPEID_PLAYER) + pPlayer = CAST_PLR(summoner); + + if (!pPlayer) + return; + + switch(i) + { + case 26: + me->ForcedDespawn(); + break; + } + } +}; + +CreatureAI* GetAI_npc_plaguehound_tracker(Creature* pCreature) +{ + return new npc_plaguehound_trackerAI(pCreature); +} + +void AddSC_howling_fjord() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_plaguehound_tracker"; + newscript->GetAI = &GetAI_npc_plaguehound_tracker; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp index aaba5e13d64..30a03b25f5a 100644 --- a/src/bindings/scripts/system/ScriptLoader.cpp +++ b/src/bindings/scripts/system/ScriptLoader.cpp @@ -305,6 +305,7 @@ extern void AddSC_instance_archavon(); extern void AddSC_borean_tundra(); extern void AddSC_dragonblight(); extern void AddSC_grizzly_hills(); +extern void AddSC_howling_fjord(); extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); @@ -696,6 +697,7 @@ void AddScripts() AddSC_borean_tundra(); AddSC_dragonblight(); AddSC_grizzly_hills(); + AddSC_howling_fjord(); AddSC_icecrown(); AddSC_sholazar_basin(); AddSC_storm_peaks(); |