mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +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;
|
newSpell.mType = Spell::Type_Spell;
|
||||||
std::string cost = std::to_string(spell->mData.mCost);
|
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;
|
newSpell.mCostColumn = cost + "/" + chance;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user