From c1bd4f1ce343082ae8a5bd0d01edf9497dd5fee1 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 18 Nov 2016 01:33:46 +0200 Subject: [PATCH] Use correct item count in LocalPlayer::setEquipment() for new items --- apps/openmw/mwmp/LocalPlayer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 8a5bf455c..eda559b8a 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -784,7 +784,13 @@ void LocalPlayer::setEquipment() break; } if (it == ptrInventory.end()) // if not exists add item - ptrInventory.equip(slot, ptrInventory.ContainerStore::add(EquipedItem(slot)->refid.c_str(), 1, ptrPlayer), ptrPlayer); + ptrInventory.equip( + slot, + ptrInventory.ContainerStore::add( + EquipedItem(slot)->refid.c_str(), + EquipedItem(slot)->count, + ptrPlayer), + ptrPlayer); else ptrInventory.equip(slot, it, ptrPlayer); }