forked from teamnwah/openmw-tes3coop
Enchanting: cast the enchant points for the item to int (Fixes #2202)
This commit is contained in:
parent
3c747195ae
commit
ead6bf1601
2 changed files with 5 additions and 5 deletions
|
@ -156,7 +156,7 @@ namespace MWMechanics
|
|||
*
|
||||
* Formula on UESPWiki is not entirely correct.
|
||||
*/
|
||||
float Enchanting::getEnchantPoints() const
|
||||
int Enchanting::getEnchantPoints() const
|
||||
{
|
||||
if (mEffectList.mList.empty())
|
||||
// No effects added, cost = 0
|
||||
|
@ -195,7 +195,7 @@ namespace MWMechanics
|
|||
--effectsLeftCnt;
|
||||
}
|
||||
|
||||
return enchantmentCost;
|
||||
return static_cast<int>(enchantmentCost);
|
||||
}
|
||||
|
||||
|
||||
|
@ -240,7 +240,7 @@ namespace MWMechanics
|
|||
return soul->mData.mSoul;
|
||||
}
|
||||
|
||||
float Enchanting::getMaxEnchantValue() const
|
||||
int Enchanting::getMaxEnchantValue() const
|
||||
{
|
||||
if (itemEmpty())
|
||||
return 0;
|
||||
|
|
|
@ -35,10 +35,10 @@ namespace MWMechanics
|
|||
bool create(); //Return true if created, false if failed.
|
||||
void nextCastStyle(); //Set enchant type to next possible type (for mOldItemPtr object)
|
||||
int getCastStyle() const;
|
||||
float getEnchantPoints() const;
|
||||
int getEnchantPoints() const;
|
||||
float getCastCost() const;
|
||||
int getEnchantPrice() const;
|
||||
float getMaxEnchantValue() const;
|
||||
int getMaxEnchantValue() const;
|
||||
int getGemCharge() const;
|
||||
float getEnchantChance() const;
|
||||
bool soulEmpty() const; //Return true if empty
|
||||
|
|
Loading…
Reference in a new issue