fix(Scripts/BRD): Fix Doom'rel and Gloom'rel gossip not working (#25256)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
df66e131c9
commit
c38b058efa
2 changed files with 65 additions and 72 deletions
|
|
@ -0,0 +1,42 @@
|
|||
-- Doomrel (9039): Create "Continue..." menu and chain from initial gossip
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID` = 1950;
|
||||
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES (1950, 2605);
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 1950;
|
||||
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
|
||||
(1950, 0, 0, 'Continue...', 5256, 1, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 1950 WHERE `MenuID` = 1947 AND `OptionID` = 0;
|
||||
|
||||
-- Gloomrel (9037): Create "Continue..." menus for smelt and chalice paths
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID` IN (1952, 1953);
|
||||
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
|
||||
(1952, 2606),
|
||||
(1953, 2604);
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (1952, 1953);
|
||||
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
|
||||
(1952, 0, 0, 'Continue...', 5256, 1, 1, 0, 0, 0, 0, '', 0, 0),
|
||||
(1953, 0, 0, 'Continue...', 5256, 1, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 1952 WHERE `MenuID` = 1945 AND `OptionID` = 0;
|
||||
UPDATE `gossip_menu_option` SET `ActionMenuID` = 1953 WHERE `MenuID` = 1945 AND `OptionID` = 1;
|
||||
|
||||
-- Gloomrel: Conditional gossip text when quest completed
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID` = 1945 AND `TextID` = 2605;
|
||||
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES (1945, 2605);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 1945 AND `SourceEntry` = 2605;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(14, 1945, 2605, 0, 0, 8, 0, 4083, 0, 0, 0, 0, 0, '', 'Gloomrel - text requires quest 4083 rewarded'),
|
||||
(14, 1945, 2605, 0, 0, 7, 0, 186, 230, 0, 0, 0, 0, '', 'Gloomrel - text requires Mining >= 230'),
|
||||
(14, 1945, 2605, 0, 0, 16, 0, 14891, 0, 0, 1, 0, 0, '', 'Gloomrel - text requires NOT having Smelt Dark Iron');
|
||||
|
||||
-- Gloomrel: Conditions for gossip options
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 1945 AND `SourceEntry` IN (0, 1);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, 1945, 0, 0, 0, 8, 0, 4083, 0, 0, 0, 0, 0, '', 'Gloomrel - option 0 requires quest 4083 rewarded'),
|
||||
(15, 1945, 0, 0, 0, 7, 0, 186, 230, 0, 0, 0, 0, '', 'Gloomrel - option 0 requires Mining >= 230'),
|
||||
(15, 1945, 0, 0, 0, 16, 0, 14891, 0, 0, 1, 0, 0, '', 'Gloomrel - option 0 requires NOT having Smelt Dark Iron'),
|
||||
(15, 1945, 1, 0, 0, 8, 0, 4083, 0, 0, 1, 0, 0, '', 'Gloomrel - option 1 requires quest 4083 NOT rewarded'),
|
||||
(15, 1945, 1, 0, 0, 7, 0, 186, 230, 0, 0, 0, 0, '', 'Gloomrel - option 1 requires Mining >= 230');
|
||||
|
|
@ -23,20 +23,9 @@
|
|||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SMELT_DARK_IRON = 14891,
|
||||
SPELL_LEARN_SMELT = 14894,
|
||||
};
|
||||
|
||||
enum Quests
|
||||
{
|
||||
QUEST_SPECTRAL_CHALICE = 4083
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DATA_SKILLPOINT_MIN = 230
|
||||
};
|
||||
|
||||
enum Says
|
||||
{
|
||||
SAY_START_FIGHT = 0
|
||||
|
|
@ -44,57 +33,32 @@ enum Says
|
|||
|
||||
enum Gossip
|
||||
{
|
||||
GOSSIP_TEXT_CONTINUE = 1828, // Continue...
|
||||
GOSSIP_GROOMREL = 1945, // Option 1 : Before quest(4083) accepted, option 0 after quest(4083) accepted
|
||||
GOSSIP_DOOMREL_START_COMBAT = 1947, // Your bondage is at an end, Doom'rel. I challenge you!
|
||||
SAY_DOOMREL_HELLO = 2601, // Our fate is the doom of all who face the Great Fire.
|
||||
SAY_QUEST_ACCEPTED = 2604, // You wish to learn the old craft? You wish to smelt dark iron?$B$BAppease me, $r. Show me a sacrifice and I will consider it!
|
||||
SAY_QUEST_COMPLETED = 2605, // Your will is strong, and your intent is clear.$B$BPerhaps you are worthy...
|
||||
SAY_QUEST_COMPLETED_END = 2606, // You have shown me your desire, and have payed with precious stone. I will teach you...
|
||||
GOSSIP_GLOOMREL_CONTINUE_SMELT = 1952,
|
||||
GOSSIP_GLOOMREL_CONTINUE_CHALICE = 1953,
|
||||
GOSSIP_DOOMREL_CONTINUE = 1950,
|
||||
};
|
||||
|
||||
struct boss_gloomrel : public ScriptedAI
|
||||
{
|
||||
boss_gloomrel(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override
|
||||
void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
if (gossipListId != 0)
|
||||
return;
|
||||
|
||||
if (menuId == GOSSIP_GLOOMREL_CONTINUE_SMELT)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
AddGossipItemFor(player, GOSSIP_TEXT_CONTINUE, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
SendGossipMenuFor(player, SAY_QUEST_COMPLETED_END, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
CloseGossipMenuFor(player);
|
||||
player->CastSpell(player, SPELL_LEARN_SMELT, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
AddGossipItemFor(player, GOSSIP_TEXT_CONTINUE, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
SendGossipMenuFor(player, SAY_QUEST_ACCEPTED, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
CloseGossipMenuFor(player);
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE * 5);
|
||||
break;
|
||||
CloseGossipMenuFor(player);
|
||||
player->CastSpell(player, SPELL_LEARN_SMELT, false);
|
||||
}
|
||||
}
|
||||
|
||||
void sGossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !player->HasSpell(SPELL_SMELT_DARK_IRON))
|
||||
else if (menuId == GOSSIP_GLOOMREL_CONTINUE_CHALICE)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_GROOMREL, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, SAY_QUEST_COMPLETED, me->GetGUID());
|
||||
CloseGossipMenuFor(player);
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE * 5);
|
||||
}
|
||||
|
||||
if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN)
|
||||
AddGossipItemFor(player, GOSSIP_GROOMREL, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -126,32 +90,19 @@ struct boss_doomrel : public ScriptedAI
|
|||
EventMap _events;
|
||||
bool Voidwalkers;
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override
|
||||
void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
if (menuId == GOSSIP_DOOMREL_CONTINUE && gossipListId == 0)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
AddGossipItemFor(player, GOSSIP_TEXT_CONTINUE, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, SAY_QUEST_COMPLETED, me->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
CloseGossipMenuFor(player);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
// Start encounter
|
||||
if (instance)
|
||||
instance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS);
|
||||
Talk(SAY_START_FIGHT);
|
||||
break;
|
||||
CloseGossipMenuFor(player);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
// Start encounter
|
||||
if (instance)
|
||||
instance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS);
|
||||
Talk(SAY_START_FIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
void sGossipHello(Player* player) override
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_DOOMREL_START_COMBAT, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, SAY_DOOMREL_HELLO, me->GetGUID());
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Voidwalkers = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue