fix: Fixes provocation for pre-pub 16 (#1335)

This commit is contained in:
Kamron Batman 2023-02-07 23:33:45 -08:00 • committed by GitHub
parent 44c69620a6
commit 3cf6db73f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 32 deletions

View file

@ -166,16 +166,14 @@ namespace Server.Misc
private static string GetFormattedInfo(string code)
{
if (code?.Length != 3)
if (code?.Length == 3)
{
return $"Unknown code {code}";
}
for (var i = 0; i < InternationalCodes.Length; i++)
{
if (code == InternationalCodes[i].Code)
for (var i = 0; i < InternationalCodes.Length; i++)
{
return $"{InternationalCodes[i].GetName()}";
if (code == InternationalCodes[i].Code)
{
return InternationalCodes[i].GetName();
}
}
}

View file

@ -30,6 +30,7 @@ namespace Server
private static int[] Load()
{
var path = "Data/shrink.json";
var table = JsonConfig.Deserialize<Dictionary<string, string>>(path);
if (table == null)
{

View file

@ -380,7 +380,7 @@ namespace Server.Misc
if (mob.Female && skillTitle.EndsWithOrdinal("man"))
{
skillTitle = $"{skillTitle[..^3]}woman";
return $"{skillLevel} {skillTitle.AsSpan(0, skillTitle.Length - 3)}woman";
}
return $"{skillLevel} {skillTitle}";