[Client] Add isStackingSpell() method to MechanicsHelper

pull/593/head
David Cernat 3 years ago
parent f03a87df3c
commit e6a1f0889f

@ -562,6 +562,11 @@ void MechanicsHelper::processCast(Cast cast, const MWWorld::Ptr& caster)
}
}
bool MechanicsHelper::isStackingSpell(const std::string& id)
{
return !MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().search(id);
}
bool MechanicsHelper::doesEffectListContainEffect(const ESM::EffectList& effectList, short effectId, short attributeId, short skillId)
{
for (const auto &effect : effectList.mList)

@ -46,6 +46,7 @@ namespace MechanicsHelper
void processAttack(mwmp::Attack attack, const MWWorld::Ptr& attacker);
void processCast(mwmp::Cast cast, const MWWorld::Ptr& caster);
bool isStackingSpell(const std::string& id);
bool doesEffectListContainEffect(const ESM::EffectList& effectList, short effectId, short attributeId = -1, short skillId = -1);
void unequipItemsByEffect(const MWWorld::Ptr& ptr, short enchantmentType, short effectId, short attributeId = -1, short skillId = -1);

Loading…
Cancel
Save