mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Hackfix crash on "victory by town capture"
This commit is contained in:
parent
fd2a33bc36
commit
a79f11bed2
@ -679,6 +679,11 @@ void CGTownInstance::onHeroVisit(const CGHeroInstance * h) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cb->setOwner(this, h->tempOwner);
|
cb->setOwner(this, h->tempOwner);
|
||||||
|
if(cb->gameState()->getPlayerStatus(h->getOwner()) == EPlayerStatus::WINNER)
|
||||||
|
{
|
||||||
|
return; //we just won game, we do not need to perform any extra actions
|
||||||
|
//TODO: check how does H3 behave, visiting town on victory can affect campaigns (spells learned, +1 stat building visited)
|
||||||
|
}
|
||||||
removeCapitols(h->getOwner());
|
removeCapitols(h->getOwner());
|
||||||
cb->heroVisitCastle(this, h);
|
cb->heroVisitCastle(this, h);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user