From 2f2569d09a83bcd0e6573392dfbda16187847daf Mon Sep 17 00:00:00 2001 From: Nefertumm Date: Tue, 2 Nov 2021 12:37:13 -0300 Subject: [PATCH] fix(Core/Map): encounters list for heroic difficulties (#8224) --- src/server/game/Maps/Map.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 037ba3eb1..06d36e9a3 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3410,9 +3410,21 @@ void Map::DeleteRespawnTimesInDB(uint16 mapId, uint32 instanceId) void Map::UpdateEncounterState(EncounterCreditType type, uint32 creditEntry, Unit* source) { Difficulty difficulty_fixed = (IsSharedDifficultyMap(GetId()) ? Difficulty(GetDifficulty() % 2) : GetDifficulty()); - DungeonEncounterList const* encounters = sObjectMgr->GetDungeonEncounterList(GetId(), difficulty_fixed); + DungeonEncounterList const* encounters; + // 631 : ICC - 724 : Ruby Sanctum --- For heroic difficulties, for some reason, we don't have an encounter list, so we get the encounter list from normal diff. We shouldn't change difficulty_fixed variable. + if ((GetId() == 631 || GetId() == 724) && IsHeroic()) + { + encounters = sObjectMgr->GetDungeonEncounterList(GetId(), !Is25ManRaid() ? RAID_DIFFICULTY_10MAN_NORMAL : RAID_DIFFICULTY_25MAN_NORMAL); + } + else + { + encounters = sObjectMgr->GetDungeonEncounterList(GetId(), difficulty_fixed); + } + if (!encounters) + { return; + } uint32 dungeonId = 0; bool updated = false;