fix: Adds ISpanFormattable support to Serial (#1065)
This commit is contained in:
parent
4b2b7e2277
commit
b779d7737f
18 changed files with 269 additions and 204 deletions
|
|
@ -1056,21 +1056,21 @@ namespace Server.Items
|
|||
|
||||
if (m != null && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
|
||||
{
|
||||
var modName = Serial.ToString();
|
||||
var serial = Serial;
|
||||
|
||||
if (strBonus != 0)
|
||||
{
|
||||
m.AddStatMod(new StatMod(StatType.Str, $"{modName}Str", strBonus, TimeSpan.Zero));
|
||||
m.AddStatMod(new StatMod(StatType.Str, $"{serial}Str", strBonus, TimeSpan.Zero));
|
||||
}
|
||||
|
||||
if (dexBonus != 0)
|
||||
{
|
||||
m.AddStatMod(new StatMod(StatType.Dex, $"{modName}Dex", dexBonus, TimeSpan.Zero));
|
||||
m.AddStatMod(new StatMod(StatType.Dex, $"{serial}Dex", dexBonus, TimeSpan.Zero));
|
||||
}
|
||||
|
||||
if (intBonus != 0)
|
||||
{
|
||||
m.AddStatMod(new StatMod(StatType.Int, $"{modName}Int", intBonus, TimeSpan.Zero));
|
||||
m.AddStatMod(new StatMod(StatType.Int, $"{serial}Int", intBonus, TimeSpan.Zero));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1180,21 +1180,21 @@ namespace Server.Items
|
|||
|
||||
if (strBonus != 0 || dexBonus != 0 || intBonus != 0)
|
||||
{
|
||||
var modName = Serial.ToString();
|
||||
var serial = Serial;
|
||||
|
||||
if (strBonus != 0)
|
||||
{
|
||||
from.AddStatMod(new StatMod(StatType.Str, $"{modName}Str", strBonus, TimeSpan.Zero));
|
||||
from.AddStatMod(new StatMod(StatType.Str, $"{serial}Str", strBonus, TimeSpan.Zero));
|
||||
}
|
||||
|
||||
if (dexBonus != 0)
|
||||
{
|
||||
from.AddStatMod(new StatMod(StatType.Dex, $"{modName}Dex", dexBonus, TimeSpan.Zero));
|
||||
from.AddStatMod(new StatMod(StatType.Dex, $"{serial}Dex", dexBonus, TimeSpan.Zero));
|
||||
}
|
||||
|
||||
if (intBonus != 0)
|
||||
{
|
||||
from.AddStatMod(new StatMod(StatType.Int, $"{modName}Int", intBonus, TimeSpan.Zero));
|
||||
from.AddStatMod(new StatMod(StatType.Int, $"{serial}Int", intBonus, TimeSpan.Zero));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1205,11 +1205,11 @@ namespace Server.Items
|
|||
{
|
||||
if (parent is Mobile m)
|
||||
{
|
||||
var modName = Serial.ToString();
|
||||
var serial = Serial;
|
||||
|
||||
m.RemoveStatMod($"{modName}Str");
|
||||
m.RemoveStatMod($"{modName}Dex");
|
||||
m.RemoveStatMod($"{modName}Int");
|
||||
m.RemoveStatMod($"{serial}Str");
|
||||
m.RemoveStatMod($"{serial}Dex");
|
||||
m.RemoveStatMod($"{serial}Int");
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue