mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Display 0 chance for spell if player does not have enought magic energy
This commit is contained in:
parent
02b37dc036
commit
a7c953b318
@ -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…
x
Reference in New Issue
Block a user