diff --git a/CHANGELOG.md b/CHANGELOG.md index b8c8298..de30557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/GoldRush.cpp b/src/GoldRush.cpp index b501420..782c530 100644 --- a/src/GoldRush.cpp +++ b/src/GoldRush.cpp @@ -186,7 +186,17 @@ public: _config.SpawnRadius = sConfigMgr->GetOption("GoldRush.SpawnRadiusYards", 25.0f); _config.BonusChancePercent = std::min(100, sConfigMgr->GetOption("GoldRush.BonusChancePercent", 15)); _config.NodeEntries = sConfigMgr->GetOption("GoldRush.NodeEntries", "191133;190176;190171;190172;189973"); - _config.ZonePool = sConfigMgr->GetOption("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("GoldRush.ZonePool", ""); _config.Blacklist = sConfigMgr->GetOption("GoldRush.Blacklist", "Stormwind City; Orgrimmar; Dalaran"); _config.StartMessage = sConfigMgr->GetOption("GoldRush.StartMessage", "A seismic anomaly has exposed a massive vein of rich minerals in {}!"); _config.EndMessage = sConfigMgr->GetOption("GoldRush.EndMessage", "The Gold Rush in {} has been exhausted.");