mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +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
|
/// Sends queue status to player
|
||||||
static void SendLfgQueueStatus(ObjectGuid guid, LfgQueueStatusData const& data);
|
static void SendLfgQueueStatus(ObjectGuid guid, LfgQueueStatusData const& data);
|
||||||
|
|
||||||
|
void SetDungeon(ObjectGuid guid, uint32 dungeon);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TeamId GetTeam(ObjectGuid guid);
|
TeamId GetTeam(ObjectGuid guid);
|
||||||
void RestoreState(ObjectGuid guid, char const* debugMsg);
|
void RestoreState(ObjectGuid guid, char const* debugMsg);
|
||||||
void ClearState(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 SetSelectedDungeons(ObjectGuid guid, LfgDungeonSet const& dungeons);
|
||||||
void SetLockedDungeons(ObjectGuid guid, LfgLockMap const& lock);
|
void SetLockedDungeons(ObjectGuid guid, LfgLockMap const& lock);
|
||||||
void DecreaseKicksLeft(ObjectGuid guid);
|
void DecreaseKicksLeft(ObjectGuid guid);
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ namespace lfg
|
|||||||
|
|
||||||
bool isLFG = group->isLFGGroup();
|
bool isLFG = group->isLFGGroup();
|
||||||
LfgState state = sLFGMgr->GetState(gguid);
|
LfgState state = sLFGMgr->GetState(gguid);
|
||||||
|
uint32 dungeonId = sLFGMgr->GetDungeon(gguid, false);
|
||||||
|
|
||||||
// If group is being formed after proposal success do nothing more
|
// If group is being formed after proposal success do nothing more
|
||||||
if (state == LFG_STATE_PROPOSAL && method == GROUP_REMOVEMETHOD_DEFAULT)
|
if (state == LFG_STATE_PROPOSAL && method == GROUP_REMOVEMETHOD_DEFAULT)
|
||||||
@@ -205,6 +206,15 @@ namespace lfg
|
|||||||
if (!isLFG)
|
if (!isLFG)
|
||||||
return;
|
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))
|
if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
|
||||||
{
|
{
|
||||||
// xinef: fixed dungeon deserter
|
// xinef: fixed dungeon deserter
|
||||||
@@ -224,10 +234,6 @@ namespace lfg
|
|||||||
player->TeleportToEntryPoint();
|
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)
|
void LFGGroupScript::OnDisband(Group* group)
|
||||||
|
|||||||
Reference in New Issue
Block a user