From afd17e5a48ae16ff83108e5ca9030d5adaa2ffba Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 6 Dec 2018 18:11:52 +0200 Subject: [PATCH] [Client] Don't finish drag & drop that is supposed to be unsuccessful This prevents items from vanishing when your attempt to drop them in a full container is denied. --- apps/openmw/mwgui/container.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 16ad6eb96..c8e0ef9a5 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -197,14 +197,15 @@ namespace MWGui /* Start of tes3mp change (major) - Avoid running any of the original code for dropping items, to prevent possibilities - for item duping or interaction with restricted containers + For valid drops, avoid running the original code for the item transfer, to prevent unilateral + item duping or interaction on this client - Instead, finish the drag in a way that removes the items in it + Instead, finish the drag in a way that removes the items in it, and let the server's reply handle + the rest */ - //if (success) - // mDragAndDrop->drop(mModel, mItemView); - mDragAndDrop->finish(true); + if (success) + // mDragAndDrop->drop(mModel, mItemView); + mDragAndDrop->finish(true); /* End of tes3mp change (major) */