2011-05-10 01:20:47 +03:00
|
|
|
#pragma once
|
2012-04-23 22:56:37 +03:00
|
|
|
#include "BattleHex.h"
|
|
|
|
|
|
|
|
struct CObstacleInfo;
|
2011-05-10 01:20:47 +03:00
|
|
|
|
2011-12-14 00:23:17 +03:00
|
|
|
struct DLL_LINKAGE CObstacleInstance
|
2011-05-10 01:20:47 +03:00
|
|
|
{
|
2012-04-23 22:56:37 +03:00
|
|
|
si32 uniqueID;
|
|
|
|
si32 ID; //ID of obstacle (defines type of it)
|
|
|
|
BattleHex pos; //position on battlefield
|
|
|
|
|
|
|
|
ui8 isAbsoluteObstacle; //if true, then position is meaningless
|
|
|
|
|
|
|
|
CObstacleInstance();
|
|
|
|
|
|
|
|
const CObstacleInfo &getInfo() const;
|
|
|
|
std::vector<BattleHex> getBlocked() const;
|
|
|
|
|
2011-05-10 01:20:47 +03:00
|
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
|
|
{
|
2012-04-23 22:56:37 +03:00
|
|
|
h & ID & pos & isAbsoluteObstacle & uniqueID;
|
2011-05-10 01:20:47 +03:00
|
|
|
}
|
|
|
|
};
|