1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:19:56 +00:00
openmw-tes3mp/components/openmw-mp/Base/BaseStructs.hpp
David Cernat 09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
2018-07-13 04:12:03 +03:00

83 lines
1.5 KiB
C++

#ifndef OPENMW_BASESTRUCTS_HPP
#define OPENMW_BASESTRUCTS_HPP
#include <string>
#include <components/esm/statstate.hpp>
#include <RakNetTypes.h>
namespace mwmp
{
struct Item
{
std::string refId;
int count;
int charge;
double enchantmentCharge;
inline bool operator==(const Item& rhs)
{
return refId == rhs.refId && count == rhs.count && charge == rhs.charge && enchantmentCharge == rhs.enchantmentCharge;
}
};
struct Target
{
bool isPlayer;
std::string refId;
int refNum;
int mpNum;
std::string name; // Remove this once the server can get names corresponding to different refIds
RakNet::RakNetGUID guid;
};
class Attack
{
public:
Target target;
char type; // 0 - melee, 1 - magic, 2 - throwable
enum TYPE
{
MELEE = 0,
MAGIC,
THROWABLE
};
std::string spellId; // id of spell (e.g. "fireball")
float damage;
bool success;
bool block;
bool pressed;
bool instant;
bool knockdown;
bool applyWeaponEnchantment;
bool applyProjectileEnchantment;
bool shouldSend;
};
struct Animation
{
std::string groupname;
int mode;
int count;
bool persist;
};
struct SimpleCreatureStats
{
ESM::StatState<float> mDynamic[3];
bool mDead;
};
}
#endif //OPENMW_BASESTRUCTS_HPP