From 601eb4e116a3af00c60efe88f506176d7b23b89a Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Tue, 22 Mar 2022 23:51:36 -0700 Subject: [PATCH] fix: Uses variables for gump html localized (#970) --- Projects/Server/Gumps/GumpHtmlLocalized.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Projects/Server/Gumps/GumpHtmlLocalized.cs b/Projects/Server/Gumps/GumpHtmlLocalized.cs index 71362f770..a4241dfbb 100644 --- a/Projects/Server/Gumps/GumpHtmlLocalized.cs +++ b/Projects/Server/Gumps/GumpHtmlLocalized.cs @@ -103,15 +103,17 @@ public class GumpHtmlLocalized : GumpEntry public override void AppendTo(ref SpanWriter writer, OrderedHashSet strings, ref int entries, ref int switches) { + var background = Background ? "1" : "0"; + var scrollbar = Scrollbar ? "1" : "0"; writer.WriteAscii( Type switch { GumpHtmlLocalizedType.Plain => - $"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} }}", + $"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {background} {scrollbar} }}", GumpHtmlLocalizedType.Color => - $"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} {Color} }}", + $"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {background} {scrollbar} {Color} }}", _ => - $"{{ xmfhtmltok {X} {Y} {Width} {Height} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} {Color} {Number} @{Args}@ }}" + $"{{ xmfhtmltok {X} {Y} {Width} {Height} {background} {scrollbar} {Color} {Number} @{Args}@ }}" } ); }