Do not reduce magicka in god mode

pull/164/head
scrawl 8 years ago
parent eefe1ed1a8
commit a45335ffc3

@ -2659,8 +2659,9 @@ namespace MWWorld
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
// Check mana
bool godmode = (isPlayer && getGodModeState());
MWMechanics::DynamicStat<float> magicka = stats.getMagicka();
if (magicka.getCurrent() < spell->mData.mCost && !(isPlayer && getGodModeState()))
if (magicka.getCurrent() < spell->mData.mCost && !godmode)
{
message = "#{sMagicInsufficientSP}";
fail = true;
@ -2674,7 +2675,7 @@ namespace MWWorld
}
// Reduce mana
if (!fail)
if (!fail && !godmode)
{
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
stats.setMagicka(magicka);

Loading…
Cancel
Save