Core/Dungeon Finder: Simplify Spell Luck of the draw code
Core/Dungeon Finder: Partial recode of "group list" using existing Lfg functions
This commit is contained in:
1 parent
ffb4c63fe3
commit
f753c989f2
5 files changed
+77
-55
No files matched your search
@@ -2486,11 +2486,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
}
|
||||
|
||||
if (group && group->isLFGGroup())
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
|
||||
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
|
||||
if (LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
|
||||
if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
}
|
||||
|
||||
// for normal instances cancel the reset schedule when the
|
||||
|
||||
Reference in new issue
Block a user