public void DropBag(IBagObject bagObj) { if (bagObj.GetType() == typeof(City) || bagObj.GetType() == typeof(Country) || bagObj.GetType() == typeof(District) || bagObj.GetType() == typeof(ObjectBuilding)) { return; } var l = (Room)data.CurrentLocation; l.DropBag(GetPlayer(), bagObj); }
public void DropBag(Player player, IBagObject bagObject) { LocationBags.Add(bagObject); if (bagObject.GetType() == typeof(Bag)) { player.Bag = null; } if (bagObject.GetType() == typeof(SmallBag)) { player.SmallBag = null; } }
public void GetBag(Player player, IBagObject bagObject) { if (bagObject.GetType() == typeof(Bag)) { if (player.Bag != null) { return; } player.Bag = (Bag)bagObject; } if (bagObject.GetType() == typeof(SmallBag)) { if (player.SmallBag != null) { return; } player.SmallBag = (SmallBag)bagObject; } LocationBags.Remove(bagObject); }