1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Merge commit '3c844002626f48007a888d4dd8b0b45ec867fc9a' into feature/VCMIMapFormat1

Conflicts:
	lib/mapObjects/CGHeroInstance.cpp
This commit is contained in:
AlexVinS
2016-02-03 05:04:44 +03:00
24 changed files with 411 additions and 217 deletions

View File

@@ -20,6 +20,7 @@
class CHero;
class CGBoat;
class CGTownInstance;
class CMap;
struct TerrainTile;
struct TurnInfo;
@@ -64,6 +65,9 @@ public:
ConstTransitivePtr<CCommanderInstance> commander;
const CGBoat *boat; //set to CGBoat when sailing
static const ui32 UNINITIALIZED_PORTRAIT = -1;
static const ui32 UNINITIALIZED_MANA = -1;
static const ui32 UNINITIALIZED_MOVEMENT = -1;
//std::vector<const CArtifact*> artifacts; //hero's artifacts from bag
//std::map<ui16, const CArtifact*> artifWorn; //map<position,artifact_id>; positions: 0 - head; 1 - shoulders; 2 - neck; 3 - right hand; 4 - left hand; 5 - torso; 6 - right ring; 7 - left ring; 8 - feet; 9 - misc1; 10 - misc2; 11 - misc3; 12 - misc4; 13 - mach1; 14 - mach2; 15 - mach3; 16 - mach4; 17 - spellbook; 18 - misc5
@@ -124,6 +128,11 @@ public:
}
} skillsInfo;
inline bool isInitialized() const
{ // has this hero been on the map at least once?
return movement != UNINITIALIZED_MOVEMENT && mana != UNINITIALIZED_MANA;
}
//int3 getSightCenter() const; //"center" tile from which the sight distance is calculated
int getSightRadious() const override; //sight distance (should be used if player-owned structure)
//////////////////////////////////////////////////////////////////////////
@@ -203,6 +212,8 @@ public:
void updateSkill(SecondarySkill which, int val);
bool hasVisions(const CGObjectInstance * target, const int subtype) const;
/// If this hero perishes, the scenario is failed
bool isMissionCritical() const;
CGHeroInstance();
virtual ~CGHeroInstance();