Skip to content

Commit

Permalink
Revert change to GetBots
Browse files Browse the repository at this point in the history
  • Loading branch information
celguar committed Dec 8, 2023
1 parent 301e29a commit 4b69b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions playerbot/RandomPlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ RandomPlayerbotMgr::RandomPlayerbotMgr() : PlayerbotHolder(), processTicks(0), l
guildsDeleted = false;
arenaTeamsDeleted = false;

list<uint32>& availableBots = GetBots();
list<uint32> availableBots = GetBots();

for (auto& bot : availableBots)
{
Expand Down Expand Up @@ -544,7 +544,7 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool minimal)
urand(sPlayerbotAIConfig.randomBotCountChangeMinInterval, sPlayerbotAIConfig.randomBotCountChangeMaxInterval));
}

list<uint32>& availableBots = GetBots();
list<uint32> availableBots = GetBots();
uint32 availableBotCount = availableBots.size();
uint32 onlineBotCount = playerBots.size();

Expand Down Expand Up @@ -2673,7 +2673,7 @@ bool RandomPlayerbotMgr::IsRandomBot(uint32 bot)
return GetEventValue(bot, "add");
}

list<uint32>& RandomPlayerbotMgr::GetBots()
list<uint32> RandomPlayerbotMgr::GetBots()
{
if (!currentBots.empty()) return currentBots;

Expand Down
2 changes: 1 addition & 1 deletion playerbot/RandomPlayerbotMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class RandomPlayerbotMgr : public PlayerbotHolder
uint32 GetEventValue(uint32 bot, string event);
string GetEventData(uint32 bot, string event);
uint32 SetEventValue(uint32 bot, string event, uint32 value, uint32 validIn, string data = "");
list<uint32>& GetBots();
list<uint32> GetBots();
list<uint32> GetBgBots(uint32 bracket);
time_t BgCheckTimer;
time_t LfgCheckTimer;
Expand Down

0 comments on commit 4b69b8c

Please sign in to comment.