Move mana reducing code back

pull/351/head
Grigorii Latyshev 7 years ago
parent ce32462358
commit dab72b45db

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

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

Loading…
Cancel
Save