fix(Core/GroupHandler): Adjust maximum value for rolls. (#22686)

This commit is contained in:
Benjamin Jackson
2025-08-26 20:58:41 -04:00
committed by GitHub
parent de98f42411
commit 2ad40a4d23
4 changed files with 14 additions and 3 deletions

View File

@@ -3141,6 +3141,16 @@ LeaveGroupOnLogout.Enabled = 0
Group.Raid.LevelRestriction = 10
#
# Group.RandomRollMaximum
#
# The maximum value for use with the client '/roll' command.
# Blizzlike and maximum value is 1000000. (Based on Classic and 3.3.5a client testing respectively)
# Default: 1000000
#
Group.RandomRollMaximum = 1000000
#
###################################################################################################

View File

@@ -543,10 +543,8 @@ void WorldSession::HandleRandomRollOpcode(WorldPackets::Misc::RandomRollClient&
maximum = packet.Max;
/** error handling **/
if (minimum > maximum || maximum > 10000) // < 32768 for urand call
{
if (minimum > maximum || maximum > sWorld->getIntConfig(CONFIG_RANDOM_ROLL_MAXIMUM))
return;
}
GetPlayer()->DoRandomRoll(minimum, maximum);
}

View File

@@ -492,6 +492,8 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<bool>(CONFIG_LEAVE_GROUP_ON_LOGOUT, "LeaveGroupOnLogout.Enabled", false);
SetConfigValue<uint32>(CONFIG_RANDOM_ROLL_MAXIMUM, "Group.RandomRollMaximum", 1000000);
SetConfigValue<bool>(CONFIG_QUEST_POI_ENABLED, "QuestPOI.Enabled", true);
SetConfigValue<uint32>(CONFIG_CHANGE_FACTION_MAX_MONEY, "ChangeFaction.MaxMoney", 0);

View File

@@ -129,6 +129,7 @@ enum ServerConfigs
CONFIG_ALLOW_JOIN_BG_AND_LFG,
CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS,
CONFIG_LEAVE_GROUP_ON_LOGOUT,
CONFIG_RANDOM_ROLL_MAXIMUM,
CONFIG_QUEST_POI_ENABLED,
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD,