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:
parent
1402b6d634
commit
72331db843
8
CLua.cpp
8
CLua.cpp
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user