mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Do not reduce magicka in god mode
This commit is contained in:
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…
x
Reference in New Issue
Block a user