1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-23 21:29:13 +02:00
vcmi/lib/CObstacleInstance.cpp

22 lines
459 B
C++
Raw Normal View History

2012-04-23 20:20:43 +00:00
#include "StdInc.h"
#include "CObstacleInstance.h"
#include "CHeroHandler.h"
#include "VCMI_Lib.h"
CObstacleInstance::CObstacleInstance()
{
isAbsoluteObstacle = false;
}
const CObstacleInfo & CObstacleInstance::getInfo() const
{
if(isAbsoluteObstacle)
return VLC->heroh->absoluteObstacles[ID];
return VLC->heroh->obstacles[ID];
}
std::vector<BattleHex> CObstacleInstance::getBlocked() const
{
return getInfo().getBlocked(pos);
}