2017-04-17 11:37:19 +00:00
|
|
|
#ifndef OPENMW_MECHANICSHELPER_HPP
|
|
|
|
#define OPENMW_MECHANICSHELPER_HPP
|
|
|
|
|
2017-04-17 13:09:07 +00:00
|
|
|
#include <components/openmw-mp/Base/BaseStructs.hpp>
|
|
|
|
|
2017-04-17 11:37:19 +00:00
|
|
|
#include <osg/Vec3f>
|
|
|
|
|
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
namespace MechanicsHelper
|
|
|
|
{
|
|
|
|
osg::Vec3f getLinearInterpolation(osg::Vec3f start, osg::Vec3f end, float percent);
|
2017-04-17 13:09:07 +00:00
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
void spawnLeveledCreatures(MWWorld::CellStore* cellStore);
|
2017-05-06 05:40:36 +00:00
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
mwmp::Attack *getLocalAttack(const MWWorld::Ptr& ptr);
|
|
|
|
mwmp::Attack *getDedicatedAttack(const MWWorld::Ptr& ptr);
|
2017-04-19 07:36:23 +00:00
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
MWWorld::Ptr getPlayerPtr(const mwmp::Target& target);
|
2017-05-30 07:11:01 +00:00
|
|
|
|
2018-07-05 13:36:52 +00:00
|
|
|
mwmp::Target getTarget(const MWWorld::Ptr& ptr);
|
|
|
|
void clearTarget(mwmp::Target& target);
|
|
|
|
bool isEmptyTarget(const mwmp::Target& target);
|
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
void assignAttackTarget(mwmp::Attack* attack, const MWWorld::Ptr& target);
|
|
|
|
void resetAttack(mwmp::Attack* attack);
|
2017-04-19 14:09:35 +00:00
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
bool getSpellSuccess(std::string spellId, const MWWorld::Ptr& caster);
|
2017-04-19 08:05:13 +00:00
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
void processAttack(mwmp::Attack attack, const MWWorld::Ptr& attacker);
|
2018-01-25 22:45:39 +00:00
|
|
|
|
2018-01-26 01:18:01 +00:00
|
|
|
bool doesEffectListContainEffect(const ESM::EffectList& effectList, short effectId, short attributeId = -1, short skillId = -1);
|
2018-01-27 17:37:16 +00:00
|
|
|
void unequipItemsByEffect(const MWWorld::Ptr& ptr, short enchantmentType, short effectId, short attributeId = -1, short skillId = -1);
|
2017-04-17 11:37:19 +00:00
|
|
|
}
|
|
|
|
|
2017-06-27 08:34:32 +00:00
|
|
|
|
2017-04-17 11:37:19 +00:00
|
|
|
#endif //OPENMW_MECHANICSHELPER_HPP
|