Add Drop Item and Pick up item
This commit is contained in:
@@ -19,6 +19,7 @@ using reallife_gamemode.Server.Inventory.Interfaces;
|
||||
using reallife_gamemode.Server.Saves;
|
||||
using reallife_gamemode.Server.Business;
|
||||
using System.Text.RegularExpressions;
|
||||
using reallife_gamemode.Server.Classes;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
||||
@@ -1053,15 +1054,13 @@ namespace reallife_gamemode.Server.Commands
|
||||
List<UserItem> userItems = context.UserItems.ToList().FindAll(i => i.UserId == target.GetUser().Id);
|
||||
foreach(var uItem in userItems)
|
||||
{
|
||||
invWeight += uItem.Amount * InventoryManager.GetItemById(itemId).Gewicht;
|
||||
invWeight += uItem.Amount * InventoryManager.GetItemById(uItem.ItemId).Gewicht;
|
||||
}
|
||||
}
|
||||
|
||||
invWeight += amount * InventoryManager.GetItemById(itemId).Gewicht;
|
||||
|
||||
if (invWeight > 40000)
|
||||
if (invWeight + (amount * InventoryManager.GetItemById(itemId).Gewicht) > 40000)
|
||||
{
|
||||
player.SendChatMessage("~y~" + targetname + " ~s~hat nicht mehr genug Platz in seinem Inventar.");
|
||||
player.SendChatMessage("~y~" + target.Name + " ~s~hat nicht mehr genug Platz in seinem Inventar.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user