bissl formattiert

This commit is contained in:
hydrant
2020-05-10 22:54:18 +02:00
parent 914f2f9447
commit 2c648d52dd
105 changed files with 8184 additions and 8184 deletions

View File

@@ -7,7 +7,7 @@
namespace ReallifeGamemode.Server.Inventory.Interfaces
{
public interface IDroppableItem : IItem
{
uint Object { get; }
}
{
uint Object { get; }
}
}

View File

@@ -7,12 +7,12 @@
namespace ReallifeGamemode.Server.Inventory.Interfaces
{
public interface IItem
{
int Id { get; }
string Name { get; }
string Description { get; }
int Gewicht { get; }
string Einheit { get; }
int Price { get; }
}
{
int Id { get; }
string Name { get; }
string Description { get; }
int Gewicht { get; }
string Einheit { get; }
int Price { get; }
}
}

View File

@@ -9,7 +9,7 @@
namespace ReallifeGamemode.Server.Inventory.Interfaces
{
public interface IUsableItem : IItem, IDroppableItem
{
void Use(UserItem uItem);
}
{
void Use(UserItem uItem);
}
}

View File

@@ -4,7 +4,7 @@ using ReallifeGamemode.Database.Entities;
namespace ReallifeGamemode.Server.Inventory.Interfaces
{
public interface IWeaponDealItem : IItem, IDroppableItem
{
bool noTransfer(Player client, UserItem uItem, FactionVehicle fVeh);
}
{
bool noTransfer(Player client, UserItem uItem, FactionVehicle fVeh);
}
}

View File

@@ -7,20 +7,20 @@ using ReallifeGamemode.Server.Managers;
namespace ReallifeGamemode.Server.Inventory.Items
{
public abstract class DropItem : IDroppableItem
{
public abstract int HpAmount { get; }
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
{
public abstract int HpAmount { get; }
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
public void Drop(UserItem uItem, Player player, int amount)
{
player.SendNotification("Du hast ~g~" + amount + " ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~weggeworfen.", false);
InventoryManager.RemoveUserItem(player.GetUser(), uItem, amount);
}
public void Drop(UserItem uItem, Player player, int amount)
{
player.SendNotification("Du hast ~g~" + amount + " ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~weggeworfen.", false);
InventoryManager.RemoveUserItem(player.GetUser(), uItem, amount);
}
}
}

View File

@@ -7,29 +7,29 @@ using ReallifeGamemode.Server.Managers;
namespace ReallifeGamemode.Server.Inventory.Items
{
public abstract class FoodItem : IUsableItem
{
public abstract int HpAmount { get; }
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
public void Use(UserItem uItem)
{
public abstract int HpAmount { get; }
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
Player player = uItem.GetUser().Player;
public void Use(UserItem uItem)
{
Player player = uItem.GetUser().Player;
int amountToAdd = HpAmount;
if (player.Health + amountToAdd > 100)
{
amountToAdd = 100 - player.Health;
}
int amountToAdd = HpAmount;
if (player.Health + amountToAdd > 100)
{
amountToAdd = 100 - player.Health;
}
player.Health += amountToAdd;
player.SendNotification("Du hast ein/einen ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~gegessen.", false);
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
}
player.Health += amountToAdd;
player.SendNotification("Du hast ein/einen ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~gegessen.", false);
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
}
}
}

View File

@@ -6,23 +6,23 @@ using ReallifeGamemode.Server.Inventory.Interfaces;
namespace ReallifeGamemode.Server.Inventory.Items
{
public abstract class WeaponDealItem : IWeaponDealItem
{
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
public bool noTransfer(Player client, UserItem uItem, FactionVehicle fVeh)
{
public abstract int Id { get; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract int Gewicht { get; }
public abstract string Einheit { get; }
public abstract uint Object { get; }
public abstract int Price { get; }
if (!fVeh.GetOwners().Contains(client.GetUser().FactionId ?? 0))
return false;
if (fVeh.Model != VehicleHash.Burrito3)
return false;
public bool noTransfer(Player client, UserItem uItem, FactionVehicle fVeh)
{
if (!fVeh.GetOwners().Contains(client.GetUser().FactionId ?? 0))
return false;
if (fVeh.Model != VehicleHash.Burrito3)
return false;
return true;
}
return true;
}
}
}