Merges bug fixes and cleanup with master (#17)
This commit is contained in:
parent
39dfe86e10
commit
55136d8842
33 changed files with 157 additions and 234 deletions
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue