mirror of
https://github.com/kadeshar/mod-player-bot-level-brackets.git
synced 2026-01-13 01:08:36 +00:00
Fixing some issues with tables
This commit is contained in:
@@ -406,15 +406,11 @@ static void UpdatePersistentGuildTracker()
|
|||||||
// Use the same approach as LoadRealPlayerGuildIds - iterate through all players
|
// Use the same approach as LoadRealPlayerGuildIds - iterate through all players
|
||||||
std::unordered_set<uint32> currentRealPlayerGuilds;
|
std::unordered_set<uint32> currentRealPlayerGuilds;
|
||||||
|
|
||||||
// Get all players using standard AzerothCore method
|
// Get all players using ObjectAccessor (same as LoadRealPlayerGuildIds)
|
||||||
SessionMap const& sessions = sWorld->GetAllSessions();
|
const auto& allPlayers = ObjectAccessor::GetPlayers();
|
||||||
for (SessionMap::const_iterator itr = sessions.begin(); itr != sessions.end(); ++itr)
|
for (const auto& itr : allPlayers)
|
||||||
{
|
{
|
||||||
WorldSession* session = itr->second;
|
Player* player = itr.second;
|
||||||
if (!session)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Player* player = session->GetPlayer();
|
|
||||||
if (!player || !player->IsInWorld())
|
if (!player || !player->IsInWorld())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user