forked from teamnwah/openmw-tes3coop
[General] Change type of Object::enchantmentCharge
This commit is contained in:
parent
4cfb04aa7f
commit
0e97b769f9
4 changed files with 10 additions and 10 deletions
|
@ -147,12 +147,12 @@ void Object::setCharge(int charge)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double Object::getEnchantmentCharge() const
|
float Object::getEnchantmentCharge() const
|
||||||
{
|
{
|
||||||
return object.enchantmentCharge;
|
return object.enchantmentCharge;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::setEnchantmentCharge(double enchantmentCharge)
|
void Object::setEnchantmentCharge(float enchantmentCharge)
|
||||||
{
|
{
|
||||||
changedObjectPlace = true;
|
changedObjectPlace = true;
|
||||||
object.enchantmentCharge = enchantmentCharge;
|
object.enchantmentCharge = enchantmentCharge;
|
||||||
|
@ -251,7 +251,7 @@ tuple<string, int, int, double> Container::getItem(int i) const
|
||||||
return make_tuple(item.refId, item.count, item.charge, item.enchantmentCharge);
|
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);
|
auto &item = object.containerItems.at(i);
|
||||||
item.refId = refId;
|
item.refId = refId;
|
||||||
|
@ -261,7 +261,7 @@ void Container::setItem(int i, const string &refId, int count, int charge, doubl
|
||||||
changed = true;
|
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;
|
mwmp::ContainerItem item;
|
||||||
item.refId = refId;
|
item.refId = refId;
|
||||||
|
|
|
@ -66,8 +66,8 @@ public:
|
||||||
int getCharge() const;
|
int getCharge() const;
|
||||||
void setCharge(int charge);
|
void setCharge(int charge);
|
||||||
|
|
||||||
double getEnchantmentCharge() const;
|
float getEnchantmentCharge() const;
|
||||||
void setEnchantmentCharge(double enchantmentCharge);
|
void setEnchantmentCharge(float enchantmentCharge);
|
||||||
|
|
||||||
int getGoldValue() const;
|
int getGoldValue() const;
|
||||||
void setGoldValue(int gold);
|
void setGoldValue(int gold);
|
||||||
|
@ -99,9 +99,9 @@ public:
|
||||||
Container();
|
Container();
|
||||||
|
|
||||||
std::tuple<std::string, int, int, double> getItem(int i) const;
|
std::tuple<std::string, int, int, double> 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;
|
int getActionCount(int i) const;
|
||||||
|
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
|
|
|
@ -173,7 +173,7 @@ void WorldEvent::placeObjects(MWWorld::CellStore* cellStore)
|
||||||
if (worldObject.charge > -1)
|
if (worldObject.charge > -1)
|
||||||
newPtr.getCellRef().setCharge(worldObject.charge);
|
newPtr.getCellRef().setCharge(worldObject.charge);
|
||||||
|
|
||||||
if (worldObject.enchantmentCharge > -1)
|
if (worldObject.enchantmentCharge > -1.0f)
|
||||||
newPtr.getCellRef().setEnchantmentCharge(worldObject.enchantmentCharge);
|
newPtr.getCellRef().setEnchantmentCharge(worldObject.enchantmentCharge);
|
||||||
|
|
||||||
newPtr.getCellRef().setGoldValue(worldObject.goldValue);
|
newPtr.getCellRef().setGoldValue(worldObject.goldValue);
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace mwmp
|
||||||
unsigned mpNum;
|
unsigned mpNum;
|
||||||
int count;
|
int count;
|
||||||
int charge;
|
int charge;
|
||||||
double enchantmentCharge;
|
float enchantmentCharge;
|
||||||
int goldValue;
|
int goldValue;
|
||||||
|
|
||||||
ESM::Position position;
|
ESM::Position position;
|
||||||
|
|
Loading…
Reference in a new issue