diff options
| author | Subv <s.v.h21@hotmail.com> | 2012-12-07 19:12:00 -0500 |
|---|---|---|
| committer | Subv <s.v.h21@hotmail.com> | 2012-12-07 19:12:00 -0500 |
| commit | 1750391fca36db815d716cb7fda1bf6f9c853713 (patch) | |
| tree | 9407c21453a153ab929e5365fb29d838b45c8924 /src/server/scripts/Northrend | |
| parent | eb8271706967e68111d453c16cc7e58223e41f14 (diff) | |
| parent | 0abeb1b5c3d033c2545358f8abb3c9e3d4730ced (diff) | |
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/sholazar_basin.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index a6d6cda11b1..c0635f897d9 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -722,10 +722,17 @@ class npc_adventurous_dwarf : public CreatureScript public: npc_adventurous_dwarf() : CreatureScript("npc_adventurous_dwarf") { } + struct npc_adventurous_dwarfAI : public ScriptedAI + { + npc_adventurous_dwarfAI(Creature* creature) : ScriptedAI(creature) + { + Talk(SAY_DWARF_OUCH); + } + }; + CreatureAI* GetAI(Creature* creature) const { - creature->AI()->Talk(SAY_DWARF_OUCH); - return NULL; + return new npc_adventurous_dwarfAI(creature); } bool OnGossipHello(Player* player, Creature* creature) @@ -750,14 +757,23 @@ public: { player->PlayerTalkClass->ClearMenus(); uint32 spellId = 0; + switch (action) { - case GOSSIP_ACTION_INFO_DEF + 1: spellId = SPELL_ADD_ORANGE; break; - case GOSSIP_ACTION_INFO_DEF + 2: spellId = SPELL_ADD_BANANAS; break; - case GOSSIP_ACTION_INFO_DEF + 3: spellId = SPELL_ADD_PAPAYA; break; + case GOSSIP_ACTION_INFO_DEF + 1: + spellId = SPELL_ADD_ORANGE; + break; + case GOSSIP_ACTION_INFO_DEF + 2: + spellId = SPELL_ADD_BANANAS; + break; + case GOSSIP_ACTION_INFO_DEF + 3: + spellId = SPELL_ADD_PAPAYA; + break; } + if (spellId) player->CastSpell(player, spellId, true); + creature->AI()->Talk(SAY_DWARF_HELP); creature->DespawnOrUnsummon(); return true; |
