1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 10:23:51 +00:00
openmw-tes3mp/components/openmw-mp/Base/BaseStructs.hpp
David Cernat ad4214d3e2 Merge pull request #434 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Networking.cpp
	apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp
	components/CMakeLists.txt
	components/openmw-mp/Base/BasePlayer.hpp
	components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp
2018-05-21 09:26:08 +03:00

89 lines
1.5 KiB
C++

#ifndef OPENMW_BASESTRUCTS_HPP
#define OPENMW_BASESTRUCTS_HPP
#include <string>
#include <components/esm/statstate.hpp>
#include <vector>
#include <RakNetTypes.h>
namespace mwmp
{
struct Item
{
std::string refId;
int count;
int charge;
float enchantmentCharge;
inline bool operator==(const Item& rhs)
{
return refId == rhs.refId && count == rhs.count && charge == rhs.charge && enchantmentCharge == rhs.enchantmentCharge;
}
};
struct InventoryChanges
{
enum class Action: int8_t
{
None = -1,
Set = 0,
Add,
Remove
};
std::vector<std::pair<Item, Action>> items;
};
struct Target
{
bool isPlayer;
std::string refId;
int refNumIndex;
int mpNum;
RakNet::RakNetGUID guid;
};
class Attack
{
public:
Target target;
enum class Type: uint8_t
{
Melee = 0,
Magic,
Throwable
};
Type type;
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;
};
}
#endif //OPENMW_BASESTRUCTS_HPP