Add drop to Inventory

This commit is contained in:
VegaZ
2018-12-19 20:22:00 +01:00
parent a542409855
commit a04cd81ede
11 changed files with 76 additions and 26 deletions

View File

@@ -17,12 +17,13 @@ namespace reallife_gamemode.Server.Inventory.Items
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public void Use(UserItem uItem, Client player)
{
player.Health += HpAmount;
player.SendChatMessage("Du hast einen ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~gegessen.");
InventoryManager.RemoveUserItem(player.GetUser(), uItem);
player.SendNotification("Du hast ein/einen ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~gegessen.", false);
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
}
}
}