mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-11 00:39:59 +00:00
4c1c30db33
Separate linked effect handling into linked effects header Separate spell absorption handling into spell absorption header Make armor disintegration loop a range-based for loop
33 lines
926 B
C++
33 lines
926 B
C++
#ifndef MWMECHANICS_LINKEDEFFECTS_H
|
|
#define MWMECHANICS_LINKEDEFFECTS_H
|
|
|
|
#include <string>
|
|
|
|
namespace ESM
|
|
{
|
|
struct ActiveEffect;
|
|
struct EffectList;
|
|
struct ENAMstruct;
|
|
struct MagicEffect;
|
|
struct Spell;
|
|
}
|
|
|
|
namespace MWWorld
|
|
{
|
|
class Ptr;
|
|
}
|
|
|
|
namespace MWMechanics
|
|
{
|
|
|
|
// Try to reflect a spell effect. If it's reflected, it's also put into the passed reflected effects list.
|
|
bool reflectEffect(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect,
|
|
const MWWorld::Ptr& caster, const MWWorld::Ptr& target, ESM::EffectList& reflectedEffects);
|
|
|
|
// Try to absorb a stat (skill, attribute, etc.) from the target and transfer it to the caster.
|
|
void absorbStat(const ESM::ENAMstruct& effect, const ESM::ActiveEffect& appliedEffect,
|
|
const MWWorld::Ptr& caster, const MWWorld::Ptr& target, bool reflected, const std::string& source);
|
|
}
|
|
|
|
#endif
|