1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 21:40:03 +00:00
OpenMW/apps/openmw/mwmechanics/spelleffects.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
C++
Raw Normal View History

#ifndef GAME_MWMECHANICS_SPELLEFFECTS_H
#define GAME_MWMECHANICS_SPELLEFFECTS_H
#include "activespells.hpp"
// These functions should probably be split up into separate Lua functions for each magic effect when magic is
// dehardcoded. That way ESM::MGEF could point to two Lua scripts for each effect. Needs discussion.
2022-08-05 00:00:49 +02:00
namespace MWWorld
{
class Ptr;
}
namespace MWMechanics
{
struct MagicApplicationResult
{
enum class Type
{
APPLIED,
REMOVED,
REFLECTED
};
Type mType;
bool mShowHit;
bool mShowHealth;
};
// Applies a tick of a single effect. Returns true if the effect should be removed immediately
MagicApplicationResult applyMagicEffect(const MWWorld::Ptr& target, const MWWorld::Ptr& caster,
ActiveSpells::ActiveSpellParams& spellParams, ESM::ActiveEffect& effect, float dt);
// Undoes permanent effects created by ESM::MagicEffect::AppliedOnce
void onMagicEffectRemoved(
const MWWorld::Ptr& target, ActiveSpells::ActiveSpellParams& spell, const ESM::ActiveEffect& effect);
}
#endif