38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using GTANetworkAPI;
|
|
using ReallifeGamemode.Database.Entities;
|
|
using ReallifeGamemode.Database.Models;
|
|
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 => 50;
|
|
public override uint Object => 2240524752;
|
|
public override int Price => 250;
|
|
|
|
public override float Cooldown => 300000;
|
|
|
|
public override void Consume(Player player, User user, DatabaseContext databaseContext)
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|