diff --git a/apps/openmw/mwmp/MechanicsHelper.cpp b/apps/openmw/mwmp/MechanicsHelper.cpp index cc4337139..ecfe073e5 100644 --- a/apps/openmw/mwmp/MechanicsHelper.cpp +++ b/apps/openmw/mwmp/MechanicsHelper.cpp @@ -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().search(id); +} + bool MechanicsHelper::doesEffectListContainEffect(const ESM::EffectList& effectList, short effectId, short attributeId, short skillId) { for (const auto &effect : effectList.mList) diff --git a/apps/openmw/mwmp/MechanicsHelper.hpp b/apps/openmw/mwmp/MechanicsHelper.hpp index 684bacddc..ca7cf3861 100644 --- a/apps/openmw/mwmp/MechanicsHelper.hpp +++ b/apps/openmw/mwmp/MechanicsHelper.hpp @@ -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);