feature(World/Config): Implement MaxWhoListReturns (#3127)

This commit is contained in:
Kitzunu
2020-08-04 22:36:01 +02:00
committed by GitHub
parent 5fc0dca3ca
commit 64778f8dec
3 changed files with 6 additions and 2 deletions

View File

@@ -390,7 +390,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
// 49 is maximum player count sent to client - can be overridden
// through config, but is unstable
if ((matchcount++) >= 50 /*sWorld->getIntConfig(CONFIG_MAX_WHO)*/)
if ((matchcount++) >= sWorld->getIntConfig(CONFIG_MAX_WHO_LIST_RETURN))
continue;
data << pname; // player name
@@ -408,7 +408,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
data.put(4, matchcount); // insert right count, count of matches
SendPacket(&data);
;// sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Send SMSG_WHO Message");
// sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Send SMSG_WHO Message");
}

View File

@@ -750,8 +750,11 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARTER_COST_ARENA_3v3] = sConfigMgr->GetIntDefault("ArenaTeam.CharterCost.3v3", 1200000);
m_int_configs[CONFIG_CHARTER_COST_ARENA_5v5] = sConfigMgr->GetIntDefault("ArenaTeam.CharterCost.5v5", 2000000);
m_int_configs[CONFIG_MAX_WHO_LIST_RETURN] = sConfigMgr->GetIntDefault("MaxWhoListReturns", 49);
m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled", 0);
m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled.RaceMask", 0);
m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled.ClassMask", 0);
m_int_configs[CONFIG_CHARACTERS_PER_REALM] = sConfigMgr->GetIntDefault("CharactersPerRealm", 10);

View File

@@ -369,6 +369,7 @@ enum WorldIntConfigs
CONFIG_CHARTER_COST_ARENA_2v2,
CONFIG_CHARTER_COST_ARENA_3v3,
CONFIG_CHARTER_COST_ARENA_5v5,
CONFIG_MAX_WHO_LIST_RETURN,
CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER,
INT_CONFIG_VALUE_COUNT
};