From 2af716c0d452b11de469bdc4eee5891a424b2a10 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Thu, 29 Apr 2021 17:02:55 +0200 Subject: [PATCH] Core/Instances: use the map expansion id to determine the needed level to award guild challenges and be worthy of guild news --- src/server/game/Instances/InstanceScript.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 41e11cd63d9..0e00f8ddbd5 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -789,17 +789,14 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi } // Reward eligible guild challenges - LFGDungeonEntry const* entry = sLFGDungeonStore.LookupEntry(dungeonId); - if (!entry) - return; - + uint8 appropriateMaxLevel = DBCManager::GetMaxLevelForExpansion(sMapStore.AssertEntry(instance->GetId())->Expansion()); for (auto itr : minlevelByGuild) { Guild* guild = sGuildMgr->GetGuildById(itr.first); if (!guild) continue; - if (itr.second <= entry->Maxlevel) + if (itr.second <= appropriateMaxLevel) { if (Player* player = playersByGuild[itr.first]) {