diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 0bc6c0bbc..0f3848aac 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -355,6 +355,9 @@ int ObjectRef::l_set_wielded_item(lua_State *L) // Do it ItemStack item = read_item(L, 2, getServer(L)); bool success = co->setWieldedItem(item); + if (success && co->getType() == ACTIVEOBJECT_TYPE_PLAYER) { + getServer(L)->SendInventory(((PlayerSAO*)co)->getPeerID()); + } lua_pushboolean(L, success); return 1; } |