From 4f22d6a11e35378ac8431a4733bfde6c89783bfb Mon Sep 17 00:00:00 2001 From: punchready <22683812+punchready@users.noreply.github.com> Date: Tue, 1 Nov 2022 01:29:46 +0100 Subject: [PATCH] Fix item giving Previously this would potentially drop too many items on the ground if the inventory doesn't have enough free slots. --- TShockAPI/TSPlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 495d24a7..244914b6 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -1556,8 +1556,8 @@ namespace TShockAPI if (Depleted(item = GiveItemDirectly_FillEmptyInventorySlot(item, slot))) return; - // oh no, i can't give... guess i gotta spill it on the floor - GiveItemByDrop(type, stack, prefix); + // oh no, i can't give the rest of the items... guess i gotta spill it on the floor + GiveItemByDrop(item.type, item.stack, item.prefix); } private void SendItemSlotPacketFor(int slot)