Beispiel #1
0
 public void AddItem(PlayerItemInfo item)
 {
     if (Items.Any(c => c.WorldId == item.WorldId))
     {
         DevLogger.Error("Item already in game inventory");
         return;
     }
     Items.Add(item);
 }
Beispiel #2
0
        public void EquipItem(long worldId)
        {
            if (EquippedItems.Contains(worldId))
            {
                DevLogger.Error(string.Format("Item with Id:{0} already equipped.", worldId));
                return;
            }
            PlayerItemInfo item = GetItem(worldId);

            TakeOffEquipItems(item.ItemCategory);
            EquippedItems.Add(worldId);
        }
Beispiel #3
0
 public void EquipItem(PlayerItemInfo itemInfo)
 {
     EquipItem(itemInfo.WorldId);
 }