forked from mirror/openmw-tes3mp
Do not reduce magicka in god mode
This commit is contained in:
parent
eefe1ed1a8
commit
a45335ffc3
1 changed files with 3 additions and 2 deletions
|
@ -2659,8 +2659,9 @@ namespace MWWorld
|
||||||
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
|
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
|
||||||
|
|
||||||
// Check mana
|
// Check mana
|
||||||
|
bool godmode = (isPlayer && getGodModeState());
|
||||||
MWMechanics::DynamicStat<float> magicka = stats.getMagicka();
|
MWMechanics::DynamicStat<float> magicka = stats.getMagicka();
|
||||||
if (magicka.getCurrent() < spell->mData.mCost && !(isPlayer && getGodModeState()))
|
if (magicka.getCurrent() < spell->mData.mCost && !godmode)
|
||||||
{
|
{
|
||||||
message = "#{sMagicInsufficientSP}";
|
message = "#{sMagicInsufficientSP}";
|
||||||
fail = true;
|
fail = true;
|
||||||
|
@ -2674,7 +2675,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce mana
|
// Reduce mana
|
||||||
if (!fail)
|
if (!fail && !godmode)
|
||||||
{
|
{
|
||||||
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
|
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
|
||||||
stats.setMagicka(magicka);
|
stats.setMagicka(magicka);
|
||||||
|
|
Loading…
Reference in a new issue