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

@ -1246,7 +1246,7 @@ namespace Server.Mobiles
notice = "The server is currently under lockdown. You have sufficient access level to connect.";
}
from.SendGump(new NoticeGump(1060637, 30720, notice, 0xFFC000, 300, 140));
from.SendGump(new ServerLockdownNoticeGump(notice));
return;
}
@ -1257,6 +1257,15 @@ namespace Server.Mobiles
}
}
private class ServerLockdownNoticeGump : StaticNoticeGump<ServerLockdownNoticeGump>
{
public override int Width => 300;
public override int Height => 140;
public override string Content { get; }
public ServerLockdownNoticeGump(string content) => Content = content;
}
public void ValidateEquipment()
{
if (m_NoDeltaRecursion || Map == null || Map == Map.Internal)