mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Bug #1060: Fix incorrect spell type checks
This commit is contained in:
parent
27092a4494
commit
686d9efac3
@ -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…
x
Reference in New Issue
Block a user