forked from mirror/openmw-tes3mp
Display 0 chance for spell if player does not have enought magic energy
This commit is contained in:
parent
02b37dc036
commit
a7c953b318
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ namespace MWGui
|
|||
{
|
||||
newSpell.mType = Spell::Type_Spell;
|
||||
std::string cost = std::to_string(spell->mData.mCost);
|
||||
std::string chance = std::to_string(int(MWMechanics::getSpellSuccessChance(spell, mActor)));
|
||||
std::string chance = std::to_string((stats.getMagicka().getCurrent() >= spell->mData.mCost) ? int(MWMechanics::getSpellSuccessChance(spell, mActor)) : 0);
|
||||
newSpell.mCostColumn = cost + "/" + chance;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue