mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed CID 1197490, CID 1197491
This commit is contained in:
parent
ca13bb8412
commit
384c5827ae
@ -27,6 +27,29 @@ namespace fs = boost::filesystem;
|
||||
*
|
||||
*/
|
||||
|
||||
CCampaignHeader::CCampaignHeader()
|
||||
: version(0), mapVersion(0), difficultyChoosenByPlayer(0), music(0), filename(), loadFromLod(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CScenarioTravel::STravelBonus::STravelBonus()
|
||||
:type(SPELL), info1(0), info2(0), info3(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CScenarioTravel::STravelBonus::isBonusForHero() const
|
||||
{
|
||||
return type == SPELL || type == MONSTER || type == ARTIFACT || type == SPELL_SCROLL || type == PRIMARY_SKILL
|
||||
|| type == SECONDARY_SKILL;
|
||||
}
|
||||
|
||||
CScenarioTravel::CScenarioTravel()
|
||||
:whatHeroKeeps(0), startOptions(0), playerColor(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CCampaignHeader CCampaignHandler::getHeader( const std::string & name)
|
||||
{
|
||||
@ -378,12 +401,6 @@ std::vector<CGHeroInstance *> CCampaignScenario::getLostCrossoverHeroes() const
|
||||
return lostCrossoverHeroes;
|
||||
}
|
||||
|
||||
bool CScenarioTravel::STravelBonus::isBonusForHero() const
|
||||
{
|
||||
return type == SPELL || type == MONSTER || type == ARTIFACT || type == SPELL_SCROLL || type == PRIMARY_SKILL
|
||||
|| type == SECONDARY_SKILL;
|
||||
}
|
||||
|
||||
void CCampaignState::setCurrentMapAsConquered( const std::vector<CGHeroInstance*> & heroes )
|
||||
{
|
||||
camp->scenarios[*currentMap].crossoverHeroes = heroes;
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
std::string filename;
|
||||
ui8 loadFromLod; //if true, this campaign must be loaded fro, .lod file
|
||||
|
||||
CCampaignHeader();
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int formatVersion)
|
||||
{
|
||||
h & version & mapVersion & name & description & difficultyChoosenByPlayer & music & filename & loadFromLod;
|
||||
@ -65,6 +67,8 @@ public:
|
||||
|
||||
bool isBonusForHero() const;
|
||||
|
||||
STravelBonus();
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int formatVersion)
|
||||
{
|
||||
h & type & info1 & info2 & info3;
|
||||
@ -73,6 +77,8 @@ public:
|
||||
|
||||
std::vector<STravelBonus> bonusesToChoose;
|
||||
|
||||
CScenarioTravel();
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int formatVersion)
|
||||
{
|
||||
h & whatHeroKeeps & monstersKeptByHero & artifsKeptByHero & startOptions & playerColor & bonusesToChoose;
|
||||
|
Loading…
Reference in New Issue
Block a user