mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
Merge pull request #1381 from akortunov/spellschoolfix
Fixes regression in spell school detection (bug #4007)
This commit is contained in:
commit
4ec5060374
1 changed files with 5 additions and 5 deletions
|
@ -121,6 +121,11 @@ namespace MWMechanics
|
||||||
|
|
||||||
CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
||||||
|
|
||||||
|
float castBonus = -stats.getMagicEffects().get(ESM::MagicEffect::Sound).getMagnitude();
|
||||||
|
|
||||||
|
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
||||||
|
castChance *= stats.getFatigueTerm();
|
||||||
|
|
||||||
if (stats.getMagicEffects().get(ESM::MagicEffect::Silence).getMagnitude()&& !godmode)
|
if (stats.getMagicEffects().get(ESM::MagicEffect::Silence).getMagnitude()&& !godmode)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -138,11 +143,6 @@ namespace MWMechanics
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
float castBonus = -stats.getMagicEffects().get(ESM::MagicEffect::Sound).getMagnitude();
|
|
||||||
|
|
||||||
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
|
||||||
castChance *= stats.getFatigueTerm();
|
|
||||||
|
|
||||||
if (!cap)
|
if (!cap)
|
||||||
return std::max(0.f, castChance);
|
return std::max(0.f, castChance);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue