public ObjectDb.Object GetObject(string Path) { if (Path == this.Name || !Path.StartsWith(this.Name)) { return((ObjectDb.Object)null); } Path = Path.Remove(0, this.Name.Length); string[] strArray = Path.Split(new string[1] { "\\" }, StringSplitOptions.RemoveEmptyEntries); if (strArray.Length == 1) { for (int index = 0; index < this.Objects.Count; ++index) { if (this.Objects[index].ToString() == strArray[0]) { return(this.Objects[index]); } } } for (int index = 0; index < this.Categories.Count; ++index) { ObjectDb.Object @object = this.Categories[index].GetObject(string.Join("\\", strArray)); if (@object != null) { return(@object); } } return((ObjectDb.Object)null); }
public ObjectDb.Object GetObject(ushort ObjectId) { for (int index = 0; index < this.Categories.Count; ++index) { ObjectDb.Object @object = this.Categories[index].GetObject(ObjectId); if (@object != null) { return(@object); } } return((ObjectDb.Object)null); }
public ObjectDb.Object GetObject(string Path) { if (Path == "Root" || !Path.StartsWith("Root")) { return((ObjectDb.Object)null); } Path = Path.Remove(0, 4); string[] strArray = Path.Split(new string[1] { "\\" }, StringSplitOptions.RemoveEmptyEntries); for (int index = 0; index < this.Categories.Count; ++index) { ObjectDb.Object @object = this.Categories[index].GetObject(string.Join("\\", strArray)); if (@object != null) { return(@object); } } return((ObjectDb.Object)null); }
public override string ToString() { ObjectDb.Object @object = MKDS_Const.ObjectDatabase.GetObject(this.ObjectID); return(@object != null? @object.ToString() : BitConverter.ToString(BitConverter.GetBytes(this.ObjectID)).Replace("-", "")); }