fix(DB/Gossip): add restore 'Keys to the Focusing Iris' option (#25228)
Co-authored-by: avarishd <46330494+avarishd@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
--
|
||||
-- Alexstrasza the Life-Binder (Dragonblight) - Add Focusing Iris key menu_option. (Previously empty)
|
||||
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 10192;
|
||||
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
|
||||
(10192, 0, 0, 'Oh great Queen of the Dragons, I have somehow misplaced my Key to the Focusing Iris. Can you find it for me?', 32832, 1, 1, 0, 0, 0, 0, '', 0, 0),
|
||||
(10192, 1, 0, 'Oh great Queen of the Dragons, I have somehow misplaced my Heroic Key to the Focusing Iris. Can you find it for me?', 32836, 1, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 10192) AND (`SourceEntry` IN (0, 1)) AND (`SourceId` = 0);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, 10192, 0, 0, 0, 8, 0, 13372, 0, 0, 0, 0, 0, '', 'must have completed Quest \'The Key to the Focusing Iris\''),
|
||||
(15, 10192, 0, 0, 0, 2, 0, 44582, 1, 1, 1, 0, 0, '', 'must not have item \'Key to the Focusing Iris\''),
|
||||
(15, 10192, 1, 0, 0, 8, 0, 13375, 0, 0, 0, 0, 0, '', 'must have completed Quest \'The Heroic Key to the Focusing Iris\''),
|
||||
(15, 10192, 1, 0, 0, 2, 0, 44581, 1, 1, 1, 0, 0, '', 'must not have item \'Heroic Key to the Focusing Iris\'');
|
||||
|
||||
UPDATE `spell_dbc` SET `Targets` = 1, `Effect_1` = 24, `EffectBasePoints_1` = 1, `EffectItemType_1` = 44582 WHERE (`ID` = 60989);
|
||||
UPDATE `spell_dbc` SET `Targets` = 1, `Effect_1` = 24, `EffectBasePoints_1` = 1, `EffectItemType_1` = 44581 WHERE (`ID` = 60992);
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuras.h"
|
||||
|
||||
enum Orphans
|
||||
@@ -628,9 +629,33 @@ private:
|
||||
/*######
|
||||
## npc_cw_alexstrasza_trigger
|
||||
######*/
|
||||
enum eAlexstrasza
|
||||
{
|
||||
SPELL_KEY_TO_FOCUSING_IRIS = 60989,
|
||||
SPELL_HEROIC_KEY_TO_FOCUSING_IRIS = 60992,
|
||||
};
|
||||
|
||||
struct npc_alexstraza_the_lifebinder : public ScriptedAI
|
||||
{
|
||||
npc_alexstraza_the_lifebinder(Creature* creature) : ScriptedAI(creature) {}
|
||||
explicit npc_alexstraza_the_lifebinder(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case 0:
|
||||
CloseGossipMenuFor(player);
|
||||
player->CastSpell(player, SPELL_KEY_TO_FOCUSING_IRIS, false);
|
||||
break;
|
||||
case 1:
|
||||
CloseGossipMenuFor(player);
|
||||
player->CastSpell(player, SPELL_HEROIC_KEY_TO_FOCUSING_IRIS, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -653,6 +678,8 @@ struct npc_alexstraza_the_lifebinder : public ScriptedAI
|
||||
case 2:
|
||||
me->SetOrientation(me->GetHomePosition().GetOrientation());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -767,8 +794,8 @@ struct npc_alexstraza_the_lifebinder : public ScriptedAI
|
||||
}
|
||||
|
||||
private:
|
||||
int8 phase;
|
||||
uint32 timer;
|
||||
int8 phase{};
|
||||
uint32 timer{};
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user