Core/LFG: fixed random dungeon cooldown

Port From (https://github.com/TrinityCore/TrinityCore/commit/e88536f258dd187f1ee6855602501897138cf8b9)
This commit is contained in:
hondacrx
2021-11-02 14:06:31 -04:00
parent aebbc968eb
commit 430d163dee
+8 -2
View File
@@ -933,8 +933,14 @@ namespace Game.DungeonFinding
grp.SetLfgRoles(pguid, proposal.players.LookupByKey(pguid).role);
// Add the cooldown spell if queued for a random dungeon
if (dungeon.type == LfgType.RandomDungeon)
player.CastSpell(player, SharedConst.LFGSpellDungeonCooldown, false);
var dungeons = GetSelectedDungeons(player.GetGUID());
if (!dungeons.Empty())
{
uint rDungeonId = dungeons[0];
LFGDungeonData rDungeon = GetLFGDungeon(rDungeonId);
if (rDungeon != null && rDungeon.type == LfgType.RandomDungeon)
player.CastSpell(player, SharedConst.LFGSpellDungeonCooldown, false);
}
}
grp.SetDungeonDifficultyID(dungeon.difficulty);