diff --git a/playerbot/RandomPlayerbotMgr.cpp b/playerbot/RandomPlayerbotMgr.cpp index cb7da54dd..2b4693b5b 100644 --- a/playerbot/RandomPlayerbotMgr.cpp +++ b/playerbot/RandomPlayerbotMgr.cpp @@ -292,7 +292,7 @@ RandomPlayerbotMgr::RandomPlayerbotMgr() : PlayerbotHolder(), processTicks(0), l guildsDeleted = false; arenaTeamsDeleted = false; - list& availableBots = GetBots(); + list availableBots = GetBots(); for (auto& bot : availableBots) { @@ -544,7 +544,7 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool minimal) urand(sPlayerbotAIConfig.randomBotCountChangeMinInterval, sPlayerbotAIConfig.randomBotCountChangeMaxInterval)); } - list& availableBots = GetBots(); + list availableBots = GetBots(); uint32 availableBotCount = availableBots.size(); uint32 onlineBotCount = playerBots.size(); @@ -2673,7 +2673,7 @@ bool RandomPlayerbotMgr::IsRandomBot(uint32 bot) return GetEventValue(bot, "add"); } -list& RandomPlayerbotMgr::GetBots() +list RandomPlayerbotMgr::GetBots() { if (!currentBots.empty()) return currentBots; diff --git a/playerbot/RandomPlayerbotMgr.h b/playerbot/RandomPlayerbotMgr.h index 3953c3ce4..b781e3089 100644 --- a/playerbot/RandomPlayerbotMgr.h +++ b/playerbot/RandomPlayerbotMgr.h @@ -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& GetBots(); + list GetBots(); list GetBgBots(uint32 bracket); time_t BgCheckTimer; time_t LfgCheckTimer;