1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-02 03:15:32 +00:00
openmw-tes3mp/components/openmw-mp/Base/BaseStructs.hpp
David Cernat a037193e79 Merge pull request #372 from TES3MP/0.6.2 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Actors.cpp
	apps/openmw-mp/Script/Functions/Actors.hpp
	apps/openmw-mp/Script/Functions/Items.cpp
	apps/openmw-mp/Script/Functions/Items.hpp
	apps/openmw-mp/Script/Functions/World.cpp
	apps/openmw-mp/Script/Functions/World.hpp
	apps/openmw/mwmp/WorldEvent.cpp
	components/openmw-mp/Packets/Player/PacketPlayerEquipment.cpp
	components/openmw-mp/Version.hpp
2018-01-18 13:40:13 +02:00

83 lines
1.5 KiB
C++

#ifndef OPENMW_BASESTRUCTS_HPP
#define OPENMW_BASESTRUCTS_HPP
#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 InventoryChanges
{
std::vector<Item> items;
enum class Type: int8_t
{
None = -1,
Set = 0,
Add,
Remove
};
Type action; // 0 - Clear and set in entirety, 1 - Add item, 2 - Remove item
};
struct Target
{
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 shouldSend;
};
struct Animation
{
std::string groupname;
int mode;
int count;
bool persist;
};
}
#endif //OPENMW_BASESTRUCTS_HPP