Core/LFG: Remove dungeon cooldown when completing random dungeons

(cherry picked from commit 24fbbee4b9af7b5226772378dd83b78c103d969d)
This commit is contained in:
jackpoz
2021-12-02 23:45:29 +01:00
committed by Shauren
parent c22431936e
commit 97be87b7d5
+9 -1
View File
@@ -1451,12 +1451,20 @@ void LFGMgr::FinishDungeon(ObjectGuid gguid, const uint32 dungeonId, Map const*
}
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player || player->FindMap() != currMap)
if (!player)
{
TC_LOG_DEBUG("lfg.dungeon.finish", "Group: %s, Player: %s not found in world", gguid.ToString().c_str(), guid.ToString().c_str());
continue;
}
if (player->FindMap() != currMap)
{
TC_LOG_DEBUG("lfg.dungeon.finish", "Group: %s, Player: %s is in a different map", gguid.ToString().c_str(), guid.ToString().c_str());
continue;
}
player->RemoveAurasDueToSpell(LFG_SPELL_DUNGEON_COOLDOWN);
LFGDungeonData const* dungeonDone = GetLFGDungeon(dungeonId);
uint32 mapId = dungeonDone ? uint32(dungeonDone->map) : 0;