1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 18:45:38 +00:00

Move mana reducing code back

This commit is contained in:
Grigorii Latyshev 2017-11-28 23:14:57 +01:00
parent ce32462358
commit dab72b45db
2 changed files with 7 additions and 5 deletions

View file

@ -889,11 +889,6 @@ namespace MWMechanics
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicSkillFail}");
fail = true;
}
// Reduce mana
MWMechanics::DynamicStat<float> magicka = stats.getMagicka();
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
stats.setMagicka(magicka);
}
if (fail)

View file

@ -2718,6 +2718,13 @@ namespace MWWorld
message = "#{sPowerAlreadyUsed}";
fail = true;
}
// Reduce mana
if (!fail && !godmode)
{
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
stats.setMagicka(magicka);
}
}
if (isPlayer && fail)