Bug #1060: Fix incorrect spell type checks

actorid
scrawl 11 years ago
parent 27092a4494
commit 686d9efac3

@ -125,7 +125,7 @@ namespace MWMechanics
const ESM::Spell *spell = const ESM::Spell *spell =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (iter->first); MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (iter->first);
if (spell->mData.mType & ESM::Spell::ST_Disease) if (spell->mData.mType == ESM::Spell::ST_Disease)
mSpells.erase(iter++); mSpells.erase(iter++);
else else
iter++; iter++;
@ -139,7 +139,7 @@ namespace MWMechanics
const ESM::Spell *spell = const ESM::Spell *spell =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (iter->first); MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (iter->first);
if (spell->mData.mType & ESM::Spell::ST_Blight) if (spell->mData.mType == ESM::Spell::ST_Blight)
mSpells.erase(iter++); mSpells.erase(iter++);
else else
iter++; iter++;

@ -2072,7 +2072,7 @@ namespace MWWorld
} }
// If this is a power, check if it was already used in the last 24h // If this is a power, check if it was already used in the last 24h
if (!fail && spell->mData.mType & ESM::Spell::ST_Power) if (!fail && spell->mData.mType == ESM::Spell::ST_Power)
{ {
if (stats.canUsePower(spell->mId)) if (stats.canUsePower(spell->mId))
stats.usePower(spell->mId); stats.usePower(spell->mId);

Loading…
Cancel
Save