aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2017_01_12_15_world_2016_06_09_01_world.sql14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp45
2 files changed, 36 insertions, 23 deletions
diff --git a/sql/updates/world/master/2017_01_12_15_world_2016_06_09_01_world.sql b/sql/updates/world/master/2017_01_12_15_world_2016_06_09_01_world.sql
new file mode 100644
index 00000000000..b29242b6038
--- /dev/null
+++ b/sql/updates/world/master/2017_01_12_15_world_2016_06_09_01_world.sql
@@ -0,0 +1,14 @@
+-- Majordomo Executus' gossip when friendly (entry 12018 in 3.3.5)
+UPDATE `creature_template` SET `gossip_menu_id` = 4093 WHERE `entry` = 12018;
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (4108,4109,4093) AND `text_id` IN (4995,5011,5012);
+INSERT INTO gossip_menu (`entry`,`text_id`) VALUES
+(4093, 4995), -- 54404 (Majordomo Executus' DB entry ID from retail)
+(4109, 5011), -- 54404 (Majordomo Executus' DB entry ID from retail)
+(4108, 5012); -- 54404 (Majordomo Executus' DB entry ID from retail)
+
+DELETE FROM `gossip_menu_option` WHERE (`menu_id`=4108 AND `id`=0) OR (`menu_id`=4109 AND `id`=0) OR (`menu_id`=4093 AND `id`=0);
+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
+(4093,0,0, 'Tell me more.', 7675,1,1,4109,0,0,0,'',0), -- menu_id + text in TDB 6.04
+(4109,0,0, 'What else do you have to say?', 7673,1,1,4108,0,0,0,'',0), -- menu_id + text in TDB 6.04
+(4108,0,0, 'You challenged us and we have come. Where is this master you speak of?\n', 7646,1,1, 0,0,0,0,'',0); -- menu_id + text in TDB 6.04
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
index 4b1dd869dad..1574a19f6b4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
@@ -44,16 +44,20 @@ enum Texts
enum Spells
{
- SPELL_MAGIC_REFLECTION = 20619,
- SPELL_DAMAGE_REFLECTION = 21075,
+ SPELL_SUMMON_RAGNAROS = 19774,
SPELL_BLAST_WAVE = 20229,
- SPELL_AEGIS_OF_RAGNAROS = 20620,
SPELL_TELEPORT = 20618,
- SPELL_SUMMON_RAGNAROS = 19774,
+ SPELL_MAGIC_REFLECTION = 20619,
+ SPELL_AEGIS_OF_RAGNAROS = 20620,
+ SPELL_DAMAGE_REFLECTION = 21075
};
-#define GOSSIP_HELLO 4995
-#define GOSSIP_SELECT "Tell me more."
+enum Extras
+{
+ OPTION_ID_YOU_CHALLENGED_US = 0,
+ FACTION_FRIENDLY = 35,
+ MENU_OPTION_YOU_CHALLENGED_US = 4108
+};
enum Events
{
@@ -64,7 +68,7 @@ enum Events
EVENT_OUTRO_1 = 5,
EVENT_OUTRO_2 = 6,
- EVENT_OUTRO_3 = 7,
+ EVENT_OUTRO_3 = 7
};
class boss_majordomo : public CreatureScript
@@ -106,7 +110,7 @@ class boss_majordomo : public CreatureScript
if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f))
{
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
- me->setFaction(35);
+ me->setFaction(FACTION_FRIENDLY);
EnterEvadeMode();
Talk(SAY_DEFEAT);
_JustDied();
@@ -184,25 +188,20 @@ class boss_majordomo : public CreatureScript
}
else if (action == ACTION_START_RAGNAROS_ALT)
{
- me->setFaction(35);
+ me->setFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
- };
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID());
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
- {
- player->CLOSE_GOSSIP_MENU();
- creature->AI()->DoAction(ACTION_START_RAGNAROS);
- return true;
- }
+ void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
+ {
+ if (menuId == MENU_OPTION_YOU_CHALLENGED_US && gossipListId == OPTION_ID_YOU_CHALLENGED_US)
+ {
+ player->CLOSE_GOSSIP_MENU();
+ DoAction(ACTION_START_RAGNAROS);
+ }
+ }
+ };
CreatureAI* GetAI(Creature* creature) const override
{