aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2016_06_09_04_world.sql6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp45
2 files changed, 27 insertions, 24 deletions
diff --git a/sql/updates/world/3.3.5/2016_06_09_04_world.sql b/sql/updates/world/3.3.5/2016_06_09_04_world.sql
new file mode 100644
index 00000000000..ecff9eb7ce6
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_06_09_04_world.sql
@@ -0,0 +1,6 @@
+-- NPC ID 17603 Grandmother gossip_menu_option (new rows)
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7441,7442,7443);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES
+(7441,0,0,"Oh, grandmother, what big ears you have.", 14217,0,0,7442,0,0,0,'',0),
+(7442,0,0,"Oh, grandmother, what big eyes you have.", 14219,0,0,7443,0,0,0,'',0),
+(7443,0,0,"Oh, grandmother, what phat lewts you have.",14221,0,0, 0,0,0,0,'',0);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 3f236c060d7..2e4ac11d3fa 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -797,46 +797,43 @@ enum RedRidingHood
SAY_WOLF_AGGRO = 0,
SAY_WOLF_SLAY = 1,
SAY_WOLF_HOOD = 2,
+ OPTION_WHAT_PHAT_LEWTS_YOU_HAVE = 7443,
SOUND_WOLF_DEATH = 9275,
SPELL_LITTLE_RED_RIDING_HOOD = 30768,
SPELL_TERRIFYING_HOWL = 30752,
SPELL_WIDE_SWIPE = 30761,
- CREATURE_BIG_BAD_WOLF = 17521,
+ CREATURE_BIG_BAD_WOLF = 17521
};
-
-#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?"
-
-
-
class npc_grandmother : public CreatureScript
{
-public:
- npc_grandmother() : CreatureScript("npc_grandmother") { }
+ public:
+ npc_grandmother() : CreatureScript("npc_grandmother") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF)
+ struct npc_grandmotherAI : public ScriptedAI
{
- if (Creature* pBigBadWolf = creature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
- pBigBadWolf->AI()->AttackStart(player);
+ npc_grandmotherAI(Creature* creature) : ScriptedAI(creature) { }
- creature->DespawnOrUnsummon();
- }
+ void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
+ {
+ if (menuId == OPTION_WHAT_PHAT_LEWTS_YOU_HAVE && gossipListId == 0)
+ {
+ player->CLOSE_GOSSIP_MENU();
- return true;
- }
+ if (Creature* pBigBadWolf = me->SummonCreature(CREATURE_BIG_BAD_WOLF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
+ pBigBadWolf->AI()->AttackStart(player);
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(8990, creature->GetGUID());
+ me->DespawnOrUnsummon();
+ }
+ }
+ };
- return true;
- }
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return new npc_grandmotherAI(creature);
+ }
};
class boss_bigbadwolf : public CreatureScript