Rename Döner.cs to Kebab.cs
This commit is contained in:
39
ReallifeGamemode.Server/Inventory/Items/Kebab.cs
Normal file
39
ReallifeGamemode.Server/Inventory/Items/Kebab.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
internal class Kebab : ConsumableItem
|
||||
{
|
||||
public override int Id => 106;
|
||||
public override string Name => "Döner";
|
||||
public override string Description => "Von Emre selbst gemacht.";
|
||||
public override int Gewicht => 500;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 80;
|
||||
public override uint Object => 2240524752;
|
||||
public override int Price => 1800;
|
||||
|
||||
public override float Cooldown => 50000;
|
||||
|
||||
public override void Consume(UserItem uItem)
|
||||
{
|
||||
Player player = uItem.GetUser().Player;
|
||||
|
||||
int amountToAdd = HpAmount;
|
||||
if (player.Health + amountToAdd > 100)
|
||||
{
|
||||
amountToAdd = 100 - player.Health;
|
||||
}
|
||||
|
||||
player.SafeSetHealth(player.Health + amountToAdd);
|
||||
player.SendNotification("Du hast ein ~y~" + Name + " ~s~gegessen.", false);
|
||||
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user