mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'conspiracyofsilence' into 'master'
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Make powers immune to silence (#8371) Closes #8371 See merge request OpenMW/openmw!4557
This commit is contained in:
commit
31e7e347c4
1 changed files with 3 additions and 3 deletions
|
@ -274,15 +274,15 @@ namespace MWMechanics
|
||||||
|
|
||||||
CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
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)
|
if (spell->mData.mType == ESM::Spell::ST_Power)
|
||||||
return stats.getSpells().canUsePower(spell) ? 100 : 0;
|
return stats.getSpells().canUsePower(spell) ? 100 : 0;
|
||||||
|
|
||||||
if (godmode)
|
if (godmode)
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
|
if (stats.getMagicEffects().getOrDefault(ESM::MagicEffect::Silence).getMagnitude())
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue