diff --git a/src/server/game/Scenarios/ScenarioMgr.cpp b/src/server/game/Scenarios/ScenarioMgr.cpp index c1c4b88e..cefcfd9b 100644 --- a/src/server/game/Scenarios/ScenarioMgr.cpp +++ b/src/server/game/Scenarios/ScenarioMgr.cpp @@ -43,7 +43,15 @@ InstanceScenario* ScenarioMgr::CreateInstanceScenarioForTeam(InstanceMap* map, T auto dbDataItr = _scenarioDBData.find(std::make_pair(map->GetId(), map->GetDifficultyID())); // No scenario registered for this map and difficulty in the database if (dbDataItr == _scenarioDBData.end()) + { + // Several dungeons can share a map and difficulty, each with its own scenario (Torghast wings and layers) + if (Optional lfgDungeonsId = map->GetLfgDungeonsId()) + if (LFGDungeonsEntry const* dungeon = sLFGDungeonsStore.LookupEntry(*lfgDungeonsId)) + if (dungeon->ScenarioID) + return CreateInstanceScenario(map, dungeon->ScenarioID); + return nullptr; + } uint32 scenarioID = 0; switch (team) diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index 605e9cc3..8c52b139 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -416,7 +416,31 @@ private: ObjectGuid _morlenGUID; }; +// 1254519 - Mark Survivor (Wake of the Darkwell, quest 92520) +// The click spell's only effect is a dummy. Marking a survivor counts as killing it for the player: its own entry, +// its KillCredit entries and its creature labels (label 5590 "Other survivors recovered") give credit. The mages then +// take the survivor away, so it leaves shortly after. +class spell_isle_of_queldanas_mark_survivor : public SpellScript +{ + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Player* player = Object::ToPlayer(GetCaster()); + Creature* survivor = GetHitCreature(); + if (!player || !survivor) + return; + + player->KilledMonster(survivor); + survivor->DespawnOrUnsummon(2s); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_isle_of_queldanas_mark_survivor::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_isle_of_queldanas() { RegisterCreatureAI(npc_thalorien_dawnseeker); + RegisterSpellScript(spell_isle_of_queldanas_mark_survivor); }