SendInventory when handleCommand_Interact is a use.
authorpoet-nohit <poet.nohit@gmail.com>
Sat, 21 Mar 2015 19:41:32 +0000 (13:41 -0600)
committerLoic Blot <loic.blot@unix-experience.fr>
Sat, 21 Mar 2015 20:37:32 +0000 (21:37 +0100)
This call was missing when change looping to triggering SendInventory: 1b2f64473ed4f222d3b7f02df853730d4382105e

src/network/serverpackethandler.cpp

index 97e46c515d75f0d74f0515fbd7017f75da3812f2..f6438d3119e304e28f97023fbdaf591cbb7591bb 100644 (file)
@@ -1724,7 +1724,9 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
                if (m_script->item_OnUse(
                                item, playersao, pointed)) {
                        // Apply returned ItemStack
-                       playersao->setWieldedItem(item);
+                       if (playersao->setWieldedItem(item)) {
+                               SendInventory(playersao);
+                       }
                }
 
        } // action == 4