forked from teamnwah/openmw-tes3coop
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 =
|
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…
Reference in a new issue