mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user