forked from teamnwah/openmw-tes3coop
Fix for display of cast cost decimal value
This commit is contained in:
parent
9a9b075a02
commit
4e17bc1499
2 changed files with 6 additions and 1 deletions
|
@ -66,7 +66,9 @@ namespace MWGui
|
|||
|
||||
mCharge->setCaption(boost::lexical_cast<std::string>(mEnchanting.getGemCharge()));
|
||||
|
||||
mCastCost->setCaption(boost::lexical_cast<std::string>(mEnchanting.getCastCost()));
|
||||
std::stringstream castCost;
|
||||
castCost << std::setprecision(1) << std::fixed << mEnchanting.getCastCost();
|
||||
mCastCost->setCaption(boost::lexical_cast<std::string>(castCost.str()));
|
||||
|
||||
mPrice->setCaption(boost::lexical_cast<std::string>(mEnchanting.getEnchantPrice()));
|
||||
|
||||
|
|
|
@ -209,6 +209,9 @@ namespace MWMechanics
|
|||
|
||||
float Enchanting::getCastCost() const
|
||||
{
|
||||
if (mCastStyle == ESM::CS_ConstantEffect)
|
||||
return 0;
|
||||
|
||||
const float enchantCost = getEnchantCost();
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
|
||||
MWMechanics::NpcStats &stats = MWWorld::Class::get(player).getNpcStats(player);
|
||||
|
|
Loading…
Reference in a new issue