mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Commander can now die in a battle and will be automatically rised when visiting town.
This commit is contained in:
@ -2046,7 +2046,17 @@ void CGTownInstance::onHeroVisit(const CGHeroInstance * h) const
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (h->commander && !h->commander->alive) //rise commander. TODO: interactive script
|
||||
{
|
||||
SetCommanderProperty scp;
|
||||
scp.heroid = h->id;
|
||||
scp.which = SetCommanderProperty::ALIVE;
|
||||
scp.amount = 1;
|
||||
cb->sendAndApply (&scp);
|
||||
}
|
||||
cb->heroVisitCastle(id, h->id);
|
||||
}
|
||||
}
|
||||
|
||||
void CGTownInstance::onHeroLeave(const CGHeroInstance * h) const
|
||||
|
Reference in New Issue
Block a user