|
@@ -27,17 +27,21 @@ public:
|
|
BARBARIAN, BATTLEMAGE, BEASTMASTER, WITCH, PLANESWALKER, ELEMENTALIST};
|
|
BARBARIAN, BATTLEMAGE, BEASTMASTER, WITCH, PLANESWALKER, ELEMENTALIST};
|
|
|
|
|
|
std::string name; //name of hero
|
|
std::string name; //name of hero
|
|
- int ID;
|
|
|
|
- int lowStack[3], highStack[3]; //amount of units; described below
|
|
|
|
|
|
+ ui16 ID;
|
|
|
|
+ ui32 lowStack[3], highStack[3]; //amount of units; described below
|
|
std::string refTypeStack[3]; //reference names of units appearing in hero's army if he is recruited in tavern
|
|
std::string refTypeStack[3]; //reference names of units appearing in hero's army if he is recruited in tavern
|
|
CHeroClass * heroClass;
|
|
CHeroClass * heroClass;
|
|
EHeroClasses heroType; //hero class
|
|
EHeroClasses heroType; //hero class
|
|
std::vector<std::pair<ui8,ui8> > secSkillsInit; //initial secondary skills; first - ID of skill, second - level of skill (1 - basic, 2 - adv., 3 - expert)
|
|
std::vector<std::pair<ui8,ui8> > secSkillsInit; //initial secondary skills; first - ID of skill, second - level of skill (1 - basic, 2 - adv., 3 - expert)
|
|
|
|
+ si32 startingSpell; //-1 if none
|
|
//bool operator<(CHero& drugi){if (ID < drugi.ID) return true; else return false;}
|
|
//bool operator<(CHero& drugi){if (ID < drugi.ID) return true; else return false;}
|
|
|
|
|
|
|
|
+ CHero();
|
|
|
|
+ ~CHero();
|
|
|
|
+
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
{
|
|
{
|
|
- h & name & ID & lowStack & highStack & refTypeStack & heroType & ID;
|
|
|
|
|
|
+ h & name & ID & lowStack & highStack & refTypeStack & heroType & ID & startingSpell;
|
|
//hero class pointer is restored by herohandler
|
|
//hero class pointer is restored by herohandler
|
|
}
|
|
}
|
|
};
|
|
};
|