diff options
Diffstat (limited to 'src/server/game/DungeonFinding/LFGMgr.cpp')
-rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 37f90c6e006..bb2a18d15ee 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -981,8 +981,14 @@ void LFGMgr::MakeNewGroup(LfgProposal const& proposal) grp->SetLfgRoles(pguid, proposal.players.find(pguid)->second.role); // Add the cooldown spell if queued for a random dungeon - if (dungeon->type == LFG_TYPE_RANDOM) - player->CastSpell(player, LFG_SPELL_DUNGEON_COOLDOWN, false); + LfgDungeonSet const& dungeons = GetSelectedDungeons(player->GetGUID()); + if (!dungeons.empty()) + { + uint32 rDungeonId = (*dungeons.begin()); + LFGDungeonData const* dungeon = GetLFGDungeon(rDungeonId); + if (dungeon && dungeon->type == LFG_TYPE_RANDOM) + player->CastSpell(player, LFG_SPELL_DUNGEON_COOLDOWN, false); + } } ASSERT(grp); |