perf: Migrate New Guild System gumps to DynamicGump#2422
Open
kamronbatman wants to merge 1 commit intomainfrom
Open
perf: Migrate New Guild System gumps to DynamicGump#2422kamronbatman wants to merge 1 commit intomainfrom
kamronbatman wants to merge 1 commit intomainfrom
Conversation
Three abstract bases (BaseGuildGump, BaseGuildListGump, OtherGuildInfo) extend DynamicGump with shared BuildContent chrome. Concrete roster, diplomacy, member-info, and war gumps now self-refresh via SendGump(this) after mutating _currentTab/_sortColumn/_pageIndex, eliminating the per-click reallocation hot path on guild dialogs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the eight concrete New Guild System gumps (CreateGuild, GuildInfo,
GuildMemberInfo, GuildRoster, GuildDiplomacy, WarDeclaration,
GuildAdvancedSearch, GuildInvitationRequest) and three abstract bases
(BaseGuildGump, BaseGuildListGump, OtherGuildInfo) from the legacy
Gumpclass to
DynamicGump. Layout work moves from constructor-sideAddX(...)calls into
BuildLayout(ref DynamicGumpBuilder builder)— the abstractBaseGuildGumpnow provides aBuildContentcallout for sharedtab-strip chrome, and
BaseGuildListGump<T>adds anotherBuildListExtrashook so subclasses can paint highlighted titles afterthe filter/sort/pagination chrome.
The headline win is the self-refresh pattern on the list gumps and
diplomacy advanced search. Previously each filter/sort/back/forward
click allocated a brand new gump via
GetResentGump. After migration,those handlers mutate
_filter,_startNumber,_comparer,_ascending,or
_displayon the existing gump and callfrom.SendGump(this),letting the singleton path in
NetStateGumps.Sendswap in the sameinstance with the new layout. The original list is preserved separately
from the per-render filtered/sorted
_displayList, so refreshes pick upthe latest state without losing the source list.
All guild gumps deal with per-instance dynamic strings (guild names,
member names, war declarations, alliance names), which would defeat
StaticGump<T>caching per the cliloc rule, so every concrete subclassmigrates to
DynamicGump.AllianceRosterGump(inMisc/Guild.cs)is a
GuildDiplomacyGumpsubclass and inherits the new behavior; itsunused override and stored alliance reference were dropped along with
the now-obsolete
GetResentGumpabstract.Test plan
dotnet build Projects/UOContent/UOContent.csprojclean (0 warnings, 0 errors)dotnet buildof the full solution cleanCreateGuildGump, invite a player, accept the invitationGuildRosterGump, verify name/rank/last-on/title sort toggles refresh in placeGuildRosterGump, type a filter and click the filter button, verify list updates without reopeningGuildDiplomacyGump, swap among All/Awaiting Action/Relations tabs via Advanced Search, verify content refreshWarDeclarationGump, accept/dismiss/modify viaOtherGuildInfoGuildMemberInfoGump🤖 Generated with Claude Code