perf: Migrate vendor management gumps to DynamicGump/StaticGump (#2431)
## Summary
Converts `ReclaimVendorGump`, `VendorInventoryGump`, and the five gumps in `VendorRentalGumps.cs` from legacy `Gump` to `DynamicGump` / `StaticGump<T>` with the static `DisplayTo` entry-point pattern.
| Gump | Target | Reason |
|---|---|---|
| `ReclaimVendorGump` | DynamicGump | Variable vendor inventory list count. |
| `VendorInventoryGump` | DynamicGump | Variable inventory list; keeps `from` (per-row button depends on owner check). |
| `BaseVendorRentalGump` (abstract) → `VendorRentalContractGump`, `VendorRentalOfferGump`, `RenterVendorRentalGump`, `LandlordVendorRentalGump` | DynamicGump | Layout has many conditional sections driven by `GumpType` enum. |
| `VendorRentalRefundGump` | StaticGump | Fixed layout; vendor name, shop name, refund amount in `BuildStrings` placeholders. |
All builder labels and string slots use `$"{value}"` interpolated-string-handler form for zero-allocation text.
Updates callers in `PlayerMobile`, `HouseSign`, `RentedVendor`, and `VendorRentalContract`.
This commit is contained in:
parent
14f9d682e8
commit
402f3bc934
7 changed files with 864 additions and 790 deletions
|
|
@ -195,7 +195,7 @@ public partial class VendorRentalContract : Item
|
|||
{
|
||||
if (from.InRange(this, 5))
|
||||
{
|
||||
from.SendGump(new VendorRentalContractGump(this, from), true);
|
||||
VendorRentalContractGump.DisplayTo(from, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ public partial class VendorRentalContract : Item
|
|||
{
|
||||
if (target is VendorRentalContract contract && contract.IsUsableBy(from, true, true, true, true))
|
||||
{
|
||||
from.SendGump(new VendorRentalContractGump(contract, from), true);
|
||||
VendorRentalContractGump.DisplayTo(from, contract);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue