From bb5aa90a6dc193e635a3a6f04a0c0a74029bd503 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 3 Apr 2022 19:09:53 +0300 Subject: [PATCH] [Client] Use simpler conditions for sending PlayerInventory packets This fixes a problem with Take All not sending PlayerInventory packets. --- apps/openmw/mwworld/containerstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/containerstore.cpp b/apps/openmw/mwworld/containerstore.cpp index d0d55aa4a..5bf25a2ba 100644 --- a/apps/openmw/mwworld/containerstore.cpp +++ b/apps/openmw/mwworld/containerstore.cpp @@ -331,7 +331,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr Send an ID_PLAYER_INVENTORY packet every time an item gets added for a player here */ - if (actorPtr == player && this == &player.getClass().getContainerStore(player)) + if (this == &player.getClass().getContainerStore(player)) { mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer(); @@ -562,7 +562,7 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor */ Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr(); - if (actor == player && this == &player.getClass().getContainerStore(player)) + if (this == &player.getClass().getContainerStore(player)) { mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer();