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:
parent
ce32462358
commit
dab72b45db
2 changed files with 7 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue