mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Dungeon Finder: Some optimizations.
- Store teleport coordinates to avoid recalculations each time someone has to be teleported - Correct teleport error msg when player is charming or using vehicle - Internal changes in storage types - Proper code for missing achievement lock type - Better debug msgs - Trying to get rid of "Player*" and "Group*" inside LFGMgr as much as possible (Step 1)
This commit is contained in:
@@ -2468,8 +2468,8 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
|
||||
if (group && group->isLFGGroup())
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
|
||||
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
|
||||
if (LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
|
||||
if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
|
||||
if (LFGDungeonEntry const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
|
||||
if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM))
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user