mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-06 01:49:41 +00:00
[Client] Add isStackingSpell() method to MechanicsHelper
This commit is contained in:
parent
f03a87df3c
commit
e6a1f0889f
2 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue