2017-04-08 05:59:21 +00:00
|
|
|
#ifndef OPENMW_BASESTRUCTS_HPP
|
|
|
|
#define OPENMW_BASESTRUCTS_HPP
|
|
|
|
|
2017-04-30 15:44:59 +00:00
|
|
|
#include <components/esm/statstate.hpp>
|
|
|
|
|
2017-04-17 12:12:11 +00:00
|
|
|
#include <RakNetTypes.h>
|
|
|
|
|
2017-04-08 05:59:21 +00:00
|
|
|
namespace mwmp
|
|
|
|
{
|
2017-05-26 01:37:49 +00:00
|
|
|
struct Item
|
|
|
|
{
|
|
|
|
std::string refId;
|
|
|
|
int count;
|
|
|
|
int charge;
|
2018-01-17 06:09:57 +00:00
|
|
|
double enchantmentCharge;
|
2017-05-26 01:37:49 +00:00
|
|
|
|
|
|
|
inline bool operator==(const Item& rhs)
|
|
|
|
{
|
2017-12-23 11:16:38 +00:00
|
|
|
return refId == rhs.refId && count == rhs.count && charge == rhs.charge && enchantmentCharge == rhs.enchantmentCharge;
|
2017-05-26 01:37:49 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-04-17 15:31:39 +00:00
|
|
|
struct Target
|
|
|
|
{
|
2018-04-05 09:48:53 +00:00
|
|
|
bool isPlayer;
|
|
|
|
|
2017-04-17 15:31:39 +00:00
|
|
|
std::string refId;
|
|
|
|
int refNumIndex;
|
|
|
|
int mpNum;
|
|
|
|
|
|
|
|
RakNet::RakNetGUID guid;
|
|
|
|
};
|
|
|
|
|
2017-04-17 12:12:11 +00:00
|
|
|
class Attack
|
|
|
|
{
|
|
|
|
public:
|
2017-04-17 15:31:39 +00:00
|
|
|
|
|
|
|
Target target;
|
2017-04-17 14:24:11 +00:00
|
|
|
|
2017-04-17 12:12:11 +00:00
|
|
|
char type; // 0 - melee, 1 - magic, 2 - throwable
|
|
|
|
enum TYPE
|
|
|
|
{
|
|
|
|
MELEE = 0,
|
|
|
|
MAGIC,
|
|
|
|
THROWABLE
|
|
|
|
};
|
2017-04-17 14:24:11 +00:00
|
|
|
|
|
|
|
std::string spellId; // id of spell (e.g. "fireball")
|
2017-04-19 13:43:58 +00:00
|
|
|
|
|
|
|
float damage;
|
|
|
|
|
2017-04-17 16:54:31 +00:00
|
|
|
bool success;
|
|
|
|
bool block;
|
2017-04-19 13:43:58 +00:00
|
|
|
|
2017-04-17 16:54:31 +00:00
|
|
|
bool pressed;
|
2017-07-28 17:49:26 +00:00
|
|
|
bool instant;
|
2017-04-17 16:54:31 +00:00
|
|
|
bool knockdown;
|
2018-04-03 11:12:27 +00:00
|
|
|
bool applyWeaponEnchantment;
|
|
|
|
bool applyProjectileEnchantment;
|
2017-04-19 13:43:58 +00:00
|
|
|
|
|
|
|
bool shouldSend;
|
2017-04-17 12:12:11 +00:00
|
|
|
};
|
|
|
|
|
2017-04-08 05:59:21 +00:00
|
|
|
struct Animation
|
|
|
|
{
|
|
|
|
std::string groupname;
|
|
|
|
int mode;
|
|
|
|
int count;
|
|
|
|
bool persist;
|
|
|
|
};
|
2017-04-30 15:44:59 +00:00
|
|
|
|
|
|
|
struct SimpleCreatureStats
|
|
|
|
{
|
|
|
|
ESM::StatState<float> mDynamic[3];
|
2017-05-08 23:47:29 +00:00
|
|
|
bool mDead;
|
2017-04-30 15:44:59 +00:00
|
|
|
};
|
2017-04-08 05:59:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_BASESTRUCTS_HPP
|