This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -39,7 +39,15 @@ namespace Server.Items
|
|||
|
||||
public override bool ShareHue => false;
|
||||
|
||||
private AddonComponent GetComponent(int itemID, int hue) => new AddonComponent(itemID) {Hue = hue, Name = "jack-o-lantern"};
|
||||
private AddonComponent GetComponent(int itemID, int hue)
|
||||
{
|
||||
AddonComponent ac = new AddonComponent(itemID);
|
||||
|
||||
ac.Hue = hue;
|
||||
ac.Name = "jack-o-lantern";
|
||||
|
||||
return ac;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -58,23 +66,17 @@ namespace Server.Items
|
|||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
{
|
||||
for (int i = 0; i < Components.Count; ++i)
|
||||
{
|
||||
AddonComponent ac = Components[i];
|
||||
if (ac?.Hue == 2118)
|
||||
if (Components[i] is AddonComponent ac && ac.Hue == 2118)
|
||||
ac.Hue = 1161;
|
||||
}
|
||||
});
|
||||
|
||||
if (version <= 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
{
|
||||
for (int i = 0; i < Components.Count; ++i)
|
||||
{
|
||||
AddonComponent ac = Components[i];
|
||||
if (ac != null)
|
||||
if (Components[i] is AddonComponent ac)
|
||||
ac.Name = "jack-o-lantern";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue