Core/Dungeon Finder: Fix group (5) unable to do new dungeon after finished last dungeon

- Some optimizations here and there
- Drop unused columns related to dungeon rewards
- Simplify Group reward. All people inside the dungeon should get the reward, no matter how far it's from the boss
This commit is contained in:
Spp
2013-01-09 15:15:42 +01:00
parent ecfb762346
commit 677ed18080
13 changed files with 267 additions and 252 deletions

View File

@@ -107,20 +107,10 @@ void LFGGroupScript::OnAddMember(Group* group, uint64 guid)
LfgState gstate = sLFGMgr->GetState(gguid);
LfgState state = sLFGMgr->GetState(guid);
sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "] leader " UI64FMTD "] gstate: %u, state: %u", gguid, guid, leader, gstate, state);
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_UPDATE_STATUS);
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
if (Player* plrg = itr->getSource())
{
plrg->GetSession()->SendLfgUpdatePlayer(updateData);
plrg->GetSession()->SendLfgUpdateParty(updateData);
}
}
if (state == LFG_STATE_QUEUED)
sLFGMgr->LeaveLfg(guid);
// TODO - if group is queued and new player is added convert to rolecheck without notify the current players queued
if (gstate == LFG_STATE_QUEUED)
sLFGMgr->LeaveLfg(gguid);
}