Cleanup that was missed during the last sweep. (#14)

This commit is contained in:
Kamron Batman 2019-03-03 15:10:20 -08:00 committed by GitHub
parent 5cf37da625
commit 01d0fb75b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 111 deletions

View file

@ -83,11 +83,7 @@ namespace Server.Items
list.Add(1060738, worth); // value: ~1_val~
}
#if NEWPARENT
public override void OnAdded(IEntity parent)
#else
public override void OnAdded(object parent)
#endif
{
base.OnAdded(parent);
@ -98,7 +94,8 @@ namespace Server.Items
Container root = parent as Container;
while (root?.Parent is Container) root = (Container)root.Parent;
while (root?.Parent is Container container)
root = container;
parent = root ?? parent;
@ -247,4 +244,4 @@ namespace Server.Items
}
}
}
}
}

View file

@ -44,11 +44,7 @@ namespace Server.Items
UpdateTotal(this, TotalType.Gold, newValue - oldValue);
}
#if NEWPARENT
public override void OnAdded(IEntity parent)
#else
public override void OnAdded(object parent)
#endif
{
base.OnAdded(parent);
@ -59,7 +55,8 @@ namespace Server.Items
Container root = parent as Container;
while (root?.Parent is Container) root = (Container)root.Parent;
while (root?.Parent is Container container)
root = container;
parent = root ?? parent;
@ -127,4 +124,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}