mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
feat(Core/debug): Add commad to debug lfg (#6638)
* feat(Core/debug): Add commad to debug lfg * Update LFGMgr.h * Update rev_1624914323095978900.sql * Code review fixes Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK))
|
||||
LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(false)
|
||||
{
|
||||
new LFGPlayerScript();
|
||||
new LFGGroupScript();
|
||||
@@ -768,6 +768,12 @@ namespace lfg
|
||||
}*/
|
||||
}
|
||||
|
||||
void LFGMgr::ToggleTesting()
|
||||
{
|
||||
m_Testing = !m_Testing;
|
||||
sWorld->SendWorldText(m_Testing ? LANG_DEBUG_LFG_ON : LANG_DEBUG_LFG_OFF);
|
||||
}
|
||||
|
||||
/**
|
||||
Leaves Dungeon System. Player/Group is removed from queue, rolechecks, proposals
|
||||
or votekicks. Player or group needs to be not nullptr and using Dungeon System
|
||||
@@ -1645,7 +1651,11 @@ namespace lfg
|
||||
if ((randomDungeon || selectedRandomLfgDungeon(player->GetGUID())) && !player->HasAura(LFG_SPELL_DUNGEON_COOLDOWN))
|
||||
{
|
||||
randomDungeon = true;
|
||||
player->AddAura(LFG_SPELL_DUNGEON_COOLDOWN, player);
|
||||
// if player is debugging, don't add dungeon cooldown
|
||||
if (!m_Testing)
|
||||
{
|
||||
player->AddAura(LFG_SPELL_DUNGEON_COOLDOWN, player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->GetMapId() == uint32(dungeon->map))
|
||||
@@ -1723,7 +1733,7 @@ namespace lfg
|
||||
if (itPlayers->second.accept != LFG_ANSWER_AGREE) // No answer (-1) or not accepted (0)
|
||||
allAnswered = false;
|
||||
|
||||
if (!allAnswered)
|
||||
if (!m_Testing && !allAnswered)
|
||||
{
|
||||
for (LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
|
||||
SendLfgUpdateProposal(it->first, proposal);
|
||||
|
||||
Reference in New Issue
Block a user