mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 09:15:36 +00:00
Bug #1060: Fix incorrect spell type checks
This commit is contained in:
parent
27092a4494
commit
686d9efac3
2 changed files with 3 additions and 3 deletions
|
@ -125,7 +125,7 @@ namespace MWMechanics
|
|||
const ESM::Spell *spell =
|
||||
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++);
|
||||
else
|
||||
iter++;
|
||||
|
@ -139,7 +139,7 @@ namespace MWMechanics
|
|||
const ESM::Spell *spell =
|
||||
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++);
|
||||
else
|
||||
iter++;
|
||||
|
|
|
@ -2072,7 +2072,7 @@ namespace MWWorld
|
|||
}
|
||||
|
||||
// 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))
|
||||
stats.usePower(spell->mId);
|
||||
|
|
Loading…
Reference in a new issue