mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
fix(Core/DungeonFinder): re-queueing being inside dungeon and member leaving DF (#7570)
- Closes #6790
This commit is contained in:
@@ -551,11 +551,12 @@ namespace lfg
|
||||
/// Sends queue status to player
|
||||
static void SendLfgQueueStatus(ObjectGuid guid, LfgQueueStatusData const& data);
|
||||
|
||||
void SetDungeon(ObjectGuid guid, uint32 dungeon);
|
||||
|
||||
private:
|
||||
TeamId GetTeam(ObjectGuid guid);
|
||||
void RestoreState(ObjectGuid guid, char const* debugMsg);
|
||||
void ClearState(ObjectGuid guid, char const* debugMsg);
|
||||
void SetDungeon(ObjectGuid guid, uint32 dungeon);
|
||||
void SetSelectedDungeons(ObjectGuid guid, LfgDungeonSet const& dungeons);
|
||||
void SetLockedDungeons(ObjectGuid guid, LfgLockMap const& lock);
|
||||
void DecreaseKicksLeft(ObjectGuid guid);
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace lfg
|
||||
|
||||
bool isLFG = group->isLFGGroup();
|
||||
LfgState state = sLFGMgr->GetState(gguid);
|
||||
uint32 dungeonId = sLFGMgr->GetDungeon(gguid, false);
|
||||
|
||||
// If group is being formed after proposal success do nothing more
|
||||
if (state == LFG_STATE_PROPOSAL && method == GROUP_REMOVEMETHOD_DEFAULT)
|
||||
@@ -205,6 +206,15 @@ namespace lfg
|
||||
if (!isLFG)
|
||||
return;
|
||||
|
||||
if (state != LFG_STATE_FINISHED_DUNGEON && group) // Need more players to finish the dungeon
|
||||
{
|
||||
if (Player* leader = ObjectAccessor::FindConnectedPlayer(sLFGMgr->GetLeader(gguid)))
|
||||
{
|
||||
sLFGMgr->SetDungeon(gguid, dungeonId);
|
||||
leader->GetSession()->SendLfgOfferContinue(sLFGMgr->GetDungeon(gguid, false));
|
||||
}
|
||||
}
|
||||
|
||||
if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
|
||||
{
|
||||
// xinef: fixed dungeon deserter
|
||||
@@ -224,10 +234,6 @@ namespace lfg
|
||||
player->TeleportToEntryPoint();
|
||||
}
|
||||
}
|
||||
|
||||
if (state != LFG_STATE_FINISHED_DUNGEON) // Need more players to finish the dungeon
|
||||
if (Player* leader = ObjectAccessor::FindConnectedPlayer(sLFGMgr->GetLeader(gguid)))
|
||||
leader->GetSession()->SendLfgOfferContinue(sLFGMgr->GetDungeon(gguid, false));
|
||||
}
|
||||
|
||||
void LFGGroupScript::OnDisband(Group* group)
|
||||
|
||||
Reference in New Issue
Block a user