Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 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);
 }