diff --git a/apps/openmw-mp/Object.cpp b/apps/openmw-mp/Object.cpp index 36701b521..22ea72c8d 100644 --- a/apps/openmw-mp/Object.cpp +++ b/apps/openmw-mp/Object.cpp @@ -147,12 +147,12 @@ void Object::setCharge(int charge) } -double Object::getEnchantmentCharge() const +float Object::getEnchantmentCharge() const { return object.enchantmentCharge; } -void Object::setEnchantmentCharge(double enchantmentCharge) +void Object::setEnchantmentCharge(float enchantmentCharge) { changedObjectPlace = true; object.enchantmentCharge = enchantmentCharge; @@ -251,7 +251,7 @@ tuple Container::getItem(int i) const return make_tuple(item.refId, item.count, item.charge, item.enchantmentCharge); } -void Container::setItem(int i, const string &refId, int count, int charge, double enchantmentCharge) +void Container::setItem(int i, const string &refId, int count, int charge, float enchantmentCharge) { auto &item = object.containerItems.at(i); item.refId = refId; @@ -261,7 +261,7 @@ void Container::setItem(int i, const string &refId, int count, int charge, doubl changed = true; } -void Container::addItem(const string &refId, int count, int charge, double enchantmentCharge) +void Container::addItem(const string &refId, int count, int charge, float enchantmentCharge) { mwmp::ContainerItem item; item.refId = refId; diff --git a/apps/openmw-mp/Object.hpp b/apps/openmw-mp/Object.hpp index bfcfdcdf9..d2f137d42 100644 --- a/apps/openmw-mp/Object.hpp +++ b/apps/openmw-mp/Object.hpp @@ -66,8 +66,8 @@ public: int getCharge() const; void setCharge(int charge); - double getEnchantmentCharge() const; - void setEnchantmentCharge(double enchantmentCharge); + float getEnchantmentCharge() const; + void setEnchantmentCharge(float enchantmentCharge); int getGoldValue() const; void setGoldValue(int gold); @@ -99,9 +99,9 @@ public: Container(); std::tuple getItem(int i) const; - void addItem(const std::string &refId, int count, int charge, double enchantmentCharge); + void addItem(const std::string &refId, int count, int charge, float enchantmentCharge); - void setItem(int i, const std::string &refId, int count, int charge, double enchantmentCharge); + void setItem(int i, const std::string &refId, int count, int charge, float enchantmentCharge); int getActionCount(int i) const; size_t size() const; diff --git a/apps/openmw/mwmp/WorldEvent.cpp b/apps/openmw/mwmp/WorldEvent.cpp index d22e6de38..513aa081e 100644 --- a/apps/openmw/mwmp/WorldEvent.cpp +++ b/apps/openmw/mwmp/WorldEvent.cpp @@ -173,7 +173,7 @@ void WorldEvent::placeObjects(MWWorld::CellStore* cellStore) if (worldObject.charge > -1) newPtr.getCellRef().setCharge(worldObject.charge); - if (worldObject.enchantmentCharge > -1) + if (worldObject.enchantmentCharge > -1.0f) newPtr.getCellRef().setEnchantmentCharge(worldObject.enchantmentCharge); newPtr.getCellRef().setGoldValue(worldObject.goldValue); diff --git a/components/openmw-mp/Base/BaseEvent.hpp b/components/openmw-mp/Base/BaseEvent.hpp index 93db6a8f2..1174d577a 100644 --- a/components/openmw-mp/Base/BaseEvent.hpp +++ b/components/openmw-mp/Base/BaseEvent.hpp @@ -29,7 +29,7 @@ namespace mwmp unsigned mpNum; int count; int charge; - double enchantmentCharge; + float enchantmentCharge; int goldValue; ESM::Position position;