1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

* added battles with heroes

This commit is contained in:
Michał W. Urbańczyk 2008-09-17 17:13:01 +00:00
parent 1402b6d634
commit 72331db843

View File

@ -762,7 +762,7 @@ void CHeroScript::onHeroVisit(int objid, int heroID)
{
//TODO: check for allies
const CGHeroInstance *my = cb->getHero(objid),
*vis = cb->getHero(objid);
*vis = cb->getHero(heroID);
if(my->tempOwner == vis->tempOwner) //one of allied cases
{
//exchange
@ -770,11 +770,11 @@ void CHeroScript::onHeroVisit(int objid, int heroID)
else
{
cb->startBattle(
&my->army,
&vis->army,
my->pos,
my,
&my->army,
vis->pos,
vis,
my,
0);
}
}