Skip to content

Commit

Permalink
[LuaMod] 'giveItemStack' now checks the existing stacks in hotbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jul 18, 2020
1 parent a2f79aa commit 98d84e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/server/lua/LuaMod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void LuaMod::giveItemStack(ServerPlayer &player, ItemStack *itemStack) {
// FIXME: This should probably be moved to a mod
ItemStack stackRet = player.inventory().addStack(itemStack->item().stringID(), itemStack->amount(), 9, 24, true);
if (stackRet.amount() != 0)
player.inventory().addStack(stackRet.item().stringID(), stackRet.amount(), 0, 9);
player.inventory().addStack(stackRet.item().stringID(), stackRet.amount(), 0, 9, true);

m_worldController.server()->sendPlayerInvUpdate(player.clientID(), player.client());
}
Expand Down

0 comments on commit 98d84e9

Please sign in to comment.