fix: Adds ISpanFormattable support to Serial (#1065)

This commit is contained in:
Kamron Batman 2022-06-14 18:39:46 -07:00 • committed by GitHub
parent 4b2b7e2277
commit b779d7737f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 269 additions and 204 deletions

View file

@ -518,21 +518,21 @@ namespace Server.Items
return;
}
var modName = Serial.ToString();
var serial = Serial;
if (strBonus != 0)
{
parent.AddStatMod(new StatMod(StatType.Str, $"{modName}Str", strBonus, TimeSpan.Zero));
parent.AddStatMod(new StatMod(StatType.Str, $"{serial}Str", strBonus, TimeSpan.Zero));
}
if (dexBonus != 0)
{
parent.AddStatMod(new StatMod(StatType.Dex, $"{modName}Dex", dexBonus, TimeSpan.Zero));
parent.AddStatMod(new StatMod(StatType.Dex, $"{serial}Dex", dexBonus, TimeSpan.Zero));
}
if (intBonus != 0)
{
parent.AddStatMod(new StatMod(StatType.Int, $"{modName}Int", intBonus, TimeSpan.Zero));
parent.AddStatMod(new StatMod(StatType.Int, $"{serial}Int", intBonus, TimeSpan.Zero));
}
}
@ -619,11 +619,11 @@ namespace Server.Items
SkillBonuses.Remove();
}
var modName = Serial.ToString();
var serial = Serial;
mob.RemoveStatMod($"{modName}Str");
mob.RemoveStatMod($"{modName}Dex");
mob.RemoveStatMod($"{modName}Int");
mob.RemoveStatMod($"{serial}Str");
mob.RemoveStatMod($"{serial}Dex");
mob.RemoveStatMod($"{serial}Int");
mob.CheckStatTimers();
}