Skip to content
Snippets Groups Projects
Commit e464f193 authored by sapier's avatar sapier
Browse files

Fix itemstack:add item not working correct

parent ab433775
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,7 @@ int LuaItemStack::l_add_item(lua_State *L) ...@@ -227,7 +227,7 @@ int LuaItemStack::l_add_item(lua_State *L)
NO_MAP_LOCK_REQUIRED; NO_MAP_LOCK_REQUIRED;
LuaItemStack *o = checkobject(L, 1); LuaItemStack *o = checkobject(L, 1);
ItemStack &item = o->m_stack; ItemStack &item = o->m_stack;
ItemStack newitem = read_item(L,-2, STACK_TO_SERVER(L)); ItemStack newitem = read_item(L,-1, STACK_TO_SERVER(L));
ItemStack leftover = item.addItem(newitem, STACK_TO_SERVER(L)->idef()); ItemStack leftover = item.addItem(newitem, STACK_TO_SERVER(L)->idef());
create(L, leftover); create(L, leftover);
return 1; return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment