fix: Fixes craft/help gump not appearing (#1845)
This commit is contained in:
parent
b8ad5c671d
commit
3b84c8052c
2 changed files with 16 additions and 12 deletions
|
|
@ -56,17 +56,12 @@ public class ContainedMenu : QuestionMenu
|
|||
|
||||
public sealed class HelpGump : DynamicGump
|
||||
{
|
||||
private Mobile _from;
|
||||
private readonly Mobile _from;
|
||||
|
||||
public HelpGump(Mobile from) : base(0, 0)
|
||||
{
|
||||
_from = from;
|
||||
}
|
||||
public HelpGump(Mobile from) : base(0, 0) => _from = from;
|
||||
|
||||
protected override void BuildLayout(ref DynamicGumpBuilder builder)
|
||||
{
|
||||
_from.CloseGump<HelpGump>();
|
||||
|
||||
var isYoung = IsYoung(_from);
|
||||
var totalHeight = 110 + (isYoung ? 64 : 0) + 4 * 80;
|
||||
|
||||
|
|
@ -211,6 +206,12 @@ public sealed class HelpGump : DynamicGump
|
|||
builder.AddHtmlLocalized(180, y + 150, 335, 40, 1001015); // NO - I meant to ask for help with another matter.
|
||||
}
|
||||
|
||||
public override void SendTo(NetState ns)
|
||||
{
|
||||
_from.CloseGump<HelpGump>();
|
||||
base.SendTo(ns);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static void AddOption(
|
||||
ref DynamicGumpBuilder builder, int y, int buttonId, int localizedName, GumpButtonType type = GumpButtonType.Reply,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue