Browse Source

* added battles with heroes

Michał W. Urbańczyk 17 years ago
parent
commit
72331db843
1 changed files with 4 additions and 4 deletions
  1. 4 4
      CLua.cpp

+ 4 - 4
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);
 	}
 }