diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index 80841fe3a8..6c517e3dde 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -219,7 +219,6 @@ namespace MWClass newPtr = createGold(cell, getValue(ptr) * ptr.getRefData().getCount()); newPtr.getRefData() = ptr.getRefData(); newPtr.getCellRef().setRefNum(ptr.getCellRef().getRefNum()); - newPtr.getCellRef().setGoldValue(ptr.getCellRef().getGoldValue()); newPtr.getRefData().setCount(1); } else diff --git a/apps/openmw/mwworld/class.cpp b/apps/openmw/mwworld/class.cpp index 28d351902b..b360e90471 100644 --- a/apps/openmw/mwworld/class.cpp +++ b/apps/openmw/mwworld/class.cpp @@ -391,12 +391,11 @@ namespace MWWorld return newPtr; } - Ptr Class::moveToCell(const Ptr& ptr, CellStore& cell, const ESM::Position& pos, int count) const + Ptr Class::moveToCell(const Ptr& ptr, CellStore& cell, const ESM::Position& pos) const { Ptr newPtr = moveToCell(ptr, cell); newPtr.getRefData().setPosition(pos); newPtr.getCellRef().setPosition(pos); - newPtr.getRefData().setCount(count); return newPtr; } diff --git a/apps/openmw/mwworld/class.hpp b/apps/openmw/mwworld/class.hpp index 9aa72be041..7b7e9135ba 100644 --- a/apps/openmw/mwworld/class.hpp +++ b/apps/openmw/mwworld/class.hpp @@ -317,7 +317,7 @@ namespace MWWorld // The original is expected to be removed after calling this function, // but this function itself doesn't remove the original. virtual Ptr moveToCell(const Ptr& ptr, CellStore& cell) const; - Ptr moveToCell(const Ptr& ptr, CellStore& cell, const ESM::Position& pos, int count) const; + Ptr moveToCell(const Ptr& ptr, CellStore& cell, const ESM::Position& pos) const; Ptr copyToCell(const ConstPtr& ptr, CellStore& cell, const ESM::Position& pos, int count) const; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 61f3194915..a5ad3b4700 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2024,8 +2024,8 @@ namespace MWWorld pos.rot[1] = 0; // copy the object and set its count - Ptr dropped = copy ? copyObjectToCell(object, cell, pos, amount, true) - : moveObjectToCell(object, cell, pos, amount, true); + Ptr dropped + = copy ? copyObjectToCell(object, cell, pos, amount, true) : moveObjectToCell(object, cell, pos, true); // only the player place items in the world, so no need to check actor PCDropped(dropped); @@ -2070,7 +2070,7 @@ namespace MWWorld return dropped; } - Ptr World::moveObjectToCell(const Ptr& object, CellStore* cell, ESM::Position pos, int count, bool adjustPos) + Ptr World::moveObjectToCell(const Ptr& object, CellStore* cell, ESM::Position pos, bool adjustPos) { if (!cell) throw std::runtime_error("moveObjectToCell(): cannot move object to null cell"); @@ -2081,7 +2081,7 @@ namespace MWWorld cell = &mWorldModel.getExterior(index); } - MWWorld::Ptr dropped = object.getClass().moveToCell(object, *cell, pos, count); + MWWorld::Ptr dropped = object.getClass().moveToCell(object, *cell, pos); initObjectInCell(dropped, *cell, adjustPos); @@ -2146,8 +2146,8 @@ namespace MWWorld pos.pos[2] = result.mHitPointWorld.z(); // copy the object and set its count - Ptr dropped = copy ? copyObjectToCell(object, cell, pos, amount, true) - : moveObjectToCell(object, cell, pos, amount, true); + Ptr dropped + = copy ? copyObjectToCell(object, cell, pos, amount, true) : moveObjectToCell(object, cell, pos, true); if (actor == mPlayer->getPlayer()) // Only call if dropped by player PCDropped(dropped); diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index a85ff983dc..39ad3c7f41 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -144,7 +144,7 @@ namespace MWWorld void updateWeather(float duration, bool paused = false); void initObjectInCell(const Ptr& ptr, CellStore& cell, bool adjustPos); - Ptr moveObjectToCell(const Ptr& ptr, CellStore* cell, ESM::Position pos, int count, bool adjustPos); + Ptr moveObjectToCell(const Ptr& ptr, CellStore* cell, ESM::Position pos, bool adjustPos); Ptr copyObjectToCell(const ConstPtr& ptr, CellStore* cell, ESM::Position pos, int count, bool adjustPos); void updateSoundListener();