Fix Golden Invasion announcement to point at the dragon's real map#810
Fix Golden Invasion announcement to point at the dragon's real map#810nolt wants to merge 2 commits into
Conversation
The Golden Invasion start/end broadcast ("[{mapName}] Golden invasion!")
named a map that was picked independently from where the Golden Dragon
actually spawned, so the announcement matched the boss only ~1/3 of the
time (and never when the dragon rolled Atlans/Tarkan).
This is a regression from the invasion-spawn-table refactor (PR 757).
Before it, the Golden Dragon was the "mob on the selected map" and spawned
on state.MapId, so the announced map always contained it. The refactor
turned the dragon into an ordinary RandomMap mob and made the display map
a separate random draw over all spawned maps, which the minions (always on
Lorencia/Noria/Devias) dominate.
Fix: a plugin now designates a featured monster (AnnouncedMonsterId) and
the broadcast names that monster's actual spawn map(s):
- RandomMap -> the single map it rolled (recorded in SelectedMaps)
- AllMaps -> every configured map (comma-separated list)
The spawn strategy and the global broadcast are unchanged; only the map
name(s) put into the message changed. When no featured monster is set, the
previous EventDisplayMapIds behaviour is kept as a fallback.
Golden Invasion announces the Golden Dragon; Red Dragon announces the Red
Dragon (it had no bug since it has a single mob, wired for robustness).
The per-map event marker (IMapEventStateUpdatePlugIn) is left as-is.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a regression in invasion event broadcasts where the announced map was often inaccurate due to random selection logic. By introducing a 'featured monster' concept, the system now dynamically identifies the specific map(s) where the boss monster has spawned, ensuring that server-wide announcements provide correct information to players. The changes maintain backward compatibility for events without a featured monster by falling back to the previous display map logic. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to announce the specific map or maps where a featured monster (such as the Golden Dragon or Red Dragon) actually spawned during an invasion event, rather than falling back to a generic display map. It updates the invasion state to track multiple announced map IDs and dynamically builds localized, comma-separated map names for start and end broadcasts. The feedback highlights two performance optimization opportunities: avoiding unnecessary array allocations when retrieving the announced maps, and pre-resolving map names to prevent redundant linear lookups for every active player during broadcasts.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Nice. There is another issue with the refactor that I was planning to work on:
Would it be possible for you to include this fix, removing Atlans/Tarkan from the Golden Dragon config? |
|
Sure and its very good idea. |
The invasion-spawn-table refactor expanded the Golden Dragon's map pool from the original three (the implicit PossibleMaps used by the pre-refactor boss-on-event-map logic) to five, accidentally adding Atlans and Tarkan. Classic MU only spawns the Golden Dragon on Lorencia, Noria and Devias; the golden minions on Atlans/Tarkan are unaffected. Applies to freshly seeded configurations; existing databases keep their stored plugin configuration until reset in the admin panel.
|
Done — added a commit that drops Atlans and Tarkan from the Golden Dragon's map list, leaving Lorencia, Noria and Devias (the original three). The golden minions on Atlans/Tarkan are untouched. One heads-up on rollout: the invasion config lives in the plugin's CustomConfiguration (a serialized JSON blob in the DB), so the new default only applies to freshly seeded configurations. Existing installations keep their stored config — there's no need to reset anything, an admin just needs to open the Golden Invasion plugin config in the panel and remove Atlans and Tarkan from the Golden Dragon entry. I deliberately didn't add a data-update plugin for this: there's no existing precedent in Updates/ for rewriting a plugin's CustomConfiguration, and for a two-map tweak a manual edit seems cleaner than a migration. |
What
The Golden Invasion start/end broadcast (
[{mapName}] Golden invasion!) now names the map(s) where the Golden Dragon actually spawns, instead of an unrelated, independently-chosen map.Why
With the current code the announced map is drawn at random from the intersection of the display maps and all spawned maps. Because the minion mobs (Golden Budge Dragon → Lorencia, Goblin → Noria, Soldier/Titan → Devias …) always occupy the display maps, that draw is dominated by minions and is independent of where the Golden Dragon rolled. Result: the announcement matches the boss only ~1/3 of the time, and never when the dragon rolls Atlans/Tarkan.
This is a regression from the invasion-spawn-table refactor (PR 757). Previously the Golden Dragon was the "mob on the selected map" and spawned on
state.MapId, so the announced map was guaranteed to contain it. The refactor turned the dragon into an ordinaryRandomMapmob and split the display map into a separate random draw.How
A plugin can now designate a featured monster via
AnnouncedMonsterId, and the broadcast names that monster's real spawn map(s):state.SelectedMaps)GoldenInvasionPlugInannounces the Golden Dragon;RedDragonInvasionPlugInannounces the Red Dragon (it had no bug — single mob — but is wired for robustness). When no featured monster is set, the previousEventDisplayMapIdsbehaviour is kept as a fallback.Scope / non-goals
IMapEventStateUpdatePlugIn) is intentionally left as-is. InAllMapsmode it still lights up on a single map; extending it to all maps would be a separate change.Files
BaseInvasionPlugIn,InvasionGameServerState,SimpleInvasionPlugIn,GoldenInvasionPlugIn,RedDragonInvasionPlugIn(+97/-13).