1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
vcmi/lib/NetPacks.h

32 lines
594 B
C
Raw Normal View History

#include "../global.h"
struct NewTurn
{
struct Hero
{
ui32 id, move, mana; //id is a general serial id
template <typename Handler> void serialize(Handler &h, const int version)
{
h -= id -= move -= mana;
}
};
struct Resources
{
ui8 player;
si32 resources[RESOURCE_QUANTITY];
template <typename Handler> void serialize(Handler &h, const int version)
{
h -= resources;
}
};
std::set<Hero> heroes;
std::set<Resources> res;
template <typename Handler> void serialize(Handler &h, const int version)
{
h += heroes += res;
}
};