diff options
| author | Liberate <tbaart@gmail.com> | 2011-01-30 18:22:30 +0100 |
|---|---|---|
| committer | Liberate <tbaart@gmail.com> | 2011-01-30 18:22:30 +0100 |
| commit | 0e7b60bf19babf8dfa1a424fb08c50c5fb4bfdc0 (patch) | |
| tree | 7133d40182400c11ebead20c961be0bf87357bc5 /src/server/scripts/Northrend | |
| parent | 840d2eac625117d4da798f8f6c1e61531d24ec9e (diff) | |
Quests: Fixes quest "Going Bearback". Needs DB support to work.
ref ticket:472
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/storm_peaks.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index f56c372faf4..1b1e4f06939 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -665,6 +665,55 @@ public: } }; +class npc_icefang : public CreatureScript +{ +public: + npc_icefang() : CreatureScript("npc_icefang") { } + + struct npc_icefangAI : public npc_escortAI + { + npc_icefangAI(Creature* creature) : npc_escortAI(creature) {} + + void AttackStart(Unit* who) {} + void EnterCombat(Unit* who) {} + void EnterEvadeMode() {} + + void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) + { + if (who->GetTypeId() == TYPEID_PLAYER) + { + if (apply) + Start(false, true, who->GetGUID()); + } + } + + void WaypointReached(uint32 wp) + { + } + + void JustDied(Unit* killer) + { + } + + void OnCharmed(bool /*apply*/) + { + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_icefangAI (creature); + } +}; + void AddSC_storm_peaks() { new npc_agnetta_tyrsdottar; @@ -676,4 +725,5 @@ void AddSC_storm_peaks() new npc_injured_goblin; new npc_roxi_ramrocket; new npc_brunnhildar_prisoner; + new npc_icefang; } |
