feat: Adds Pre-UOTD single click support for weapons, armor, wands, and clothing (#2053)

This commit is contained in:
Erik Askov Mousing 2025-01-14 02:04:24 +01:00 committed by GitHub
parent 863b4b5460
commit 3b698de556
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 350 additions and 12 deletions

View file

@ -18,6 +18,7 @@ using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Server.Buffers;
using Server.Text;
namespace Server;
@ -286,4 +287,18 @@ public static class StringHelpers
str.CopyTo(chars);
return chars;
}
public static void AppendSpaceWithArticle(this ref ValueStringBuilder builder, string text, bool articleAn)
{
if (builder.Length != 0)
{
builder.Append(' ');
}
else
{
builder.Append(articleAn ? "an " : "a ");
}
builder.Append(text);
}
}