mod-congrats-on-level/conf/mod_congratsonlevel.conf.dist
Claude 0ad5f1d345
Some checks failed
core-build / build (pull_request) Has been cancelled
fix: skip playerbots so bot re-rolls do not spam the server
PlayerbotFactory calls Player::GiveLevel() in six places while randomising a
bot, and GiveLevel fires OnPlayerLevelChanged exactly as a real ding does. On
a Playerbots realm that means every bot re-roll past level 10/20/.../80 sends
a server-wide broadcast plus a raid warning and hands the bot gold and two
reward items. Turning off CongratsPerLevel.Enable does not help: the
reward-level announcements sit outside that gate.

Adds Congrats.SkipBots (default 1). The bot test is guarded by
#ifdef MOD_PLAYERBOTS, which the core defines for every module when
mod-playerbots is present, so a core built without it is unaffected.

Also adds the missing `override` on OnPlayerLogin. The signature already
matched the base, so behaviour is unchanged -- it just stops a future
signature change from silently detaching the hook.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019vTNrJGsprcjdjjjDJD5ZM
2026-09-03 17:21:11 +00:00

30 lines
787 B
Text

[worldserver]
#############################
# CONGRATS ON LEVEL-UP
#############################
# Enable the module? (1: true | 0: false)
Congrats.Enable = 1
# Enable the Per level congratulations announcement (1: true | 0: false)
CongratsPerLevel.Enable = 1
# Announce the module when the player logs in?
Congrats.Announce = 1
# ID Acore String Message
Congrats.Acore.String.ID = 60000
# Ignore Playerbots entirely? (1: true | 0: false)
#
# PlayerbotFactory calls Player::GiveLevel() whenever it randomises a bot, which fires
# the same level-changed hook a real ding does. With this off, every bot re-roll past a
# reward level broadcasts to the whole server and hands the bot gold and items.
# Has no effect on a core built without mod-playerbots.
Congrats.SkipBots = 1