Script for Plaguehound Tracker. Thanks to manuel and Nevan

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-08-21 22:11:19 +02:00
parent 7ef7b7e27e
commit e0ba302e32
8 changed files with 169 additions and 0 deletions
+1
View File
@@ -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
@@ -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"
>
@@ -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"
>
@@ -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();
}
@@ -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();