Core/LFG: Fix LFG GS requirement not updated until relog

Fix Player receiving "You do not meet the requirements for the chosen dungeons" for too low Gear Score level even after equipping items with high enough Gear Score.
This commit is contained in:
jackpoz
2014-04-25 00:13:48 +02:00
parent b4c62ce5b6
commit ab1d0512ea
6 changed files with 62 additions and 115 deletions

View File

@@ -34,14 +34,6 @@ namespace lfg
LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") { }
void LFGPlayerScript::OnLevelChanged(Player* player, uint8 /*oldLevel*/)
{
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
return;
sLFGMgr->InitializeLockedDungeons(player);
}
void LFGPlayerScript::OnLogout(Player* player)
{
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
@@ -74,18 +66,10 @@ void LFGPlayerScript::OnLogin(Player* player)
}
}
sLFGMgr->InitializeLockedDungeons(player);
sLFGMgr->SetTeam(player->GetGUID(), player->GetTeam());
/// @todo - Restore LfgPlayerData and send proper status to player if it was in a group
}
void LFGPlayerScript::OnBindToInstance(Player* player, Difficulty difficulty, uint32 mapId, bool /*permanent*/)
{
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
if (mapEntry->IsDungeon() && difficulty > DUNGEON_DIFFICULTY_NORMAL)
sLFGMgr->InitializeLockedDungeons(player);
}
void LFGPlayerScript::OnMapChanged(Player* player)
{
Map const* map = player->GetMap();