fix: stale ZonePool default + add missing CHANGELOG entries

The hardcoded fallback default for GoldRush.ZonePool still used the
old ZoneName|AreaLabel format after the parser switched to
ZoneName|NodeEntries|BonusEntries. Not a crash risk (BuildNodeEntries
safely no-ops on non-numeric input) but stale and misleading. Cleared
to an empty default -- the real default lives in gold_rush.conf.dist.

Also added CHANGELOG entries for both this PR's zone-specific
resources feature and the earlier null-session broadcast crash fix
(PR #3), neither of which had been logged despite being merged.
This commit is contained in:
Claude 2026-09-04 20:22:31 +00:00
parent 7c192f98a5
commit 3e84c7bb90
2 changed files with 31 additions and 1 deletions

View file

@ -4,7 +4,27 @@ All notable changes to `mod-gold-rush` will be documented in this file.
## [Unreleased — hallsworth fork]
### Added
- Per-zone resource nodes. `GoldRush.ZonePool` entries can now carry their own
node and bonus pools (`ZoneName|NodeEntries|BonusEntries`) instead of every
hotspot drawing from one global list -- an event in Un'Goro spawns Un'Goro-
appropriate herbs/ore, Sholazar spawns Northrend resources, etc. `gold_rush.conf.dist`
ships with all ~57 valid WotLK 3.3.5a open-world zones pre-populated (see
`docs/zone-specific-resources-spec.md` for how each zone's resource list was
derived and verified). New `GoldRush.BonusChancePercent` (default 15) config
controls how often a spawn pulls from a zone's rarer bonus pool instead of its
normal one. A zone left without node/bonus data still falls back to the
global `GoldRush.NodeEntries` pool exactly as before.
### Fixed
- Event start/end announcements no longer crash the server. `StartEvent()` and
`EndEvent()` both used `ChatHandler(nullptr).SendWorldText(...)` to broadcast
server-wide -- `ChatHandler::SendWorldText` assumes a real session and calls
`GetSession()->SendPacket()` unconditionally, so a null session was an
immediate null-pointer crash. Confirmed via a symbolized backtrace against a
captured coredump on the live server (two crashes within ~24h). Replaced with
`sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, text)`, the session-free
broadcast path the built-in `.announce` GM command uses.
- Bot routing is no longer a silent no-op. `Engine::ChangeStrategy` dispatches on the
first character of the strategy name and ignores anything without a `+`/`-`/`~`/`?`
prefix, so the bare `"new rpg"` calls did nothing. Now sends `"+new rpg"`, and only

View file

@ -186,7 +186,17 @@ public:
_config.SpawnRadius = sConfigMgr->GetOption<float>("GoldRush.SpawnRadiusYards", 25.0f);
_config.BonusChancePercent = std::min<uint32>(100, sConfigMgr->GetOption<uint32>("GoldRush.BonusChancePercent", 15));
_config.NodeEntries = sConfigMgr->GetOption<std::string>("GoldRush.NodeEntries", "191133;190176;190171;190172;189973");
_config.ZonePool = sConfigMgr->GetOption<std::string>("GoldRush.ZonePool", "Un'Goro Crater|Fire Plume Ridge; Winterspring|Frostfire Hot Springs; Eastern Plaguelands|Terrorweb Tunnel; Sholazar Basin|River's Heart");
// No hardcoded fallback zone list here on purpose: the real default lives in
// gold_rush.conf.dist (the full 57-zone v2 pool from
// docs/zone-specific-resources-spec.md). That file uses the 2-segment
// ZoneName|NodeEntries|BonusEntries format; a hardcoded fallback string here
// previously still used the old ZoneName|AreaLabel format, which the current
// parser reads as NodeEntries and silently fails to parse as node IDs (safe --
// BuildNodeEntries uses a non-throwing parse -- but pointless). If ZonePool is
// ever missing from the loaded config entirely, an empty pool here just means
// no configured hotspots, matching the "eligible live-player zones" fallback
// path already used elsewhere in this module rather than a stale example.
_config.ZonePool = sConfigMgr->GetOption<std::string>("GoldRush.ZonePool", "");
_config.Blacklist = sConfigMgr->GetOption<std::string>("GoldRush.Blacklist", "Stormwind City; Orgrimmar; Dalaran");
_config.StartMessage = sConfigMgr->GetOption<std::string>("GoldRush.StartMessage", "A seismic anomaly has exposed a massive vein of rich minerals in {}!");
_config.EndMessage = sConfigMgr->GetOption<std::string>("GoldRush.EndMessage", "The Gold Rush in {} has been exhausted.");