Esempio n. 1
0
 /// <summary>
 /// Look the items based on its title and apply an existing value
 /// </summary>
 /// <param name="itemSlot"></param>
 public void ApplyItemEffect(ItemSlot itemSlot)
 {
     foreach (Effect effect in itemSlot.itemStack.item.ConsumptionEffects)
     {
         EffectManager.instance.AddNewEffect(effect, null);
     }
     if (itemSlot.itemStack.item.Title == "Critical Hit")
     {
         skillManager.DoTheSkill(Skills.CriticalHit, itemSlot.itemStack.item.focusConsumption);
     }
     if (itemSlot.itemStack.item.Consumable)
     {
         itemSlot.ChangeAmount(-1);
     }
 }