From 8b561ca00c50002d2dc140465880daab6d0b012a Mon Sep 17 00:00:00 2001 From: mateuszb Date: Fri, 26 Mar 2010 19:14:39 +0000 Subject: [PATCH] * fix for 444 --- server/CGameHandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 813d55a2d..83863abbf 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -402,7 +402,8 @@ void CGameHandler::startBattle(const CArmedInstance *army1, const CArmedInstance const CGHeroInstance * curOwner = gs->battleGetOwner(next->ID); - if(next->position < 0 && (!curOwner || curOwner->getSecSkillLevel(10) == 0)) //arrow turret, hero has no ballistics + if( (next->position < 0 && (!curOwner || curOwner->getSecSkillLevel(10) == 0)) //arrow turret, hero has no ballistics + || (next->creature->idNumber == 146 && curOwner->getSecSkillLevel(20) == 0)) //ballista, hero has no artillery { BattleAction attack; attack.actionType = 7; @@ -411,7 +412,7 @@ void CGameHandler::startBattle(const CArmedInstance *army1, const CArmedInstance for(int g=0; gcurB->stacks.size(); ++g) { - if(gs->curB->stacks[g]->attackerOwned && gs->curB->stacks[g]->alive()) + if(gs->curB->stacks[g]->owner != curOwner->tempOwner && gs->curB->stacks[g]->alive()) { attack.destinationTile = gs->curB->stacks[g]->position; break;