Make powers immune to silence (#8371)

This commit is contained in:
Alexei Kotov 2025-02-27 18:25:37 +03:00
parent a6676fd6f3
commit ec2c031792

View file

@ -274,15 +274,15 @@ namespace MWMechanics
CreatureStats& stats = actor.getClass().getCreatureStats(actor);
if (stats.getMagicEffects().getOrDefault(ESM::MagicEffect::Silence).getMagnitude() && !godmode)
return 0;
if (spell->mData.mType == ESM::Spell::ST_Power)
return stats.getSpells().canUsePower(spell) ? 100 : 0;
if (godmode)
return 100;
if (stats.getMagicEffects().getOrDefault(ESM::MagicEffect::Silence).getMagnitude())
return 0;
if (spell->mData.mType != ESM::Spell::ST_Spell)
return 100;