aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2013-07-02 00:09:33 -0230
committerMalcrom <malcromdev@gmail.com>2013-07-02 00:09:33 -0230
commit19aeac3abde0bd1c15bf49f1960464fec5c4ed86 (patch)
treeda656fa23f26675e1a1be2eb7ba4a5c6c95e4775 /src
parentb77eb5e527b2852796e0b1cd7b4405e2ff149429 (diff)
Core/Scripting: Fix Gossip option select for npc_spirit_of_olum
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 1bd8e484ac2..329a8c73927 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -45,14 +45,24 @@ class npc_spirit_of_olum : public CreatureScript
public:
npc_spirit_of_olum() : CreatureScript("npc_spirit_of_olum") { }
- void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action)
+ struct npc_spirit_of_olumAI : public ScriptedAI
{
- if (action == 1)
+ npc_spirit_of_olumAI(Creature* creature) : ScriptedAI(creature) {}
+
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action)
{
- player->CLOSE_GOSSIP_MENU();
- player->InterruptNonMeleeSpells(false);
- player->CastSpell(player, SPELL_TELEPORT, false);
+ if (action == 1)
+ {
+ player->CLOSE_GOSSIP_MENU();
+ player->InterruptNonMeleeSpells(false);
+ player->CastSpell(player, SPELL_TELEPORT, false);
+ }
}
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_spirit_of_olumAI (creature);
}
};