diff --git a/Projects/Server/Client/ClientVersion.cs b/Projects/Server/Client/ClientVersion.cs index 3c4eafe00..412eb53bd 100644 --- a/Projects/Server/Client/ClientVersion.cs +++ b/Projects/Server/Client/ClientVersion.cs @@ -39,6 +39,7 @@ public class ClientVersion : IComparable, IComparer /// Overridable. Sends the object property list to . /// - public virtual void SendPropertiesTo(Mobile from) + public virtual void SendPropertiesTo(NetState ns) { - from.NetState?.Send(PropertyList.Buffer); + ns?.Send(PropertyList.Buffer); } /// @@ -1829,7 +1828,7 @@ namespace Server } else { - list.Add(1050039, $"{m_Amount}\t#{LabelNumber}"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1050039, $"{m_Amount}\t{LabelNumber:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } } else @@ -1874,35 +1873,35 @@ namespace Server if (v != 0) { - list.Add(1060448, $"{v}"); // physical resist ~1_val~% + list.Add(1060448, v); // physical resist ~1_val~% } v = FireResistance; if (v != 0) { - list.Add(1060447, $"{v}"); // fire resist ~1_val~% + list.Add(1060447, v); // fire resist ~1_val~% } v = ColdResistance; if (v != 0) { - list.Add(1060445, $"{v}"); // cold resist ~1_val~% + list.Add(1060445, v); // cold resist ~1_val~% } v = PoisonResistance; if (v != 0) { - list.Add(1060449, $"{v}"); // poison resist ~1_val~% + list.Add(1060449, v); // poison resist ~1_val~% } v = EnergyResistance; if (v != 0) { - list.Add(1060446, $"{v}"); // energy resist ~1_val~% + list.Add(1060446, v); // energy resist ~1_val~% } } @@ -2401,7 +2400,7 @@ namespace Server return list; } - public void ClearProperties() + public virtual void ClearProperties() { m_PropertyList = null; } @@ -3080,7 +3079,7 @@ namespace Server SendOPLPacketTo(ns, opl); } - public void SendOPLPacketTo(NetState ns, Span opl = default) + public virtual void SendOPLPacketTo(NetState ns, Span opl = default) { if (!ObjectPropertyList.Enabled) { diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index fea0a9345..76a307d15 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -3413,9 +3413,9 @@ namespace Server public int GetAOSStatus(int index) => AOSStatusHandler?.Invoke(this, index) ?? 0; - public virtual void SendPropertiesTo(Mobile from) + public virtual void SendPropertiesTo(NetState ns) { - from.NetState?.Send(PropertyList.Buffer); + ns?.Send(PropertyList.Buffer); } public virtual void OnAosSingleClick(Mobile from) @@ -3485,11 +3485,14 @@ namespace Server if (guildTitle.Length > 0) { - list.Add( - NewGuildDisplay - ? $"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)}" - : $"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)} Guild{type}" - ); + if (NewGuildDisplay) + { + list.Add($"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)}"); + } + else + { + list.Add($"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)} Guild{type}"); + } } else { diff --git a/Projects/Server/Network/Packets/IncomingEntityPackets.cs b/Projects/Server/Network/Packets/IncomingEntityPackets.cs index 40fe5a252..8ae998b03 100644 --- a/Projects/Server/Network/Packets/IncomingEntityPackets.cs +++ b/Projects/Server/Network/Packets/IncomingEntityPackets.cs @@ -175,7 +175,7 @@ public static class IncomingEntityPackets if (m != null && from.CanSee(m) && Utility.InUpdateRange(from.Location, m.Location)) { - m.SendPropertiesTo(from); + m.SendPropertiesTo(state); } } else if (s.IsItem) @@ -185,7 +185,7 @@ public static class IncomingEntityPackets if (item?.Deleted == false && from.CanSee(item) && Utility.InUpdateRange(from.Location, item.GetWorldLocation())) { - item.SendPropertiesTo(from); + item.SendPropertiesTo(state); } } } diff --git a/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs b/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs index cd98b0bba..0a8e399aa 100644 --- a/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs +++ b/Projects/Server/Network/Packets/IncomingExtendedCommandPackets.cs @@ -330,7 +330,7 @@ public static class IncomingExtendedCommandPackets if (m != null && from.CanSee(m) && Utility.InUpdateRange(from.Location, m.Location)) { - m.SendPropertiesTo(from); + m.SendPropertiesTo(state); } } else if (s.IsItem) @@ -340,7 +340,7 @@ public static class IncomingExtendedCommandPackets if (item?.Deleted == false && from.CanSee(item) && Utility.InUpdateRange(from.Location, item.GetWorldLocation())) { - item.SendPropertiesTo(from); + item.SendPropertiesTo(state); } } } diff --git a/Projects/Server/PropertyList/IPropertyList.cs b/Projects/Server/PropertyList/IPropertyList.cs index 59d9a57d7..41b5fa845 100644 --- a/Projects/Server/PropertyList/IPropertyList.cs +++ b/Projects/Server/PropertyList/IPropertyList.cs @@ -22,9 +22,25 @@ public interface IPropertyList : ISelfInterpolatedStringHandler { public void Reset(); public void Terminate(); - public void Add(int number, string argument = null); + + public void Add(int number); + + /** Convenience method for $"{argument}". */ + public void Add(int number, string argument); + + /** Convenience method for $"{text}". */ public void Add(string text); + /** Convenience method for $"{value}". */ + public void Add(int number, int value); + + /** Convenience method for $"{value:#}". */ + public void AddLocalized(int value); + + /** Convenience method for $"{value:#}". */ + public void AddLocalized(int number, int value); + // String Interpolation + public void Add([InterpolatedStringHandlerArgument("")] ref InterpolatedStringHandler handler); public void Add(int number, [InterpolatedStringHandlerArgument("")] ref InterpolatedStringHandler handler); } diff --git a/Projects/Server/PropertyList/ObjectPropertyList.cs b/Projects/Server/PropertyList/ObjectPropertyList.cs index 834afffd8..fd147c65b 100644 --- a/Projects/Server/PropertyList/ObjectPropertyList.cs +++ b/Projects/Server/PropertyList/ObjectPropertyList.cs @@ -119,29 +119,22 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable _hash ^= (val >> 26) & 0x3F; } - public void Add(int number, string? arguments = null) + public void Add(int number) { if (number == 0) { return; } - arguments ??= ""; - if (Header == 0) { Header = number; - HeaderArgs = arguments; + HeaderArgs = ""; } AddHash(number); - if (arguments.Length > 0) - { - AddHash(arguments.GetHashCode(StringComparison.Ordinal)); - } - int strLength = arguments.Length * 2; - int length = _bufferPos + 6 + strLength; + int length = _bufferPos + 6; while (length > _buffer.Length) { Flush(); @@ -149,24 +142,31 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable var writer = new SpanWriter(_buffer.AsSpan(_bufferPos)); writer.Write(number); - writer.Write((ushort)strLength); - writer.WriteLittleUni(arguments); - - _bufferPos += writer.BytesWritten; - _pos = 0; + writer.Write((ushort)0); + _bufferPos += 6; } + public void Add(int number, string? arguments) => InternalAdd(number, $"{arguments}"); + public void Add(string argument) => InternalAdd(GetStringNumber(), $"{argument}"); + public void Add(int number, int value) => InternalAdd(number, $"{value}"); + public void AddLocalized(int value) => InternalAdd(GetStringNumber(), $"{value:#}"); + public void AddLocalized(int number, int value) => InternalAdd(number, $"{value:#}"); + private int GetStringNumber() => _stringNumbers[_stringNumbersIndex++ % _stringNumbers.Length]; - public void Add(string argument) => Add(GetStringNumber(), argument); - + // String Interpolation public void Add( [InterpolatedStringHandlerArgument("")] ref IPropertyList.InterpolatedStringHandler handler - ) => Add(GetStringNumber(), ref handler); + ) => InternalAdd(GetStringNumber(), ref handler); - // String Interpolation public void Add( + int number, + [InterpolatedStringHandlerArgument("")] + ref IPropertyList.InterpolatedStringHandler handler + ) => InternalAdd(number, ref handler); + + private void InternalAdd( int number, [InterpolatedStringHandlerArgument("")] ref IPropertyList.InterpolatedStringHandler handler) @@ -182,14 +182,10 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable { Header = number; HeaderArgs = chars.ToString(); - HeaderArgs.GetHashCode(StringComparison.Ordinal); } AddHash(number); - if (chars.Length > 0) - { - AddHash(string.GetHashCode(chars, StringComparison.Ordinal)); - } + AddHash(string.GetHashCode(chars, StringComparison.Ordinal)); int strLength = chars.Length * 2; int length = _bufferPos + 6 + strLength; @@ -253,7 +249,6 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable public void AppendFormatted(T value) { - string? s; if (value is IFormattable) { @@ -284,6 +279,14 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable public void AppendFormatted(T value, string? format) { + // We support localization '#' cliloc formatter for custom property lists + // This allows someone to build an IPropertyList that creates HTML using the same syntax as LocalizationInterpolationHandler + if (format == "#") + { + AppendLiteral("#"); + format = null; + } + string? s; if (value is IFormattable) { diff --git a/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs b/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs index b05ede58c..9766a698a 100644 --- a/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs +++ b/Projects/UOContent/Engines/Bulk Orders/Books/BulkOrderBook.cs @@ -262,7 +262,7 @@ namespace Server.Engines.BulkOrders { base.GetProperties(list); - list.Add(1062344, $"{Entries.Count}"); // Deeds in book: ~1_val~ + list.Add(1062344, Entries.Count); // Deeds in book: ~1_val~ if (!string.IsNullOrEmpty(m_BookName)) { diff --git a/Projects/UOContent/Engines/Bulk Orders/LargeBOD.cs b/Projects/UOContent/Engines/Bulk Orders/LargeBOD.cs index d16cdc5c6..b918f3e79 100644 --- a/Projects/UOContent/Engines/Bulk Orders/LargeBOD.cs +++ b/Projects/UOContent/Engines/Bulk Orders/LargeBOD.cs @@ -54,12 +54,12 @@ namespace Server.Engines.BulkOrders list.Add(LargeBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material. } - list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~ + list.Add(1060656, AmountMax); // amount to make: ~1_val~ for (var i = 0; i < _entries.Length; ++i) { var entry = _entries[i]; - list.Add(1060658 + i, $"#{entry.Details.Number}\t{entry.Amount}"); // ~1_val~: ~2_val~ + list.Add(1060658 + i, $"{entry.Details.Number:#}\t{entry.Amount}"); // ~1_val~: ~2_val~ } } diff --git a/Projects/UOContent/Engines/Bulk Orders/SmallBOD.cs b/Projects/UOContent/Engines/Bulk Orders/SmallBOD.cs index 206a2d4e0..5d3d7c7a2 100644 --- a/Projects/UOContent/Engines/Bulk Orders/SmallBOD.cs +++ b/Projects/UOContent/Engines/Bulk Orders/SmallBOD.cs @@ -77,8 +77,8 @@ namespace Server.Engines.BulkOrders list.Add(SmallBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material. } - list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~ - list.Add(1060658, $"#{m_Number}\t{m_AmountCur}"); // ~1_val~: ~2_val~ + list.Add(1060656, AmountMax); // amount to make: ~1_val~ + list.Add(1060658, $"{m_Number:#}\t{m_AmountCur}"); // ~1_val~: ~2_val~ } public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs b/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs index d98063e56..16d89198d 100755 --- a/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs +++ b/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs @@ -945,12 +945,11 @@ namespace Server.Engines.CannedEvil if (m_Active) { - list.Add(1060742); // active - list.Add(1060658, $"Type\t{m_Type}"); // ~1_val~: ~2_val~ - list.Add(1060659, $"Level\t{Level}"); // ~1_val~: ~2_val~ + list.Add(1060742); // active + list.Add(1060658, $"{"Type"}\t{m_Type}"); // ~1_val~: ~2_val~ + list.Add(1060659, $"{"Level"}\t{Level}"); // ~1_val~: ~2_val~ var killRatio = 100.0 * ((double)m_Kills / MaxKills); - list.Add(1060660, $"Kills\t{m_Kills} of {MaxKills} ({killRatio:F1}%)"); // ~1_val~: ~2_val~ - //list.Add(1060661, "Spawn Range\t{0}", m_SpawnRange); // ~1_val~: ~2_val~ + list.Add(1060660, $"{"Kills"}\t{m_Kills} of {MaxKills} ({killRatio:F1}%)"); // ~1_val~: ~2_val~ } else { diff --git a/Projects/UOContent/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs b/Projects/UOContent/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs index 364c98c3a..0ee8d8ebb 100644 --- a/Projects/UOContent/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs +++ b/Projects/UOContent/Engines/Factions/Items/Traps/FactionTrapRemovalKit.cs @@ -35,7 +35,7 @@ namespace Server.Factions base.GetProperties(list); // NOTE: OSI does not list uses remaining; intentional difference - list.Add(1060584, $"{Charges}"); // uses remaining: ~1_val~ + list.Add(1060584, Charges); // uses remaining: ~1_val~ } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs index c5fe00653..bffd70992 100644 --- a/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs +++ b/Projects/UOContent/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs @@ -314,7 +314,7 @@ namespace Server.Factions if (m_Faction != null && Map == Faction.Facet) { - list.Add(1060846, m_Faction.Definition.PropName); // Guard: ~1_val~ + list.Add(1060846, $"{m_Faction.Definition.PropName}"); // Guard: ~1_val~ } } diff --git a/Projects/UOContent/Engines/Plants/PlantItem.cs b/Projects/UOContent/Engines/Plants/PlantItem.cs index 22061af38..ba71e6455 100644 --- a/Projects/UOContent/Engines/Plants/PlantItem.cs +++ b/Projects/UOContent/Engines/Plants/PlantItem.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using Server.ContextMenus; using Server.Gumps; @@ -30,17 +31,14 @@ namespace Server.Engines.Plants public class PlantItem : Item, ISecurable { - /* - * Clients 7.0.12.0+ expect a container type in the plant label. - * To support older (and only older) clients, change this to false. - */ - private static readonly bool ShowContainerType = true; private PlantHue m_PlantHue; - private PlantStatus m_PlantStatus; private PlantType m_PlantType; private bool m_ShowType; + // For clients older than 7.0.12.0 + private ObjectPropertyList _oldClientPropertyList; + [Constructible] public PlantItem(bool fertileDirt = false) : base(0x1602) { @@ -59,6 +57,9 @@ namespace Server.Engines.Plants public PlantSystem PlantSystem { get; private set; } + public ObjectPropertyList OldClientPropertyList => + _oldClientPropertyList ??= InitializePropertyList(_oldClientPropertyList); + public override bool ForceShowProperties => ObjectPropertyList.Enabled; [CommandProperty(AccessLevel.GameMaster)] @@ -248,80 +249,189 @@ namespace Server.Engines.Plants InvalidateProperties(); } - public override void AddNameProperty(IPropertyList list) + private ObjectPropertyList InitializePropertyList(ObjectPropertyList list) { - if (m_PlantStatus >= PlantStatus.DeadTwigs) - { - base.AddNameProperty(list); - } - else if (m_PlantStatus < PlantStatus.Seed) - { - string args; + GetProperties(list); + AppendChildProperties(list); + list.Terminate(); + return list; + } - if (ShowContainerType) + // Overridden to support new and old client localization + public override void SendOPLPacketTo(NetState ns, Span opl = default) + { + if (!ObjectPropertyList.Enabled) + { + return; + } + + if (ns.Version < ClientVersion.Version70120) + { + ns.SendOPLInfo(Serial, OldClientPropertyList.Hash); + return; + } + + ns.SendOPLInfo(this); + } + + public override void SendPropertiesTo(NetState ns) + { + if (ns?.Version < ClientVersion.Version70120) + { + ns?.Send(OldClientPropertyList.Buffer); + return; + } + + ns?.Send(PropertyList.Buffer); + } + + public override void ClearProperties() + { + base.ClearProperties(); + _oldClientPropertyList = null; + } + + public override void InvalidateProperties() + { + if (!ObjectPropertyList.Enabled) + { + return; + } + + base.InvalidateProperties(); + + if (Map != null && Map != Map.Internal && !World.Loading) + { + int? oldHash = _oldClientPropertyList?.Hash; + + if (oldHash != null) { - args = $"#{GetLocalizedContainerType()}\t#{PlantSystem.GetLocalizedDirtStatus()}"; + _oldClientPropertyList.Reset(); } else { - args = $"#{PlantSystem.GetLocalizedDirtStatus()}"; + _oldClientPropertyList = new ObjectPropertyList(this); } - list.Add(1060830, args); // a ~1_val~ of ~2_val~ dirt + InitializePropertyList(_oldClientPropertyList); + + if (oldHash != _oldClientPropertyList.Hash) + { + Delta(ItemDelta.Properties); + } } else { - var typeInfo = PlantTypeInfo.GetInfo(m_PlantType); - var hueInfo = PlantHueInfo.GetInfo(m_PlantHue); + ClearProperties(); + } + } - if (m_PlantStatus >= PlantStatus.DecorativePlant) + public override void OnAosSingleClick(Mobile from) + { + var ns = from?.NetState; + + if (ns == null) + { + return; + } + + var opl = ns.Version < ClientVersion.Version70120 ? OldClientPropertyList : PropertyList; + + if (opl.Header > 0) + { + from.NetState.SendMessageLocalized( + Serial, + ItemID, + MessageType.Label, + 0x3B2, + 3, + opl.Header, + Name, + opl.HeaderArgs + ); + } + } + + public override void GetProperties(IPropertyList list) + { + if (m_PlantStatus >= PlantStatus.DeadTwigs) + { + base.GetProperties(list); + return; + } + + var container = GetLocalizedContainerType(); + var dirt = PlantSystem.GetLocalizedDirtStatus(); + var health = PlantSystem.GetLocalizedHealth(); + var plantStatus = GetLocalizedPlantStatus(); + + if (m_PlantStatus < PlantStatus.Seed) + { + // Clients above 7.0.12.0 use the regular PropertyList + if (list != _oldClientPropertyList) { - list.Add(typeInfo.GetPlantLabelDecorative(hueInfo), $"#{hueInfo.Name}\t#{typeInfo.Name}"); + // a ~1_val~ of ~2_val~ dirt + list.Add(1060830, $"{container:#}\t{dirt:#}"); } - else if (m_PlantStatus >= PlantStatus.FullGrownPlant) + else + { + // a ~1_val~ of ~2_val~ dirt + list.Add(1060830, $"{dirt:#}"); + } + + return; + } + + var typeInfo = PlantTypeInfo.GetInfo(m_PlantType); + var hueInfo = PlantHueInfo.GetInfo(m_PlantHue); + + if (m_PlantStatus >= PlantStatus.DecorativePlant) + { + list.Add(typeInfo.GetPlantLabelDecorative(hueInfo), $"{hueInfo.Name:#}\t{typeInfo.Name:#}"); + return; + } + + if (m_PlantStatus >= PlantStatus.FullGrownPlant) + { + list.Add( + typeInfo.GetPlantLabelFullGrown(hueInfo), + $"{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}" + ); + return; + } + + if (m_ShowType) + { + var plantNumber = m_PlantStatus == PlantStatus.Plant + ? typeInfo.GetPlantLabelPlant(hueInfo) + : typeInfo.GetPlantLabelSeed(hueInfo); + + if (list != _oldClientPropertyList) { list.Add( - typeInfo.GetPlantLabelFullGrown(hueInfo), - $"#{PlantSystem.GetLocalizedHealth()}\t#{hueInfo.Name}\t#{typeInfo.Name}" + plantNumber, + $"{container:#}\t{dirt:#}\t{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}\t{plantStatus:#}" ); } else { - string args; - - if (ShowContainerType) - { - args = - $"#{GetLocalizedContainerType()}\t#{PlantSystem.GetLocalizedDirtStatus()}\t#{PlantSystem.GetLocalizedHealth()}"; - } - else - { - args = $"#{PlantSystem.GetLocalizedDirtStatus()}\t#{PlantSystem.GetLocalizedHealth()}"; - } - - if (m_ShowType) - { - args += $"\t#{hueInfo.Name}\t#{typeInfo.Name}\t#{GetLocalizedPlantStatus()}"; - - if (m_PlantStatus == PlantStatus.Plant) - { - list.Add(typeInfo.GetPlantLabelPlant(hueInfo), args); - } - else - { - list.Add(typeInfo.GetPlantLabelSeed(hueInfo), args); - } - } - else - { - args += - $"\t#{(typeInfo.PlantCategory == PlantCategory.Default ? hueInfo.Name : (int)typeInfo.PlantCategory)}\t#{GetLocalizedPlantStatus()}"; - - list.Add( - hueInfo.IsBright() ? 1060832 : 1060831, - args - ); // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~ - } + list.Add( + plantNumber, + $"{dirt:#}\t{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}\t{plantStatus:#}" + ); + } + } + else + { + var category = typeInfo.PlantCategory == PlantCategory.Default ? hueInfo.Name : (int)typeInfo.PlantCategory; + var plantNumber = hueInfo.IsBright() ? 1060832 : 1060831; + if (list != _oldClientPropertyList) + { + list.Add(plantNumber, $"{container:#}\t{dirt:#}\t{health:#}\t{category:#}\t{plantStatus:#}"); + } + else + { + list.Add(plantNumber,$"{dirt:#}\t{health:#}\t{category:#}\t{plantStatus:#}"); } } } diff --git a/Projects/UOContent/Engines/Plants/Seed.cs b/Projects/UOContent/Engines/Plants/Seed.cs index ef05f343d..bee1228a8 100644 --- a/Projects/UOContent/Engines/Plants/Seed.cs +++ b/Projects/UOContent/Engines/Plants/Seed.cs @@ -126,7 +126,39 @@ namespace Server.Engines.Plants public override void AddNameProperty(IPropertyList list) { - list.Add(GetLabel(out var args), args); + var typeInfo = PlantTypeInfo.GetInfo(m_PlantType); + var hueInfo = PlantHueInfo.GetInfo(m_PlantHue); + + int title; + + if (m_ShowType || typeInfo.PlantCategory == PlantCategory.Default) + { + title = hueInfo.Name; + } + else + { + title = (int)typeInfo.PlantCategory; + } + + if (Amount == 1) + { + if (m_ShowType) + { + list.Add(typeInfo.GetSeedLabel(hueInfo), $"{title:#}\t{typeInfo.Name:#}"); + return; + } + + list.Add(hueInfo.IsBright() ? 1060839 : 1060838, $"{title:#}"); + return; + } + + if (m_ShowType) + { + list.Add(typeInfo.GetSeedLabelPlural(hueInfo), $"{Amount}\t{title:#}\t{typeInfo.Name:#}"); + return; + } + + list.Add(hueInfo.IsBright() ? 1113491 : 1113490, $"{Amount}\t{title:#}"); } public override void OnSingleClick(Mobile from) diff --git a/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs b/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs index 659036097..e1180f01c 100644 --- a/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs +++ b/Projects/UOContent/Engines/Quests/Collector/Items/PaintedImage.cs @@ -34,7 +34,7 @@ namespace Server.Engines.Quests.Collector public override void AddNameProperty(IPropertyList list) { var info = ImageTypeInfo.Get(m_Image); - list.Add(1060847, $"#1055126\t#{info.Name}"); // a painted image of: + list.Add(1060847, $"{1055126:#}\t{info.Name:#}"); // a painted image of: } public override void OnSingleClick(Mobile from) diff --git a/Projects/UOContent/Engines/Quests/Core/Items/HornOfRetreat.cs b/Projects/UOContent/Engines/Quests/Core/Items/HornOfRetreat.cs index a16779d0f..bb4249616 100644 --- a/Projects/UOContent/Engines/Quests/Core/Items/HornOfRetreat.cs +++ b/Projects/UOContent/Engines/Quests/Core/Items/HornOfRetreat.cs @@ -47,7 +47,7 @@ namespace Server.Engines.Quests { base.GetProperties(list); - list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~ + list.Add(1060741, m_Charges); // charges: ~1_val~ } public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs index 59858d6fe..1da04cee4 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Objectives.cs @@ -391,13 +391,10 @@ namespace Server.Engines.Quests.Hag if (creature.GetType() == type) { - System.From.SendLocalizedMessage( - 1055043, - $"#{info.Name}" - ); // You gather a ~1_INGREDIENT_NAME~ from the corpse. + // You gather a ~1_INGREDIENT_NAME~ from the corpse. + System.From.SendLocalizedMessage(1055043, $"#{info.Name}"); CurProgress++; - break; } } diff --git a/Projects/UOContent/Engines/Spawners/BaseSpawner.cs b/Projects/UOContent/Engines/Spawners/BaseSpawner.cs index dd1d7a71f..ff0616b8e 100644 --- a/Projects/UOContent/Engines/Spawners/BaseSpawner.cs +++ b/Projects/UOContent/Engines/Spawners/BaseSpawner.cs @@ -365,12 +365,12 @@ namespace Server.Engines.Spawners { list.Add(1060742); // active - list.Add(1060656, $"{m_Count}"); // amount to make: ~1_val~ - list.Add(1061169, $"{m_HomeRange}"); // range ~1_val~ - list.Add(1050039, $"walking range:\t{m_WalkingRange}"); // ~1_NUMBER~ ~2_ITEMNAME~ - list.Add(1053099, $"group:\t{m_Group}"); // ~1_oretype~: ~2_armortype~ - list.Add(1060847, $"team:\t{m_Team}"); // ~1_val~ ~2_val~ - list.Add(1063483, $"delay:\t{m_MinDelay} to {m_MaxDelay}"); // ~1_MATERIAL~: ~2_ITEMNAME~ + list.Add(1060656, m_Count); // amount to make: ~1_val~ + list.Add(1061169, m_HomeRange); // range ~1_val~ + list.Add(1050039, $"{"walking range:"}\t{m_WalkingRange}"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1053099, $"{"group:"}\t{m_Group}"); // ~1_oretype~: ~2_armortype~ + list.Add(1060847, $"{"team:"}\t{m_Team}"); // ~1_val~ ~2_val~ + list.Add(1063483, $"{"delay:"}\t{m_MinDelay} to {m_MaxDelay}"); // ~1_MATERIAL~: ~2_ITEMNAME~ GetSpawnerProperties(list); diff --git a/Projects/UOContent/Engines/Spawners/RegionSpawner.cs b/Projects/UOContent/Engines/Spawners/RegionSpawner.cs index f12a332fe..d3446e22a 100644 --- a/Projects/UOContent/Engines/Spawners/RegionSpawner.cs +++ b/Projects/UOContent/Engines/Spawners/RegionSpawner.cs @@ -94,7 +94,7 @@ namespace Server.Engines.Spawners if (Running && m_SpawnRegion != null) { - list.Add(1076228, $"region:\t{m_SpawnRegion.Name}"); // ~1_DUMMY~ ~2_DUMMY~ + list.Add(1076228, $"{"region:"}\t{m_SpawnRegion.Name}"); // ~1_DUMMY~ ~2_DUMMY~ } } diff --git a/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs b/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs index 8fbd3a1d6..f9745cb4c 100644 --- a/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs +++ b/Projects/UOContent/Engines/Treasures of Tokuno/BasePigmentsOfTokuno.cs @@ -122,7 +122,7 @@ namespace Server.Items TextDefinition.AddTo(list, m_Label); } - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Aquarium/Aquarium.cs b/Projects/UOContent/Items/Aquarium/Aquarium.cs index 1671139bd..165811484 100644 --- a/Projects/UOContent/Items/Aquarium/Aquarium.cs +++ b/Projects/UOContent/Items/Aquarium/Aquarium.cs @@ -389,18 +389,18 @@ namespace Server.Items if (dead > 0) { - list.Add(1074248, $"{dead}"); // Dead Creatures: ~1_NUM~ + list.Add(1074248, dead); // Dead Creatures: ~1_NUM~ } var decorations = Items.Count - LiveCreatures - dead; if (decorations > 0) { - list.Add(1074249, $"{decorations}"); // Decorations: ~1_NUM~ + list.Add(1074249, decorations); // Decorations: ~1_NUM~ } - list.Add(1074250, $"#{FoodNumber()}"); // Food state: ~1_STATE~ - list.Add(1074251, $"#{WaterNumber()}"); // Water state: ~1_STATE~ + list.AddLocalized(1074250, FoodNumber()); // Food state: ~1_STATE~ + list.AddLocalized(1074251, WaterNumber()); // Water state: ~1_STATE~ if (_food.State == (int)FoodState.Dead) { @@ -912,12 +912,8 @@ namespace Server.Items AddItem(item); - from?.SendLocalizedMessage( - 1073635, - item.LabelNumber != 0 - ? $"#{item.LabelNumber}" - : item.Name - ); // You add the following decoration to your aquarium: ~1_NAME~ + // You add the following decoration to your aquarium: ~1_NAME~ + from?.SendLocalizedMessage(1073635, item.LabelNumber != 0 ? $"#{item.LabelNumber}" : item.Name); InvalidateProperties(); return true; diff --git a/Projects/UOContent/Items/Aquarium/FishBowl.cs b/Projects/UOContent/Items/Aquarium/FishBowl.cs index 810078b3a..52f73788f 100644 --- a/Projects/UOContent/Items/Aquarium/FishBowl.cs +++ b/Projects/UOContent/Items/Aquarium/FishBowl.cs @@ -88,7 +88,7 @@ namespace Server.Items if (fish != null) { - list.Add(1074494, $"#{fish.LabelNumber}"); // Contains: ~1_CREATURE~ + list.AddLocalized(1074494, fish.LabelNumber); // Contains: ~1_CREATURE~ } } } diff --git a/Projects/UOContent/Items/Aquarium/VacationWafer.cs b/Projects/UOContent/Items/Aquarium/VacationWafer.cs index b12494255..f7ba9b7f2 100644 --- a/Projects/UOContent/Items/Aquarium/VacationWafer.cs +++ b/Projects/UOContent/Items/Aquarium/VacationWafer.cs @@ -18,7 +18,7 @@ namespace Server.Items { base.AddNameProperties(list); - list.Add(1074432, $"{VacationDays}"); // Vacation days: ~1_DAYS~ + list.AddLocalized(1074432, VacationDays); // Vacation days: ~1_DAYS~ } } } diff --git a/Projects/UOContent/Items/Armor/BaseArmor.cs b/Projects/UOContent/Items/Armor/BaseArmor.cs index 026eb0dc2..029403c30 100644 --- a/Projects/UOContent/Items/Armor/BaseArmor.cs +++ b/Projects/UOContent/Items/Armor/BaseArmor.cs @@ -1251,14 +1251,27 @@ namespace Server.Items if (oreType != 0) { - list.Add( - _quality == ArmorQuality.Exceptional ? 1053100 : 1053099, - name != null ? $"#{oreType}\t{Name}" : $"#{oreType}\t#{LabelNumber}" - ); + var qualityNumber = _quality == ArmorQuality.Exceptional ? 1053100 : 1053099; + + if (name != null) + { + list.Add(qualityNumber, $"{oreType:#}\t{Name}"); + } + else + { + list.Add(qualityNumber, $"{oreType:#}\t{LabelNumber:#}"); + } } else if (_quality == ArmorQuality.Exceptional) { - list.Add(1050040, name ?? $"#{LabelNumber}"); // exceptional ~1_ITEMNAME~ + if (name != null) + { + list.Add(1050040, name); // exceptional ~1_ITEMNAME~ + } + else + { + list.AddLocalized(1050040, LabelNumber); // exceptional ~1_ITEMNAME~ + } } else if (name == null) { @@ -1312,72 +1325,72 @@ namespace Server.Items if ((prop = ArtifactRarity) > 0) { - list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~ + list.Add(1061078, prop); // artifact rarity ~1_val~ } if ((prop = Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = GetLowerStatReq()) != 0) { - list.Add(1060435, $"{prop}"); // lower requirements ~1_val~% + list.Add(1060435, prop); // lower requirements ~1_val~% } if ((prop = GetLuckBonus() + Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if (ArmorAttributes.MageArmor != 0) @@ -1387,12 +1400,12 @@ namespace Server.Items if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -1402,22 +1415,22 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if ((prop = ArmorAttributes.SelfRepair) != 0) { - list.Add(1060450, $"{prop}"); // self repair ~1_val~ + list.Add(1060450, prop); // self repair ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -1427,39 +1440,39 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } AddResistanceProperties(list); if ((prop = GetDurabilityBonus()) > 0) { - list.Add(1060410, $"{prop}"); // durability ~1_val~% + list.Add(1060410, prop); // durability ~1_val~% } if ((prop = ComputeStatReq(StatType.Str)) > 0) { - list.Add(1061170, $"{prop}"); // strength requirement ~1_val~ + list.Add(1061170, prop); // strength requirement ~1_val~ } if (_hitPoints >= 0 && _maxHitPoints > 0) diff --git a/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs b/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs index 3469820c0..05c81c3c7 100644 --- a/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs +++ b/Projects/UOContent/Items/Armor/Glasses/ElvenGlasses.cs @@ -50,77 +50,77 @@ namespace Server.Items if ((prop = _weaponAttributes.HitColdArea) != 0) { - list.Add(1060416, $"{prop}"); // hit cold area ~1_val~% + list.Add(1060416, prop); // hit cold area ~1_val~% } if ((prop = _weaponAttributes.HitDispel) != 0) { - list.Add(1060417, $"{prop}"); // hit dispel ~1_val~% + list.Add(1060417, prop); // hit dispel ~1_val~% } if ((prop = _weaponAttributes.HitEnergyArea) != 0) { - list.Add(1060418, $"{prop}"); // hit energy area ~1_val~% + list.Add(1060418, prop); // hit energy area ~1_val~% } if ((prop = _weaponAttributes.HitFireArea) != 0) { - list.Add(1060419, $"{prop}"); // hit fire area ~1_val~% + list.Add(1060419, prop); // hit fire area ~1_val~% } if ((prop = _weaponAttributes.HitFireball) != 0) { - list.Add(1060420, $"{prop}"); // hit fireball ~1_val~% + list.Add(1060420, prop); // hit fireball ~1_val~% } if ((prop = _weaponAttributes.HitHarm) != 0) { - list.Add(1060421, $"{prop}"); // hit harm ~1_val~% + list.Add(1060421, prop); // hit harm ~1_val~% } if ((prop = _weaponAttributes.HitLeechHits) != 0) { - list.Add(1060422, $"{prop}"); // hit life leech ~1_val~% + list.Add(1060422, prop); // hit life leech ~1_val~% } if ((prop = _weaponAttributes.HitLightning) != 0) { - list.Add(1060423, $"{prop}"); // hit lightning ~1_val~% + list.Add(1060423, prop); // hit lightning ~1_val~% } if ((prop = _weaponAttributes.HitLowerAttack) != 0) { - list.Add(1060424, $"{prop}"); // hit lower attack ~1_val~% + list.Add(1060424, prop); // hit lower attack ~1_val~% } if ((prop = _weaponAttributes.HitLowerDefend) != 0) { - list.Add(1060425, $"{prop}"); // hit lower defense ~1_val~% + list.Add(1060425, prop); // hit lower defense ~1_val~% } if ((prop = _weaponAttributes.HitMagicArrow) != 0) { - list.Add(1060426, $"{prop}"); // hit magic arrow ~1_val~% + list.Add(1060426, prop); // hit magic arrow ~1_val~% } if ((prop = _weaponAttributes.HitLeechMana) != 0) { - list.Add(1060427, $"{prop}"); // hit mana leech ~1_val~% + list.Add(1060427, prop); // hit mana leech ~1_val~% } if ((prop = _weaponAttributes.HitPhysicalArea) != 0) { - list.Add(1060428, $"{prop}"); // hit physical area ~1_val~% + list.Add(1060428, prop); // hit physical area ~1_val~% } if ((prop = _weaponAttributes.HitPoisonArea) != 0) { - list.Add(1060429, $"{prop}"); // hit poison area ~1_val~% + list.Add(1060429, prop); // hit poison area ~1_val~% } if ((prop = _weaponAttributes.HitLeechStam) != 0) { - list.Add(1060430, $"{prop}"); // hit stamina leech ~1_val~% + list.Add(1060430, prop); // hit stamina leech ~1_val~% } } } diff --git a/Projects/UOContent/Items/Clothing/BaseClothing.cs b/Projects/UOContent/Items/Clothing/BaseClothing.cs index 0de3beadc..bacf44e70 100644 --- a/Projects/UOContent/Items/Clothing/BaseClothing.cs +++ b/Projects/UOContent/Items/Clothing/BaseClothing.cs @@ -690,7 +690,14 @@ namespace Server.Items if (oreType != 0) { - list.Add(1053099, name != null ? $"#{oreType}\t{name}" : $"#{oreType}\t#{LabelNumber}"); // ~1_oretype~ ~2_armortype~ + if (name != null) + { + list.Add(1053099, $"{oreType:#}\t{name}"); // ~1_oretype~ ~2_armortype~ + } + else + { + list.Add(1053099, $"{oreType:#}\t{LabelNumber:#}"); // ~1_oretype~ ~2_armortype~ + } } else if (name == null) { @@ -737,72 +744,72 @@ namespace Server.Items if ((prop = ArtifactRarity) > 0) { - list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~ + list.Add(1061078, prop); // artifact rarity ~1_val~ } if ((prop = Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = ClothingAttributes.LowerStatReq) != 0) { - list.Add(1060435, $"{prop}"); // lower requirements ~1_val~% + list.Add(1060435, prop); // lower requirements ~1_val~% } if ((prop = Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if (ClothingAttributes.MageArmor != 0) @@ -812,12 +819,12 @@ namespace Server.Items if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -827,22 +834,22 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if ((prop = ClothingAttributes.SelfRepair) != 0) { - list.Add(1060450, $"{prop}"); // self repair ~1_val~ + list.Add(1060450, prop); // self repair ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -852,39 +859,39 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } AddResistanceProperties(list); if ((prop = ClothingAttributes.DurabilityBonus) > 0) { - list.Add(1060410, $"{prop}"); // durability ~1_val~% + list.Add(1060410, prop); // durability ~1_val~% } if ((prop = ComputeStatReq(StatType.Str)) > 0) { - list.Add(1061170, $"{prop}"); // strength requirement ~1_val~ + list.Add(1061170, prop); // strength requirement ~1_val~ } if (_hitPoints >= 0 && _maxHitPoints > 0) diff --git a/Projects/UOContent/Items/Decoration Artifacts/BaseDecorationArtifact.cs b/Projects/UOContent/Items/Decoration Artifacts/BaseDecorationArtifact.cs index 69719ab90..366a256e7 100644 --- a/Projects/UOContent/Items/Decoration Artifacts/BaseDecorationArtifact.cs +++ b/Projects/UOContent/Items/Decoration Artifacts/BaseDecorationArtifact.cs @@ -15,7 +15,7 @@ public abstract partial class BaseDecorationArtifact : Item { base.GetProperties(list); - list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~ + list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~ } } @@ -32,6 +32,6 @@ public abstract partial class BaseDecorationContainerArtifact : BaseContainer { base.AddNameProperties(list); - list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~ + list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~ } } diff --git a/Projects/UOContent/Items/Deeds/CommodityDeed.cs b/Projects/UOContent/Items/Deeds/CommodityDeed.cs index 87772006a..f72b771f1 100644 --- a/Projects/UOContent/Items/Deeds/CommodityDeed.cs +++ b/Projects/UOContent/Items/Deeds/CommodityDeed.cs @@ -1,5 +1,6 @@ using ModernUO.Serialization; using Server.Targeting; +using Server.Text; namespace Server.Items; @@ -66,13 +67,20 @@ public partial class CommodityDeed : Item { base.GetProperties(list); - if (Commodity != null) + if (Commodity is ICommodity ic) { - var args = Commodity.Name == null - ? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}" - : $"{Commodity.Name}\t{Commodity.Amount}"; - - list.Add(1060658, args); // ~1_val~: ~2_val~ + list.Add(1060658, $"{ic.DescriptionNumber:#}\t{Commodity.Amount}"); // ~1_val~: ~2_val~ + } + else if (Commodity != null) + { + if (Commodity.Name == null) + { + list.Add(1060658, $"{Commodity.LabelNumber:#}\t{Commodity.Amount}"); // ~1_val~: ~2_val~ + } + else + { + list.Add(1060658, $"{Commodity.Name}\t{Commodity.Amount}"); // ~1_val~: ~2_val~ + } } else { @@ -86,11 +94,13 @@ public partial class CommodityDeed : Item if (Commodity != null) { - var args = Commodity.Name == null - ? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}" - : $"{Commodity.Name}\t{Commodity.Amount}"; - - LabelTo(from, 1060658, args); // ~1_val~: ~2_val~ + LabelTo( + from, + 1060658, // ~1_val~: ~2_val~ + Commodity.Name == null + ? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}" + : $"{Commodity.Name}\t{Commodity.Amount}" + ); } } diff --git a/Projects/UOContent/Items/Jewels/BaseJewel.cs b/Projects/UOContent/Items/Jewels/BaseJewel.cs index cbce3546d..29e823124 100644 --- a/Projects/UOContent/Items/Jewels/BaseJewel.cs +++ b/Projects/UOContent/Items/Jewels/BaseJewel.cs @@ -265,77 +265,77 @@ namespace Server.Items if ((prop = ArtifactRarity) > 0) { - list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~ + list.Add(1061078, prop); // artifact rarity ~1_val~ } if ((prop = Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -345,17 +345,17 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -365,27 +365,27 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } AddResistanceProperties(list); diff --git a/Projects/UOContent/Items/Misc/BankCheck.cs b/Projects/UOContent/Items/Misc/BankCheck.cs index db1517471..d7396374f 100644 --- a/Projects/UOContent/Items/Misc/BankCheck.cs +++ b/Projects/UOContent/Items/Misc/BankCheck.cs @@ -71,7 +71,14 @@ namespace Server.Items public override void GetProperties(IPropertyList list) { base.GetProperties(list); - list.Add(1060738, Core.ML ? $"{m_Worth:N0}" : m_Worth.ToString()); // value: ~1_val~) + if (Core.ML) + { + list.Add(1060738, $"{m_Worth:N0}"); // value: ~1_val~ + } + else + { + list.Add(1060738, m_Worth); // value: ~1_val~ + } } public override void OnAdded(IEntity parent) diff --git a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs index 02997aa56..35955907d 100644 --- a/Projects/UOContent/Items/Misc/CommunicationCrystals.cs +++ b/Projects/UOContent/Items/Misc/CommunicationCrystals.cs @@ -97,11 +97,11 @@ namespace Server.Items list.Add(Active ? 1060742 : 1060743); // active / inactive list.Add(1060745); // broadcast - list.Add(1060741, $"{Charges}"); // charges: ~1_val~ + list.Add(1060741, Charges); // charges: ~1_val~ if (Receivers.Count > 0) { - list.Add(1060746, $"{Receivers.Count}"); // links: ~1_val~ + list.Add(1060746, Receivers.Count); // links: ~1_val~ } } diff --git a/Projects/UOContent/Items/Misc/PromotionalToken.cs b/Projects/UOContent/Items/Misc/PromotionalToken.cs index 857e7548b..d38bff9c9 100644 --- a/Projects/UOContent/Items/Misc/PromotionalToken.cs +++ b/Projects/UOContent/Items/Misc/PromotionalToken.cs @@ -27,7 +27,17 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1070998, $"{ItemName}"); // Use this to redeem
your ~1_PROMO~ + if (ItemName != null) + { + if (ItemName.Number > 0) + { + list.Add(1070998, ItemName.Number); // Use this to redeem
your ~1_PROMO~ + } + else + { + list.Add(1070998, ItemName.String); // Use this to redeem
your ~1_PROMO~ + } + } } public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Misc/Teleporter.cs b/Projects/UOContent/Items/Misc/Teleporter.cs index ec505662d..07dcb6af0 100644 --- a/Projects/UOContent/Items/Misc/Teleporter.cs +++ b/Projects/UOContent/Items/Misc/Teleporter.cs @@ -168,15 +168,15 @@ namespace Server.Items if (m_MapDest != null) { - list.Add(1060658, $"Map\t{m_MapDest}"); + list.Add(1060658, $"{"Map"}\t{m_MapDest}"); } if (m_PointDest != Point3D.Zero) { - list.Add(1060659, $"Coords\t{m_PointDest}"); + list.Add(1060659, $"{"Coords"}\t{m_PointDest}"); } - list.Add(1060660, $"Creatures\t{(m_Creatures ? "Yes" : "No")}"); + list.Add(1060660, $"{"Creatures"}\t{(m_Creatures ? "Yes" : "No")}"); } public override void OnSingleClick(Mobile from) @@ -483,11 +483,11 @@ namespace Server.Items if (m_MessageString != null) { - list.Add(1060662, $"Message\t{m_MessageString}"); + list.Add(1060662, $"{"Message"}\t{m_MessageString}"); } else if (m_MessageNumber != 0) { - list.Add(1060662, $"Message\t#{m_MessageNumber}"); + list.Add(1060662, $"{"Message"}\t{m_MessageNumber:#}"); } } @@ -625,16 +625,16 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060661, $"Range\t{m_Range}"); + list.Add(1060661, $"{"Range"}\t{m_Range}"); if (m_Keyword >= 0) { - list.Add(1060662, $"Keyword\t{m_Keyword}"); + list.Add(1060662, $"{"Keyword"}\t{m_Keyword}"); } if (m_Substring != null) { - list.Add(1060663, $"Substring\t{m_Substring}"); + list.Add(1060663, $"{"Substring"}\t{m_Substring}"); } } diff --git a/Projects/UOContent/Items/Quivers/BaseQuiver.cs b/Projects/UOContent/Items/Quivers/BaseQuiver.cs index ca0c191b9..7acc0b426 100644 --- a/Projects/UOContent/Items/Quivers/BaseQuiver.cs +++ b/Projects/UOContent/Items/Quivers/BaseQuiver.cs @@ -272,7 +272,7 @@ namespace Server.Items if ((prop = m_DamageIncrease) != 0) { - list.Add(1074762, $"{prop}"); // Damage modifier: ~1_PERCENT~% + list.Add(1074762, prop); // Damage modifier: ~1_PERCENT~% } int phys = 0, fire = 0, cold = 0, pois = 0, nrgy = 0, chaos = 0, direct = 0; @@ -281,104 +281,104 @@ namespace Server.Items if (phys != 0) { - list.Add(1060403, $"{phys}"); // physical damage ~1_val~% + list.Add(1060403, phys); // physical damage ~1_val~% } if (fire != 0) { - list.Add(1060405, $"{fire}"); // fire damage ~1_val~% + list.Add(1060405, fire); // fire damage ~1_val~% } if (cold != 0) { - list.Add(1060404, $"{cold}"); // cold damage ~1_val~% + list.Add(1060404, cold); // cold damage ~1_val~% } if (pois != 0) { - list.Add(1060406, $"{pois}"); // poison damage ~1_val~% + list.Add(1060406, pois); // poison damage ~1_val~% } if (nrgy != 0) { - list.Add(1060407, $"{nrgy}"); // energy damage ~1_val + list.Add(1060407, nrgy); // energy damage ~1_val } if (chaos != 0) { - list.Add(1072846, $"{chaos}"); // chaos damage ~1_val~% + list.Add(1072846, chaos); // chaos damage ~1_val~% } if (direct != 0) { - list.Add(1079978, $"{direct}"); // Direct Damage: ~1_PERCENT~% + list.Add(1079978, direct); // Direct Damage: ~1_PERCENT~% } list.Add(1075085); // Requirement: Mondain's Legacy if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -388,42 +388,42 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if ((prop = m_LowerAmmoCost) > 0) { - list.Add(1075208, $"{prop}"); // Lower Ammo Cost ~1_Percentage~% + list.Add(1075208, prop); // Lower Ammo Cost ~1_Percentage~% } var weight = ammo != null ? ammo.Weight + ammo.Amount : 0; @@ -435,7 +435,7 @@ namespace Server.Items if ((prop = m_WeightReduction) != 0) { - list.Add(1072210, $"{prop}"); // Weight reduction: ~1_PERCENTAGE~% + list.Add(1072210, prop); // Weight reduction: ~1_PERCENTAGE~% } } diff --git a/Projects/UOContent/Items/Resources/Blacksmithing/Ingots.cs b/Projects/UOContent/Items/Resources/Blacksmithing/Ingots.cs index bcf624f90..acffef1db 100644 --- a/Projects/UOContent/Items/Resources/Blacksmithing/Ingots.cs +++ b/Projects/UOContent/Items/Resources/Blacksmithing/Ingots.cs @@ -72,7 +72,7 @@ namespace Server.Items { if (Amount > 1) { - list.Add(1050039, $"{Amount}\t#{1027154}"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1050039, $"{Amount}\t{1027154:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { diff --git a/Projects/UOContent/Items/Resources/Blacksmithing/Ore.cs b/Projects/UOContent/Items/Resources/Blacksmithing/Ore.cs index 093d30d25..b1c0b9ce7 100644 --- a/Projects/UOContent/Items/Resources/Blacksmithing/Ore.cs +++ b/Projects/UOContent/Items/Resources/Blacksmithing/Ore.cs @@ -87,7 +87,7 @@ namespace Server.Items { if (Amount > 1) { - list.Add(1050039, $"{Amount}\t#{1026583}"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1050039, $"{Amount}\t{1026583:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { diff --git a/Projects/UOContent/Items/Resources/Tailor/Hides.cs b/Projects/UOContent/Items/Resources/Tailor/Hides.cs index 6c28ac235..e9dbc9cda 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Hides.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Hides.cs @@ -59,7 +59,7 @@ namespace Server.Items { if (Amount > 1) { - list.Add(1050039, $"{Amount}\t#1024216"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1050039, $"{Amount}\t{1024216:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { diff --git a/Projects/UOContent/Items/Resources/Tailor/Leathers.cs b/Projects/UOContent/Items/Resources/Tailor/Leathers.cs index 1d44a86ea..2431b26a7 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Leathers.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Leathers.cs @@ -59,7 +59,7 @@ namespace Server.Items { if (Amount > 1) { - list.Add(1050039, $"{Amount}\t#1024199"); // ~1_NUMBER~ ~2_ITEMNAME~ + list.Add(1050039, $"{Amount}\t{1024199:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { diff --git a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index 82c2a2aca..80b7713e4 100644 --- a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -264,7 +264,7 @@ namespace Server.Items list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~ } - list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones + list.Add(1070858, m_AnimalWeight); // ~1_weight~ stones } } @@ -439,7 +439,7 @@ namespace Server.Items list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~ } - list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones + list.Add(1070858, m_AnimalWeight); // ~1_weight~ stones } } diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs index 6643e1507..641b457c5 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/ShipwreckedItem.cs @@ -48,7 +48,7 @@ namespace Server.Items public override void OnSingleClick(Mobile from) { - LabelTo(from, 1050039, $"#{LabelNumber}\t#1041645"); + LabelTo(from, 1050039, $"{LabelNumber:#}\t{1041645:#}"); } public override void AddNameProperties(IPropertyList list) diff --git a/Projects/UOContent/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs b/Projects/UOContent/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs index cb79d1891..2a948b96d 100644 --- a/Projects/UOContent/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs +++ b/Projects/UOContent/Items/Skill Items/Harvest Tools/BaseHarvestTool.cs @@ -122,7 +122,7 @@ namespace Server.Items list.Add(1060636); // exceptional } - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } public virtual void DisplayDurabilityTo(Mobile m) diff --git a/Projects/UOContent/Items/Skill Items/Magical/Misc/RecallRune.cs b/Projects/UOContent/Items/Skill Items/Magical/Misc/RecallRune.cs index e04e97d16..033f6ca8b 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Misc/RecallRune.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Misc/RecallRune.cs @@ -246,9 +246,13 @@ namespace Server.Items { list.Add(House != null ? 1062453 : 1060806, $"a recall rune for {desc}"); // ~1_val~ (Trammel)[(House)] } + else if (House != null) + { + list.Add($"a recall rune for {desc} ({m_TargetMap})(House)"); + } else { - list.Add(House != null ? $"a recall rune for {desc} ({m_TargetMap})(House)" : $"a recall rune for {desc} ({m_TargetMap})"); + list.Add($"a recall rune for {desc} ({m_TargetMap})"); } } } diff --git a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs index b8b6ef6be..c15bd699d 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Spellbook.cs @@ -738,72 +738,72 @@ namespace Server.Items if ((prop = Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -813,17 +813,17 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -833,30 +833,30 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } - list.Add(1042886, $"{SpellCount}"); // ~1_NUMBERS_OF_SPELLS~ Spells + list.Add(1042886, SpellCount); // ~1_NUMBERS_OF_SPELLS~ Spells } public override void OnSingleClick(Mobile from) diff --git a/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs b/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs index 13673cedc..e9a5125e3 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/RecipeScroll.cs @@ -50,7 +50,14 @@ namespace Server.Items if (r != null) { - list.Add(1049644, $"{r.TextDefinition}"); // [~1_stuff~] + if (r.TextDefinition.Number > 0) + { + list.Add(1049644, r.TextDefinition.Number); // [~1_stuff~] + } + else + { + list.Add(1049644, r.TextDefinition.String); // [~1_stuff~] + } } } diff --git a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs index ce7a15a73..86e97b7f0 100644 --- a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs +++ b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs @@ -376,7 +376,7 @@ namespace Server.Items list.Add(1060636); // exceptional } - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ if (m_ReplenishesCharges) { diff --git a/Projects/UOContent/Items/Skill Items/Ninjitsu/Fukiya.cs b/Projects/UOContent/Items/Skill Items/Ninjitsu/Fukiya.cs index 9411c8efe..a565fce0b 100644 --- a/Projects/UOContent/Items/Skill Items/Ninjitsu/Fukiya.cs +++ b/Projects/UOContent/Items/Skill Items/Ninjitsu/Fukiya.cs @@ -91,7 +91,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ if (m_Poison != null && m_PoisonCharges > 0) { diff --git a/Projects/UOContent/Items/Skill Items/Ninjitsu/FukiyaDarts.cs b/Projects/UOContent/Items/Skill Items/Ninjitsu/FukiyaDarts.cs index 3bdd5ca95..429b1b5bc 100644 --- a/Projects/UOContent/Items/Skill Items/Ninjitsu/FukiyaDarts.cs +++ b/Projects/UOContent/Items/Skill Items/Ninjitsu/FukiyaDarts.cs @@ -77,7 +77,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ if (m_Poison != null && m_PoisonCharges > 0) { diff --git a/Projects/UOContent/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs b/Projects/UOContent/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs index 2f26f70bf..61a2b45cb 100644 --- a/Projects/UOContent/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs +++ b/Projects/UOContent/Items/Skill Items/Ninjitsu/LeatherNinjaBelt.cs @@ -93,7 +93,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ if (m_Poison != null && m_PoisonCharges > 0) { diff --git a/Projects/UOContent/Items/Skill Items/Ninjitsu/Shuriken.cs b/Projects/UOContent/Items/Skill Items/Ninjitsu/Shuriken.cs index 8e800e9cd..9a033b1db 100644 --- a/Projects/UOContent/Items/Skill Items/Ninjitsu/Shuriken.cs +++ b/Projects/UOContent/Items/Skill Items/Ninjitsu/Shuriken.cs @@ -78,7 +78,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ if (m_Poison != null && m_PoisonCharges > 0) { diff --git a/Projects/UOContent/Items/Skill Items/Tools/BaseTool.cs b/Projects/UOContent/Items/Skill Items/Tools/BaseTool.cs index 5565c1cf7..5ef23c441 100644 --- a/Projects/UOContent/Items/Skill Items/Tools/BaseTool.cs +++ b/Projects/UOContent/Items/Skill Items/Tools/BaseTool.cs @@ -127,7 +127,7 @@ namespace Server.Items list.Add(1060636); // exceptional } - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } public virtual void DisplayDurabilityTo(Mobile m) diff --git a/Projects/UOContent/Items/Skill Items/Tools/RunicSewingKit.cs b/Projects/UOContent/Items/Skill Items/Tools/RunicSewingKit.cs index 16a2d49b2..edf868a4d 100644 --- a/Projects/UOContent/Items/Skill Items/Tools/RunicSewingKit.cs +++ b/Projects/UOContent/Items/Skill Items/Tools/RunicSewingKit.cs @@ -26,23 +26,24 @@ namespace Server.Items public override void AddNameProperty(IPropertyList list) { - var v = " "; - - if (!CraftResources.IsStandard(Resource)) + if (CraftResources.IsStandard(Resource)) { - var num = CraftResources.GetLocalizationNumber(Resource); - - if (num > 0) - { - v = $"#{num}"; - } - else - { - v = CraftResources.GetName(Resource); - } + list.Add(1061119, " "); // ~1_LEATHER_TYPE~ runic sewing kit + return; } - list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit + var num = CraftResources.GetLocalizationNumber(Resource); + + if (num > 0) + { + // ~1_LEATHER_TYPE~ runic sewing kit + list.Add(1061119, $"#{num}"); + } + else + { + // ~1_LEATHER_TYPE~ runic sewing kit + list.Add(1061119, CraftResources.GetName(Resource)); + } } public override void OnSingleClick(Mobile from) diff --git a/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs b/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs index 206712650..8f85838fc 100644 --- a/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs +++ b/Projects/UOContent/Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBox.cs @@ -169,17 +169,17 @@ namespace Server.Items if (commonSongs > 0) { - list.Add(1075234, $"{commonSongs}"); // ~1_NUMBER~ Common Tracks + list.Add(1075234, commonSongs); // ~1_NUMBER~ Common Tracks } if (uncommonSongs > 0) { - list.Add(1075235, $"{uncommonSongs}"); // ~1_NUMBER~ Uncommon Tracks + list.Add(1075235, uncommonSongs); // ~1_NUMBER~ Uncommon Tracks } if (rareSongs > 0) { - list.Add(1075236, $"{rareSongs}"); // ~1_NUMBER~ Rare Tracks + list.Add(1075236, rareSongs); // ~1_NUMBER~ Rare Tracks } } diff --git a/Projects/UOContent/Items/Special/8th Anniversary Items/FountainOfLife.cs b/Projects/UOContent/Items/Special/8th Anniversary Items/FountainOfLife.cs index 8ffa9aaf1..887503411 100644 --- a/Projects/UOContent/Items/Special/8th Anniversary Items/FountainOfLife.cs +++ b/Projects/UOContent/Items/Special/8th Anniversary Items/FountainOfLife.cs @@ -125,7 +125,7 @@ namespace Server.Items { base.AddNameProperties(list); - list.Add(1075217, $"{m_Charges}"); // ~1_val~ charges remaining + list.Add(1075217, m_Charges); // ~1_val~ charges remaining } public override void OnDelete() diff --git a/Projects/UOContent/Items/Special/8th Anniversary Items/Talismans.cs b/Projects/UOContent/Items/Special/8th Anniversary Items/Talismans.cs index 7c8e49129..bb203b645 100644 --- a/Projects/UOContent/Items/Special/8th Anniversary Items/Talismans.cs +++ b/Projects/UOContent/Items/Special/8th Anniversary Items/Talismans.cs @@ -29,7 +29,7 @@ namespace Server.Items public override void AddNameProperty(IPropertyList list) { - list.Add(1075200, $"#{(int)Form}"); + list.Add(1075200, $"{(int)Form:#}"); } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs index b30e7b83d..fb5795e02 100644 --- a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs +++ b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/AncientSmithyHammer.cs @@ -79,7 +79,7 @@ namespace Server.Items if (m_Bonus != 0) { - list.Add(1060451, $"#1042354\t{m_Bonus}"); // ~1_skillname~ +~2_val~ + list.Add(1060451, $"{1042354:#}\t{m_Bonus}"); // ~1_skillname~ +~2_val~ } } diff --git a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs index 959aeca8c..8fe83deaa 100644 --- a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs +++ b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/GlovesOfMining.cs @@ -202,7 +202,7 @@ namespace Server.Items if (m_Bonus != 0) { - list.Add(1062005, $"{m_Bonus}"); // mining bonus +~1_val~ + list.Add(1062005, m_Bonus); // mining bonus +~1_val~ } } diff --git a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs index c08ed66ae..209da9950 100644 --- a/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs +++ b/Projects/UOContent/Items/Special/Bulk Order Rewards/Blacksmithy/PowderOfTemperament.cs @@ -66,7 +66,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } public virtual void DisplayDurabilityTo(Mobile m) diff --git a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs index 1fe6f266d..4d73c97a9 100644 --- a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs +++ b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs @@ -69,7 +69,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1062925, $"{Petals}"); // Petals: ~1_COUNT~ + list.Add(1062925, Petals); // Petals: ~1_COUNT~ } public override void GetContextMenuEntries(Mobile from, List list) diff --git a/Projects/UOContent/Items/Special/HeritageToken.cs b/Projects/UOContent/Items/Special/HeritageToken.cs index bf3273dc2..b08a07409 100644 --- a/Projects/UOContent/Items/Special/HeritageToken.cs +++ b/Projects/UOContent/Items/Special/HeritageToken.cs @@ -34,7 +34,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1070998, $"#{1076595}"); // Use this to redeem
Your Heritage Items + list.AddLocalized(1070998, 1076595); // Use this to redeem
Your Heritage Items } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleDeed.cs b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleDeed.cs index 5d9ccd8dd..29054bfcc 100644 --- a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleDeed.cs +++ b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleDeed.cs @@ -93,9 +93,9 @@ namespace Server.Items { list.Add( 1060658, // ~1_val~: ~2_val~ - $"location\t{HouseRaffleStone.FormatLocation(m_PlotLocation, m_Facet, false)}" + $"{"location"}\t{HouseRaffleStone.FormatLocation(m_PlotLocation, m_Facet, false)}" ); - list.Add(1060659, $"facet\t{m_Facet}"); // ~1_val~: ~2_val~ + list.Add(1060659, $"{"facet"}\t{m_Facet}"); // ~1_val~: ~2_val~ list.Add(1150486); // [Marked Item] } diff --git a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs index 57f76efa7..6ce07cbeb 100644 --- a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs +++ b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleStone.cs @@ -411,8 +411,8 @@ namespace Server.Items { case HouseRaffleState.Active: { - list.Add(1060658, $"ticket price\t{FormatPrice()}"); // ~1_val~: ~2_val~ - list.Add(1060659, $"ends\t{m_Started + m_Duration}"); // ~1_val~: ~2_val~ + list.Add(1060658, $"{"ticket price"}\t{FormatPrice()}"); // ~1_val~: ~2_val~ + list.Add(1060659, $"{"ends"}\t{m_Started + m_Duration}"); // ~1_val~: ~2_val~ break; } case HouseRaffleState.Completed: diff --git a/Projects/UOContent/Items/Special/Solen Items/BagOfSending.cs b/Projects/UOContent/Items/Special/Solen Items/BagOfSending.cs index 710c31b94..faf151f2d 100644 --- a/Projects/UOContent/Items/Special/Solen Items/BagOfSending.cs +++ b/Projects/UOContent/Items/Special/Solen Items/BagOfSending.cs @@ -106,7 +106,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~ + list.Add(1060741, m_Charges); // charges: ~1_val~ } public override void OnSingleClick(Mobile from) diff --git a/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs b/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs index 8bec81198..b116ca657 100644 --- a/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs +++ b/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs @@ -91,19 +91,17 @@ namespace Server.Items public override void AddNameProperty(IPropertyList list) { - list.Add( - 1054000, - $"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}" - ); // a bracelet of binding : ~1_val~ ~2_val~ + // a bracelet of binding : ~1_val~ ~2_val~ + list.Add(1054000, $"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}"); } public override void OnSingleClick(Mobile from) { LabelTo( from, - 1054000, + 1054000, // a bracelet of binding : ~1_val~ ~2_val~ $"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}" - ); // a bracelet of binding : ~1_val~ ~2_val~ + ); } public override void GetContextMenuEntries(Mobile from, List list) diff --git a/Projects/UOContent/Items/Special/SoulStone.cs b/Projects/UOContent/Items/Special/SoulStone.cs index 08c1dabb3..f924e21b2 100644 --- a/Projects/UOContent/Items/Special/SoulStone.cs +++ b/Projects/UOContent/Items/Special/SoulStone.cs @@ -129,11 +129,18 @@ namespace Server.Items { list.Add( 1070721, // Skill stored: ~1_skillname~ ~2_skillamount~ - $"#{AosSkillBonuses.GetLabel(Skill)}\t{SkillValue:F1}" + $"{AosSkillBonuses.GetLabel(Skill):#}\t{SkillValue:F1}" ); } - list.Add(1041602, LastUserName ?? $"#{1074235}"); // Owner: ~1_val~ + if (LastUserName != null) + { + list.Add(1041602, LastUserName); // Owner: ~1_val~ + } + else + { + list.AddLocalized(1041602, 1074235); // Owner: ~1_val~ + } } private static bool CheckCombat(Mobile m, TimeSpan time) @@ -968,7 +975,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Items/Special/Veteran Rewards/Cannon.cs b/Projects/UOContent/Items/Special/Veteran Rewards/Cannon.cs index 50034e814..3fb9a131e 100644 --- a/Projects/UOContent/Items/Special/Veteran Rewards/Cannon.cs +++ b/Projects/UOContent/Items/Special/Veteran Rewards/Cannon.cs @@ -27,7 +27,7 @@ namespace Server.Items list.Add(1076223); // 7th Year Veteran Reward } - list.Add(1076207, $"{addon.Charges}"); // Remaining Charges: ~1_val~ + list.Add(1076207, addon.Charges); // Remaining Charges: ~1_val~ } } @@ -471,7 +471,7 @@ namespace Server.Items list.Add(1076223); // 7th Year Veteran Reward } - list.Add(1076207, $"{m_Charges}"); // Remaining Charges: ~1_val~ + list.Add(1076207, m_Charges); // Remaining Charges: ~1_val~ } public override void OnDoubleClick(Mobile from) diff --git a/Projects/UOContent/Items/Special/Veteran Rewards/WeaponEngravingTool.cs b/Projects/UOContent/Items/Special/Veteran Rewards/WeaponEngravingTool.cs index 14dacdb02..ffd7b759a 100644 --- a/Projects/UOContent/Items/Special/Veteran Rewards/WeaponEngravingTool.cs +++ b/Projects/UOContent/Items/Special/Veteran Rewards/WeaponEngravingTool.cs @@ -110,7 +110,7 @@ namespace Server.Items if (ShowUsesRemaining) { - list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~ } } diff --git a/Projects/UOContent/Items/Talismans/BaseTalisman.cs b/Projects/UOContent/Items/Talismans/BaseTalisman.cs index 5b0ffe5b0..42a8efcb9 100644 --- a/Projects/UOContent/Items/Talismans/BaseTalisman.cs +++ b/Projects/UOContent/Items/Talismans/BaseTalisman.cs @@ -557,14 +557,19 @@ namespace Server.Items } else if (m_Summoner?.IsEmpty == false) { - list.Add( - 1072400, - m_Summoner?.Name ?? "Unknown" - ); // Talisman of ~1_name~ Summoning + var name = m_Summoner?.Name; + if (name?.Number > 0) + { + list.Add(1072400, name.Number); // Talisman of ~1_name~ Summoning + } + else + { + list.Add(1072400, name?.String ?? "Unknown"); // Talisman of ~1_name~ Summoning + } } else if (m_Removal != TalismanRemoval.None) { - list.Add(1072389, $"#{1072000 + (int)m_Removal}"); // Talisman of ~1_name~ + list.AddLocalized(1072389, 1072000 + (int)m_Removal); // Talisman of ~1_name~ } else { @@ -595,7 +600,7 @@ namespace Server.Items { if (m_ChargeTime > 0) { - list.Add(1074884, $"{m_ChargeTime}"); // Charge time left: ~1_val~ + list.Add(1074884, m_ChargeTime); // Charge time left: ~1_val~ } else { @@ -625,7 +630,7 @@ namespace Server.Items { list.Add( 1072395, // ~1_NAME~ Exceptional Bonus: ~2_val~% - $"#{AosSkillBonuses.GetLabel(m_Skill)}\t{m_ExceptionalBonus}" + $"{AosSkillBonuses.GetLabel(m_Skill):#}\t{m_ExceptionalBonus}" ); } @@ -633,7 +638,7 @@ namespace Server.Items { list.Add( 1072394, // ~1_NAME~ Bonus: ~2_val~% - $"#{AosSkillBonuses.GetLabel(m_Skill)}\t{m_SuccessBonus}" + $"{AosSkillBonuses.GetLabel(m_Skill):#}\t{m_SuccessBonus}" ); } @@ -643,72 +648,72 @@ namespace Server.Items if ((prop = Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -718,17 +723,17 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -738,32 +743,32 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } if (m_MaxCharges > 0) { - list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~ + list.Add(1060741, m_Charges); // charges: ~1_val~ } if (m_Slayer != TalismanSlayerName.None) diff --git a/Projects/UOContent/Items/Weapons/BaseWeapon.cs b/Projects/UOContent/Items/Weapons/BaseWeapon.cs index a89e8e7c0..9e560bcf2 100644 --- a/Projects/UOContent/Items/Weapons/BaseWeapon.cs +++ b/Projects/UOContent/Items/Weapons/BaseWeapon.cs @@ -2778,7 +2778,14 @@ namespace Server.Items if (oreType != 0) { - list.Add(1053099, name != null ? $"#{oreType}\t{name}" : $"#{oreType}\t#{LabelNumber}"); // ~1_oretype~ ~2_armortype~ + if (name != null) + { + list.Add(1053099, $"{oreType:#}\t{name}"); // ~1_oretype~ ~2_armortype~ + } + else + { + list.Add(1053099, $"{oreType:#}\t{LabelNumber:#}"); // ~1_oretype~ ~2_armortype~ + } } else if (name == null) { @@ -2848,12 +2855,12 @@ namespace Server.Items if (ArtifactRarity > 0) { - list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~ + list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~ } if (this is IUsesRemaining usesRemaining && usesRemaining.ShowUsesRemaining) { - list.Add(1060584, $"{usesRemaining.UsesRemaining}"); // uses remaining: ~1_val~ + list.Add(1060584, usesRemaining.UsesRemaining); // uses remaining: ~1_val~ } if (m_Poison != null && m_PoisonCharges > 0) @@ -2897,107 +2904,107 @@ namespace Server.Items if ((prop = GetDamageBonus() + Attributes.WeaponDamage) != 0) { - list.Add(1060401, $"{prop}"); // damage increase ~1_val~% + list.Add(1060401, prop); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { - list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~% + list.Add(1060408, prop); // defense chance increase ~1_val~% } if ((prop = Attributes.EnhancePotions) != 0) { - list.Add(1060411, $"{prop}"); // enhance potions ~1_val~% + list.Add(1060411, prop); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { - list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~ + list.Add(1060412, prop); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { - list.Add(1060413, $"{prop}"); // faster casting ~1_val~ + list.Add(1060413, prop); // faster casting ~1_val~ } if ((prop = GetHitChanceBonus() + Attributes.AttackChance) != 0) { - list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~% + list.Add(1060415, prop); // hit chance increase ~1_val~% } if ((prop = WeaponAttributes.HitColdArea) != 0) { - list.Add(1060416, $"{prop}"); // hit cold area ~1_val~% + list.Add(1060416, prop); // hit cold area ~1_val~% } if ((prop = WeaponAttributes.HitDispel) != 0) { - list.Add(1060417, $"{prop}"); // hit dispel ~1_val~% + list.Add(1060417, prop); // hit dispel ~1_val~% } if ((prop = WeaponAttributes.HitEnergyArea) != 0) { - list.Add(1060418, $"{prop}"); // hit energy area ~1_val~% + list.Add(1060418, prop); // hit energy area ~1_val~% } if ((prop = WeaponAttributes.HitFireArea) != 0) { - list.Add(1060419, $"{prop}"); // hit fire area ~1_val~% + list.Add(1060419, prop); // hit fire area ~1_val~% } if ((prop = WeaponAttributes.HitFireball) != 0) { - list.Add(1060420, $"{prop}"); // hit fireball ~1_val~% + list.Add(1060420, prop); // hit fireball ~1_val~% } if ((prop = WeaponAttributes.HitHarm) != 0) { - list.Add(1060421, $"{prop}"); // hit harm ~1_val~% + list.Add(1060421, prop); // hit harm ~1_val~% } if ((prop = WeaponAttributes.HitLeechHits) != 0) { - list.Add(1060422, $"{prop}"); // hit life leech ~1_val~% + list.Add(1060422, prop); // hit life leech ~1_val~% } if ((prop = WeaponAttributes.HitLightning) != 0) { - list.Add(1060423, $"{prop}"); // hit lightning ~1_val~% + list.Add(1060423, prop); // hit lightning ~1_val~% } if ((prop = WeaponAttributes.HitLowerAttack) != 0) { - list.Add(1060424, $"{prop}"); // hit lower attack ~1_val~% + list.Add(1060424, prop); // hit lower attack ~1_val~% } if ((prop = WeaponAttributes.HitLowerDefend) != 0) { - list.Add(1060425, $"{prop}"); // hit lower defense ~1_val~% + list.Add(1060425, prop); // hit lower defense ~1_val~% } if ((prop = WeaponAttributes.HitMagicArrow) != 0) { - list.Add(1060426, $"{prop}"); // hit magic arrow ~1_val~% + list.Add(1060426, prop); // hit magic arrow ~1_val~% } if ((prop = WeaponAttributes.HitLeechMana) != 0) { - list.Add(1060427, $"{prop}"); // hit mana leech ~1_val~% + list.Add(1060427, prop); // hit mana leech ~1_val~% } if ((prop = WeaponAttributes.HitPhysicalArea) != 0) { - list.Add(1060428, $"{prop}"); // hit physical area ~1_val~% + list.Add(1060428, prop); // hit physical area ~1_val~% } if ((prop = WeaponAttributes.HitPoisonArea) != 0) { - list.Add(1060429, $"{prop}"); // hit poison area ~1_val~% + list.Add(1060429, prop); // hit poison area ~1_val~% } if ((prop = WeaponAttributes.HitLeechStam) != 0) { - list.Add(1060430, $"{prop}"); // hit stamina leech ~1_val~% + list.Add(1060430, prop); // hit stamina leech ~1_val~% } if (ImmolatingWeaponSpell.IsImmolating(this)) @@ -3007,42 +3014,42 @@ namespace Server.Items if (Core.ML && (ranged?.Velocity ?? 0) != 0) { - list.Add(1072793, $"{prop}"); // Velocity ~1_val~% + list.Add(1072793, prop); // Velocity ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { - list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~ + list.Add(1060409, prop); // dexterity bonus ~1_val~ } if ((prop = Attributes.BonusHits) != 0) { - list.Add(1060431, $"{prop}"); // hit point increase ~1_val~ + list.Add(1060431, prop); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { - list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~ + list.Add(1060432, prop); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { - list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~% + list.Add(1060433, prop); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { - list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~% + list.Add(1060434, prop); // lower reagent cost ~1_val~% } if ((prop = GetLowerStatReq()) != 0) { - list.Add(1060435, $"{prop}"); // lower requirements ~1_val~% + list.Add(1060435, prop); // lower requirements ~1_val~% } if ((prop = GetLuckBonus() + Attributes.Luck) != 0) { - list.Add(1060436, $"{prop}"); // luck ~1_val~ + list.Add(1060436, prop); // luck ~1_val~ } if ((prop = WeaponAttributes.MageWeapon) != 0) @@ -3052,12 +3059,12 @@ namespace Server.Items if ((prop = Attributes.BonusMana) != 0) { - list.Add(1060439, $"{prop}"); // mana increase ~1_val~ + list.Add(1060439, prop); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { - list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~ + list.Add(1060440, prop); // mana regeneration ~1_val~ } if (Attributes.NightSight != 0) @@ -3067,22 +3074,22 @@ namespace Server.Items if ((prop = Attributes.ReflectPhysical) != 0) { - list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~% + list.Add(1060442, prop); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { - list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~ + list.Add(1060443, prop); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { - list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~ + list.Add(1060444, prop); // hit point regeneration ~1_val~ } if ((prop = WeaponAttributes.SelfRepair) != 0) { - list.Add(1060450, $"{prop}"); // self repair ~1_val~ + list.Add(1060450, prop); // self repair ~1_val~ } if (Attributes.SpellChanneling != 0) @@ -3092,27 +3099,27 @@ namespace Server.Items if ((prop = Attributes.SpellDamage) != 0) { - list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~% + list.Add(1060483, prop); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { - list.Add(1060484, $"{prop}"); // stamina increase ~1_val~ + list.Add(1060484, prop); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { - list.Add(1060485, $"{prop}"); // strength bonus ~1_val~ + list.Add(1060485, prop); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { - list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~% + list.Add(1060486, prop); // swing speed increase ~1_val~% } if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0) { - list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~% + list.Add(1075210, prop); // Increased Karma Loss ~1val~% } GetDamageTypes( @@ -3128,37 +3135,37 @@ namespace Server.Items if (phys != 0) { - list.Add(1060403, $"{phys}"); // physical damage ~1_val~% + list.Add(1060403, phys); // physical damage ~1_val~% } if (fire != 0) { - list.Add(1060405, $"{fire}"); // fire damage ~1_val~% + list.Add(1060405, fire); // fire damage ~1_val~% } if (cold != 0) { - list.Add(1060404, $"{cold}"); // cold damage ~1_val~% + list.Add(1060404, cold); // cold damage ~1_val~% } if (pois != 0) { - list.Add(1060406, $"{pois}"); // poison damage ~1_val~% + list.Add(1060406, pois); // poison damage ~1_val~% } if (nrgy != 0) { - list.Add(1060407, $"{nrgy}"); // energy damage ~1_val + list.Add(1060407, nrgy); // energy damage ~1_val } if (Core.ML && chaos != 0) { - list.Add(1072846, $"{chaos}"); // chaos damage ~1_val~% + list.Add(1072846, chaos); // chaos damage ~1_val~% } if (Core.ML && direct != 0) { - list.Add(1079978, $"{direct}"); // Direct Damage: ~1_PERCENT~% + list.Add(1079978, direct); // Direct Damage: ~1_PERCENT~% } list.Add(1061168, $"{MinDamage}\t{MaxDamage}"); // weapon damage ~1_val~ - ~2_val~ @@ -3174,14 +3181,14 @@ namespace Server.Items if (MaxRange > 1) { - list.Add(1061169, $"{MaxRange}"); // range ~1_val~ + list.Add(1061169, MaxRange); // range ~1_val~ } var strReq = AOS.Scale(StrRequirement, 100 - GetLowerStatReq()); if (strReq > 0) { - list.Add(1061170, $"{strReq}"); // strength requirement ~1_val~ + list.Add(1061170, strReq); // strength requirement ~1_val~ } if (Layer == Layer.TwoHanded) diff --git a/Projects/UOContent/Misc/AOS.cs b/Projects/UOContent/Misc/AOS.cs index 527c46d8d..02ca10b8d 100644 --- a/Projects/UOContent/Misc/AOS.cs +++ b/Projects/UOContent/Misc/AOS.cs @@ -1041,7 +1041,7 @@ namespace Server { if (GetValues(i, out var skill, out var bonus)) { - list.Add(1060451 + i, $"#{GetLabel(skill)}\t{bonus}"); + list.Add(1060451 + i, $"{GetLabel(skill):#}\t{bonus}"); } } } diff --git a/Projects/UOContent/Mobiles/PlayerMobile.cs b/Projects/UOContent/Mobiles/PlayerMobile.cs index 02648f607..f5a01f8ab 100644 --- a/Projects/UOContent/Mobiles/PlayerMobile.cs +++ b/Projects/UOContent/Mobiles/PlayerMobile.cs @@ -3525,14 +3525,15 @@ namespace Server.Mobiles if (faction.Commander == this) { - list.Add(1042733, faction.Definition.PropName); // Commanding Lord of the ~1_FACTION_NAME~ + // Commanding Lord of the ~1_FACTION_NAME~ + list.Add(1042733, $"{faction.Definition.PropName}"); } else if (pl.Sheriff != null) { list.Add( - 1042734, + 1042734, // The Sheriff of ~1_CITY~, ~2_FACTION_NAME~ $"{pl.Sheriff.Definition.FriendlyName}\t{faction.Definition.PropName}" - ); // The Sheriff of ~1_CITY~, ~2_FACTION_NAME~ + ); } else if (pl.Finance != null) { diff --git a/Projects/UOContent/Multis/Houses/BaseHouse.cs b/Projects/UOContent/Multis/Houses/BaseHouse.cs index dd480e427..b11216e86 100644 --- a/Projects/UOContent/Multis/Houses/BaseHouse.cs +++ b/Projects/UOContent/Multis/Houses/BaseHouse.cs @@ -3721,12 +3721,17 @@ namespace Server.Multis ref ySouth ); - var location = - valid ? $"{yLat}° {yMins}'{(ySouth ? "S" : "N")}, {xLong}° {xMins}'{(xEast ? "E" : "W")}" : "unknown"; - list.Add(1061112, Utility.FixHtml(houseName)); // House Name: ~1_val~ list.Add(1061113, owner); // Owner: ~1_val~ - list.Add(1061114, location); // Location: ~1_val~ + if (valid) + { + // Location: ~1_val~ + list.Add(1061114, $"{yLat}° {yMins}'{(ySouth ? "S" : "N")}, {xLong}° {xMins}'{(xEast ? "E" : "W")}"); + } + else + { + list.Add(1061114, "unknown"); // Location: ~1_val~ + } } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Multis/Houses/HouseSign.cs b/Projects/UOContent/Multis/Houses/HouseSign.cs index ab8a35180..2df270fb8 100644 --- a/Projects/UOContent/Multis/Houses/HouseSign.cs +++ b/Projects/UOContent/Multis/Houses/HouseSign.cs @@ -83,7 +83,7 @@ namespace Server.Multis level = DecayLevel.IDOC; } - list.Add(1062028, $"#{1043009 + (int)level}"); // Condition: This structure is ... + list.AddLocalized(1062028, 1043009 + (int)level); // Condition: This structure is ... } } } diff --git a/Projects/UOContent/Spells/Spellweaving/Items/ArcaneFocus.cs b/Projects/UOContent/Spells/Spellweaving/Items/ArcaneFocus.cs index 44f987401..56676d627 100644 --- a/Projects/UOContent/Spells/Spellweaving/Items/ArcaneFocus.cs +++ b/Projects/UOContent/Spells/Spellweaving/Items/ArcaneFocus.cs @@ -38,7 +38,7 @@ namespace Server.Items { base.GetProperties(list); - list.Add(1060485, $"{StrengthBonus}"); // strength bonus ~1_val~ + list.Add(1060485, StrengthBonus); // strength bonus ~1_val~ } public override void Serialize(IGenericWriter writer) diff --git a/Projects/UOContent/Spells/Spellweaving/Items/TransientItem.cs b/Projects/UOContent/Spells/Spellweaving/Items/TransientItem.cs index 4755e5ed1..8f5bec909 100644 --- a/Projects/UOContent/Spells/Spellweaving/Items/TransientItem.cs +++ b/Projects/UOContent/Spells/Spellweaving/Items/TransientItem.cs @@ -53,9 +53,9 @@ namespace Server.Items public virtual void SendTimeRemainingMessage(Mobile to) { to.SendLocalizedMessage( - 1072516, + 1072516, // ~1_name~ will expire in ~2_val~ seconds! $"{Name ?? $"#{LabelNumber}"}\t{(int)LifeSpan.TotalSeconds}" - ); // ~1_name~ will expire in ~2_val~ seconds! + ); } public override void OnDelete()