1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Handle Unreflectable flag

This commit is contained in:
scrawl 2013-11-19 17:33:02 +01:00
parent c03c82c78a
commit f3ff2e4260

View file

@ -95,7 +95,7 @@ namespace MWMechanics
}
// Try reflecting
if (!reflected && magnitudeMult > 0 && caster != target)
if (!reflected && magnitudeMult > 0 && caster != target && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable))
{
int reflect = target.getClass().getCreatureStats(target).getMagicEffects().get(ESM::MagicEffect::Reflect).mMagnitude;
int roll = std::rand()/ (static_cast<double> (RAND_MAX) + 1) * 100; // [0, 99]