Skip to content

Commit

Permalink
-Compile fix: Temporary disable LFG for tbc to compile source.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Sep 11, 2024
1 parent 89f5610 commit f2d0f1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 1 addition & 5 deletions playerbot/PlayerbotSecurity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ PlayerbotSecurityLevel PlayerbotSecurity::LevelFor(Player* from, DenyReason* rea
}

#ifdef MANGOSBOT_ONE
if (bot->GetPlayerbotAI()->HasRealPlayerMaster() && !bot->m_lookingForGroup.isEmpty() &&
(!bot->m_lookingForGroup.group[0].empty() && bot->m_lookingForGroup.group[0].type == LFG_TYPE_DUNGEON ||
(!bot->m_lookingForGroup.group[1].empty() && bot->m_lookingForGroup.group[1].type == LFG_TYPE_DUNGEON) ||
(!bot->m_lookingForGroup.group[2].empty() && bot->m_lookingForGroup.group[2].type == LFG_TYPE_DUNGEON) ||
(!bot->m_lookingForGroup.more.empty() && bot->m_lookingForGroup.more.type == LFG_TYPE_DUNGEON)))
if (bot->GetPlayerbotAI()->HasRealPlayerMaster() && bot->GetSession()->m_lfgInfo.queued)
#endif
#ifdef MANGOSBOT_ZERO
if (sWorld.GetLFGQueue().IsPlayerInQueue(bot->GetObjectGuid()))
Expand Down
8 changes: 6 additions & 2 deletions playerbot/RandomPlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
#endif

#ifdef MANGOSBOT_ONE
/* todo: Fix with new system
WorldSafeLocsEntry const* ClosestGrave = player->GetMap()->GetGraveyardManager().GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam());
uint32 zoneId = ClosestGrave ? ClosestGrave->ID : 0;
Expand All @@ -1434,7 +1435,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
{
if (group->IsLeader(player->GetObjectGuid()))
{
if (!player->m_lookingForGroup.more.empty() && player->GetSession()->LookingForGroup_auto_add && player->m_lookingForGroup.more.isAuto())
if (player->GetSession()->m_lfgInfo.queued && player->GetSession()->LookingForGroup_auto_add && player->m_lookingForGroup.more.isAuto())
{
uint32 lfgType = (zoneId << 16) | ((1 << 8) | uint8(player->m_lookingForGroup.more.entry));
LfgDungeons[player->GetTeam()].push_back(lfgType);
Expand All @@ -1459,6 +1460,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
isLFG = true;
}
}
*/
#endif

#ifdef MANGOSBOT_TWO
Expand Down Expand Up @@ -1499,6 +1501,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
}

#ifdef MANGOSBOT_ONE
/* todo: Fix with new system
ForEachPlayerbot([&](Player* bot)
{
if (!bot || !bot->IsInWorld())
Expand All @@ -1515,7 +1518,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
{
if (group->IsLeader(bot->GetObjectGuid()))
{
if (!bot->m_lookingForGroup.more.empty() && bot->GetSession()->LookingForGroup_auto_add && bot->m_lookingForGroup.more.isAuto())
if (bot->GetSession()->m_lfgInfo.queued && bot->GetSession()->m_lfgInfo.autofill)
{
uint32 lfgType = (zoneId << 16) | ((1 << 8) | uint8(bot->m_lookingForGroup.more.entry));
LfgDungeons[bot->GetTeam()].push_back(lfgType);
Expand All @@ -1531,6 +1534,7 @@ void RandomPlayerbotMgr::CheckLfgQueue()
}
}
});
*/
#endif

if (LfgDungeons[ALLIANCE].size() || LfgDungeons[HORDE].size())
Expand Down
4 changes: 4 additions & 0 deletions playerbot/strategy/actions/LfgActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ bool LfgLeaveAction::Execute(Event& event)
}
#endif
#ifdef MANGOSBOT_ONE
/* todo: Fix with new system
bool isLFG = false;
bool isLFM = false;
for (int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
Expand All @@ -1097,6 +1098,7 @@ bool LfgLeaveAction::Execute(Event& event)
p << empty;
bot->GetSession()->HandleSetLfgCommentOpcode(p);
}
*/
#endif
#ifdef MANGOSBOT_TWO
// Don't leave if already invited / in dungeon
Expand Down Expand Up @@ -1216,6 +1218,7 @@ bool LfgJoinAction::isUseful()
return false;
#endif
#ifdef MANGOSBOT_ONE
/* todo: Fix with new system
bool isLFG = false;
bool isLFM = false;
for (int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
Expand All @@ -1227,6 +1230,7 @@ bool LfgJoinAction::isUseful()
if ((isLFG || isLFM) && sRandomPlayerbotMgr.LfgDungeons[bot->GetTeam()].empty())
return false;
*/
#endif
#ifdef MANGOSBOT_TWO
if (sRandomPlayerbotMgr.LfgDungeons[bot->GetTeam()].empty())
Expand Down

0 comments on commit f2d0f1e

Please sign in to comment.