1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix for starting hero being passable

This commit is contained in:
Tomasz Zieliński 2023-12-09 14:59:09 +01:00
parent ef61456681
commit cef25cca03
2 changed files with 8 additions and 0 deletions

View File

@ -150,6 +150,11 @@ bool CGHeroInstance::isCoastVisitable() const
return true;
}
bool CGHeroInstance::isBlockedVisitable() const
{
return true;
}
BattleField CGHeroInstance::getBattlefield() const
{
return BattleField::NONE;
@ -281,6 +286,7 @@ CGHeroInstance::CGHeroInstance():
ID = Obj::HERO;
secSkills.emplace_back(SecondarySkill::NONE, -1);
blockVisit = true;
removable = true;
}
PlayerColor CGHeroInstance::getOwner() const
@ -301,6 +307,7 @@ void CGHeroInstance::setHeroType(HeroTypeID heroType)
void CGHeroInstance::initHero(CRandomGenerator & rand, const HeroTypeID & SUBID)
{
blockVisit = true;
subID = SUBID.getNum();
initHero(rand);
}

View File

@ -301,6 +301,7 @@ public:
void updateFrom(const JsonNode & data) override;
bool isCoastVisitable() const override;
bool isBlockedVisitable() const override;
BattleField getBattlefield() const override;
protected:
void setPropertyDer(ObjProperty what, ObjPropertyID identifier) override;//synchr