diff options
| author | Tereneckla <Tereneckla@pm.me> | 2025-06-05 14:43:35 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-05 11:43:35 -0300 |
| commit | fe2d1150b38860abcd81eb2e60a30cd57381ddd6 (patch) | |
| tree | 5ee4ddd0745ee4aca44fa8740076e752c291b49e /src/server/scripts | |
| parent | 2a93e7d410a0a9a2147cdf50c2949306650f9796 (diff) | |
fix(Core/LFG): Lock Deathknights from the dungeonfinder until they complete their starting zone (#22270)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp | 22 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_orgrimmar.cpp | 27 |
2 files changed, 40 insertions, 9 deletions
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index 103c17bb93..437b508c86 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -472,10 +472,32 @@ public: } }; +enum KingVarianWrynn : uint32 +{ + // Deathknight Starting Zone End + QUEST_WHERE_KINGS_WALK = 13188, +}; + +class npc_king_varian_wrynn : public CreatureScript +{ +public: + npc_king_varian_wrynn() : CreatureScript("npc_king_varian_wrynn") { } + + bool OnQuestReward(Player* player, Creature* /*creature*/, Quest const* quest, uint32 /*item*/) override + { + + if (quest->GetQuestId() == QUEST_WHERE_KINGS_WALK) + sLFGMgr->InitializeLockedDungeons(player); + + return true; + } +}; + void AddSC_stormwind_city() { new npc_tyrion(); new npc_tyrion_spybot(); new npc_lord_gregor_lescovar(); new npc_marzon_silent_blade(); + new npc_king_varian_wrynn(); } diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index 8646a412b2..e3dfbe6931 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "TaskScheduler.h" +#include "LFGMgr.h" /*###### ## npc_shenthul @@ -152,9 +153,12 @@ enum ThrallWarchief : uint32 GO_UNADORNED_SPIKE = 175787, // What the Wind Carries (ID: 6566) - QUEST_WHAT_THE_WIND_CARRIES = 6566, - GOSSIP_MENU_THRALL = 3664, - GOSSIP_RESPONSE_THRALL_FIRST = 5733, + QUEST_WHAT_THE_WIND_CARRIES = 6566, + GOSSIP_MENU_THRALL = 3664, + GOSSIP_RESPONSE_THRALL_FIRST = 5733, + + // Deathknight Starting Zone End + QUEST_WARCHIEFS_BLESSING = 13189, }; const Position heraldOfThrallPos = { -462.404f, -2637.68f, 96.0656f, 5.8606f }; @@ -204,14 +208,19 @@ public: return true; } - bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) override + bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 /*item*/) override { - if (quest->GetQuestId() == QUEST_FOR_THE_HORDE) + switch (quest->GetQuestId()) { - if (creature && creature->AI()) - { - creature->AI()->DoAction(ACTION_START_TALKING); - } + case (QUEST_FOR_THE_HORDE): + if (creature && creature->AI()) + creature->AI()->DoAction(ACTION_START_TALKING); + break; + case (QUEST_WARCHIEFS_BLESSING): + sLFGMgr->InitializeLockedDungeons(player); + break; + default: + break; } return true; |
