mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Core/DungeonFinder): Fixed joining to LFG dungeon if there is alr… (#10062)
* fix(Core/DungeonFinder): Fixed joining to LFG dungeon if there is already a LFG group inside it.iterator Fixes #9824 * Buildfix.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
namespace lfg
|
||||
{
|
||||
LfgGroupData::LfgGroupData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NONE),
|
||||
m_Dungeon(0), m_KicksLeft(sWorld->getIntConfig(CONFIG_LFG_MAX_KICK_COUNT))
|
||||
m_Dungeon(0), _isLFGGroup(false), m_KicksLeft(sWorld->getIntConfig(CONFIG_LFG_MAX_KICK_COUNT))
|
||||
{ }
|
||||
|
||||
LfgGroupData::~LfgGroupData()
|
||||
@@ -30,11 +30,23 @@ namespace lfg
|
||||
|
||||
bool LfgGroupData::IsLfgGroup()
|
||||
{
|
||||
return m_OldState != LFG_STATE_NONE;
|
||||
return _isLFGGroup;
|
||||
}
|
||||
|
||||
void LfgGroupData::SetState(LfgState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case LFG_STATE_DUNGEON:
|
||||
_isLFGGroup = true;
|
||||
break;
|
||||
case LFG_STATE_FINISHED_DUNGEON:
|
||||
_isLFGGroup = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case LFG_STATE_NONE:
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace lfg
|
||||
LfgGuidSet m_Players; ///< Players in group
|
||||
// Dungeon
|
||||
uint32 m_Dungeon; ///< Dungeon entry
|
||||
bool _isLFGGroup;
|
||||
// Vote Kick
|
||||
uint8 m_KicksLeft; ///< Number of kicks left
|
||||
};
|
||||
|
||||
@@ -407,7 +407,7 @@ namespace lfg
|
||||
}
|
||||
|
||||
proposal.queues = strGuids;
|
||||
proposal.isNew = numLfgGroups != 1 || sLFGMgr->GetOldState(proposal.group) != LFG_STATE_DUNGEON;
|
||||
proposal.isNew = numLfgGroups != 1;
|
||||
|
||||
if (!sLFGMgr->AllQueued(check)) // can't create proposal
|
||||
return LFG_COMPATIBILITY_PENDING;
|
||||
|
||||
Reference in New Issue
Block a user