Fix servercrash /giveitem weight

This commit is contained in:
CroniX
2020-06-23 20:40:00 +02:00
parent 77b47cffdf
commit 93a73add2e

View File

@@ -1922,7 +1922,6 @@ namespace ReallifeGamemode.Server.Commands
{
invWeight += uItem.Amount * InventoryManager.GetItemById(uItem.ItemId).Gewicht;
}
ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du hast " + target.Name + " ~g~" + amount + "~s~ mal das Item gegeben.");
}
if (invWeight + (amount * InventoryManager.GetItemById(itemId).Gewicht) > 40000)
@@ -1933,6 +1932,7 @@ namespace ReallifeGamemode.Server.Commands
{
UserItem item = new UserItem() { ItemId = itemId, UserId = target.GetUser().Id, Amount = amount };
InventoryManager.AddItemToInventory(target, item.ItemId, item.Amount);
ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du hast " + target.Name + " ~g~" + amount + "~s~ mal das Item gegeben.");
}
}