fix: Adds static warning/notice gumps. (#1741)

### Summary
* Adds `StaticNoticeGump<T>` and `StaticWarningGump<T>`
* Converts NoticeGump/WarningGump to use `DynamicGump`
* Changes various uses of notice gump and warning gump to their static counterpart.
This commit is contained in:
Kamron Batman 2024-04-26 17:19:16 -07:00 committed by GitHub
parent 65532ea887
commit bb7bc57e42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 713 additions and 430 deletions

View file

@ -168,7 +168,7 @@ namespace Server.Multis
if (canClaim && !BaseHouse.HasAccountHouse(m))
{
m.SendGump(
new WarningGump(501036, 32512, 1049719, 32512, 420, 280, okay => ClaimGump_Callback(m, okay))
new ClaimHouseWarningGump(okay => ClaimGump_Callback(m, okay))
);
}
}
@ -176,6 +176,28 @@ namespace Server.Multis
ShowSign(m);
}
private class ClaimHouseWarningGump : StaticWarningGump<ClaimHouseWarningGump>
{
public override int Header => 501036; // Claim house
public override int HeaderColor => 0x7F00;
/*
* You do not currently own any house on any shard with this account, and this house currently does not have an owner.
* If you wish, you may choose to claim this house and become its rightful owner.
* If you do this, it will become your Primary house and automatically refresh.
* If you claim this house, you will be unable to place another house or have another house transferred to you for the next 7 days.
* Do you wish to claim this house?
*/
public override int StaticLocalizedContent => 1049719;
public override int Width => 420;
public override int Height => 280;
public ClaimHouseWarningGump(Action<bool> callback) : base(callback)
{
}
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);