ModernUO/Projects/UOContent/Skills
Kamron Batman 50599e0453
perf: Migrate NPC and Skill UI gumps to DynamicGump/StaticGump (#2414)
## Summary

Migrates five legacy `Gump`-derived UI dialogs in the NPC and Skill domains to the modern `DynamicGump` builder pipeline. All five gumps were chosen as `DynamicGump` rather than `StaticGump<T>` because their layout shape varies per instance, and several of them carry per-instance localization numbers (cliloc IDs) that the static cache cannot bake (see CLAUDE.md gump-system rule and `dev-docs/gump-system.md`).

Per-gump rationale:

- **`TownCrierGump` (`Mobiles/Townfolk/TownCrier.cs`)** - DynamicGump. Announcement count varies, expiration text is rebuilt per render via `ValueStringBuilder`, and one button per entry is emitted in a loop.
- **`ClaimListGump` (`Mobiles/Vendors/NPC/AnimalTrainer.cs`)** - DynamicGump. The pet list and resulting background/alpha-region heights vary per stabling player.
- **`AnimalLoreGump` (`Skills/AnimalLore.cs`)** - DynamicGump. Page count itself varies (3 pages pre-AOS, 5 pages on AOS) and several `AddHtmlLocalized` calls use cliloc IDs computed from per-creature data (loyalty rating `1049595 + c.Loyalty / 10`, food preference, pack instinct), which violates the StaticGump cliloc-bake rule.
- **`DisguiseGump` (`Items/Skill Items/Thief/DisguiseKit.cs`)** - DynamicGump. Page count and entry order shift on `from.Female`, `Body.IsFemale`, and `startAtHair`.
- **`CommentsGump` (`Gumps/CommentsGump.cs`)** - DynamicGump. Comment list and pagination depend on `Account.Comments` size; the title label encodes the variable account username string.

All five are now `Singleton => true`, have `private` constructors, and expose static `DisplayTo(...)` entry points that validate prerequisites before constructing - guaranteeing no empty gumps (CLAUDE.md Sec.13). All internal refresh paths (prompts, `OnDoubleClick`, command handlers, target callbacks) were updated to call `DisplayTo` rather than `new XGump(...)`. Legacy `m_`-prefixed fields renamed to `_camelCase` (CLAUDE.md Sec.12), and `DisguiseEntry`'s `m_`-prefixed public readonly fields converted to PascalCase auto-properties. `OnResponse` signatures updated to `in RelayInfo info`. No external callers needed updating - all `new XGump(...)` sites lived inside the same files.
2026-04-25 19:51:42 -07:00
..
Tracking fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
Anatomy.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
AnimalLore.cs perf: Migrate NPC and Skill UI gumps to DynamicGump/StaticGump (#2414) 2026-04-25 19:51:42 -07:00
AnimalTaming.cs fix: Creature is given follow orders upon taming. (#2076) 2025-01-18 16:58:13 -08:00
AntiMacroSystem.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
ArmsLore.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Begging.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
DetectHidden.cs feat: Implements passive Detect Hidden mechanics (#2342) 2026-02-28 11:24:49 -08:00
Discordance.cs fix: Adds name support for all mods (#1128) 2022-10-15 10:46:31 -07:00
EvalInt.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
ForensicEval.cs feat: Add zero-alloc interpolation handler to ValueStringBuilder, replace all StringBuilder usage (#2387) 2026-03-22 14:23:44 -07:00
Hiding.cs fix: Changes Map.Sector.Mobiles to link list & Fixes various related crash bugs (#1553) 2023-10-29 22:42:46 -07:00
Inscribe.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
ItemIdentification.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Meditation.cs fix: Fixes buffs don't start/stop properly. Streamlines constructor and Add/Remove buffs. (#2082) 2025-01-24 18:20:23 -08:00
Peacemaking.cs fix: Removes the absurb 6 hour skill edge case and fixes target cancellations (#2212) 2025-06-07 13:58:01 -07:00
Poisoning.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Provocation.cs feat: Adjusts fame and karma system with era gates for OSI accuracy (#2389) 2026-04-25 11:19:57 -07:00
RemoveTrap.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
SkillCheck.cs fix: Fixes skill gain issue (#1558) 2023-10-21 10:03:50 -07:00
SkillsInfo.cs fix: Fixes random skill maximum (#1860) 2024-07-06 12:37:33 -07:00
Snooping.cs fix: Adds GetClients to map iterators (#1574) 2023-10-30 18:49:00 -07:00
SpiritSpeak.cs fix: Changes Map.Sector.Items to link list. (#1547) 2023-10-16 20:51:02 -07:00
Stealing.cs feat: Adjusts fame and karma system with era gates for OSI accuracy (#2389) 2026-04-25 11:19:57 -07:00
Stealth.cs fix: Updates races to properly support gargoyle equipment. (#744) 2021-08-29 00:43:55 -07:00
TasteID.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00