Game/MiscHandler: max matchcount for SMSG_WHO is now configurable
This commit is contained in:
parent
7c63aee64a
commit
9b2cc69612
@ -289,8 +289,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recv_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 49 is maximum player count sent to client
|
// 49 is maximum player count sent to client
|
||||||
++matchcount;
|
if (++matchcount > 49)
|
||||||
if (matchcount > 49)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -305,6 +304,11 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recv_data)
|
|||||||
data << uint32(pzoneid); // player zone id
|
data << uint32(pzoneid); // player zone id
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (sWorld.getConfig(CONFIG_UINT32_MAX_WHOLIST_RETURNS) && matchcount > sWorld.getConfig(CONFIG_UINT32_MAX_WHOLIST_RETURNS))
|
||||||
|
{
|
||||||
|
matchcount = sWorld.getConfig(CONFIG_UINT32_MAX_WHOLIST_RETURNS);
|
||||||
|
}
|
||||||
|
|
||||||
data.put(0, displaycount); // insert right count, count displayed
|
data.put(0, displaycount); // insert right count, count displayed
|
||||||
data.put(4, matchcount); // insert right count, count of matches
|
data.put(4, matchcount); // insert right count, count of matches
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
setConfig(CONFIG_BOOL_ADDON_CHANNEL, "AddonChannel", true);
|
setConfig(CONFIG_BOOL_ADDON_CHANNEL, "AddonChannel", true);
|
||||||
setConfig(CONFIG_BOOL_CLEAN_CHARACTER_DB, "CleanCharacterDB", true);
|
setConfig(CONFIG_BOOL_CLEAN_CHARACTER_DB, "CleanCharacterDB", true);
|
||||||
setConfig(CONFIG_BOOL_GRID_UNLOAD, "GridUnload", true);
|
setConfig(CONFIG_BOOL_GRID_UNLOAD, "GridUnload", true);
|
||||||
|
setConfig(CONFIG_UINT32_MAX_WHOLIST_RETURNS, "MaxWhoListReturns", 49);
|
||||||
setConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL, "AutoBroadcast", 600);
|
setConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL, "AutoBroadcast", 600);
|
||||||
|
|
||||||
if (getConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL) > 0)
|
if (getConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL) > 0)
|
||||||
|
@ -188,6 +188,7 @@ enum eConfigUInt32Values
|
|||||||
CONFIG_UINT32_GUID_RESERVE_SIZE_CREATURE,
|
CONFIG_UINT32_GUID_RESERVE_SIZE_CREATURE,
|
||||||
CONFIG_UINT32_GUID_RESERVE_SIZE_GAMEOBJECT,
|
CONFIG_UINT32_GUID_RESERVE_SIZE_GAMEOBJECT,
|
||||||
CONFIG_UINT32_CREATURE_RESPAWN_AGGRO_DELAY,
|
CONFIG_UINT32_CREATURE_RESPAWN_AGGRO_DELAY,
|
||||||
|
CONFIG_UINT32_MAX_WHOLIST_RETURNS,
|
||||||
CONFIG_UINT32_LOG_WHISPERS,
|
CONFIG_UINT32_LOG_WHISPERS,
|
||||||
// Warden
|
// Warden
|
||||||
CONFIG_UINT32_WARDEN_CLIENT_RESPONSE_DELAY,
|
CONFIG_UINT32_WARDEN_CLIENT_RESPONSE_DELAY,
|
||||||
|
@ -207,6 +207,10 @@ BindIP = "0.0.0.0"
|
|||||||
# Default: 1 (Enable)
|
# Default: 1 (Enable)
|
||||||
# 0 (Disabled)
|
# 0 (Disabled)
|
||||||
#
|
#
|
||||||
|
# MaxWhoListReturns
|
||||||
|
# Set the max number of players returned in the /who list and interface (0 means unlimited)
|
||||||
|
# Default: 49 - (stable)
|
||||||
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
UseProcessors = 0
|
UseProcessors = 0
|
||||||
@ -236,6 +240,7 @@ UpdateUptimeInterval = 10
|
|||||||
MaxCoreStuckTime = 0
|
MaxCoreStuckTime = 0
|
||||||
AddonChannel = 1
|
AddonChannel = 1
|
||||||
CleanCharacterDB = 1
|
CleanCharacterDB = 1
|
||||||
|
MaxWhoListReturns = 49
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# SERVER LOGGING
|
# SERVER LOGGING
|
||||||
|
Loading…
x
Reference in New Issue
Block a user