mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
* bug #569 fixed
This commit is contained in:
parent
28550c85fd
commit
8a063b88e5
@ -2376,8 +2376,9 @@ const CGHeroInstance * CBattleInterface::getActiveHero()
|
|||||||
void CBattleInterface::hexLclicked(int whichOne)
|
void CBattleInterface::hexLclicked(int whichOne)
|
||||||
{
|
{
|
||||||
const CStack * actSt = activeStack;
|
const CStack * actSt = activeStack;
|
||||||
|
const CStack* dest = curInt->cb->battleGetStackByPos(whichOne); //creature at destination tile; -1 if there is no one
|
||||||
if( ((whichOne%BFIELD_WIDTH)!=0 && (whichOne%BFIELD_WIDTH)!=(BFIELD_WIDTH-1)) //if player is trying to attack enemey unit or move creature stack
|
if( ((whichOne%BFIELD_WIDTH)!=0 && (whichOne%BFIELD_WIDTH)!=(BFIELD_WIDTH-1)) //if player is trying to attack enemey unit or move creature stack
|
||||||
|| (actSt->hasBonusOfType(Bonus::CATAPULT) && !spellDestSelectMode )
|
|| (actSt->hasBonusOfType(Bonus::CATAPULT) && !spellDestSelectMode || dest ) //enemy's first aid tent can stand there and we want to shoot it
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!myTurn)
|
if(!myTurn)
|
||||||
@ -2423,7 +2424,6 @@ void CBattleInterface::hexLclicked(int whichOne)
|
|||||||
}
|
}
|
||||||
else //we don't cast any spell
|
else //we don't cast any spell
|
||||||
{
|
{
|
||||||
const CStack* dest = curInt->cb->battleGetStackByPos(whichOne); //creature at destination tile; -1 if there is no one
|
|
||||||
if(!dest || !dest->alive()) //no creature at that tile
|
if(!dest || !dest->alive()) //no creature at that tile
|
||||||
{
|
{
|
||||||
if(std::find(shadedHexes.begin(),shadedHexes.end(),whichOne)!=shadedHexes.end())// and it's in our range
|
if(std::find(shadedHexes.begin(),shadedHexes.end(),whichOne)!=shadedHexes.end())// and it's in our range
|
||||||
|
@ -3874,8 +3874,8 @@ void CGameHandler::handleTownEvents(CGTownInstance * town, NewTurn &n, std::map<
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ev->nextOccurence)
|
if(ev->nextOccurence)
|
||||||
{
|
{
|
||||||
town->events.pop_front();
|
town->events.pop_front();
|
||||||
|
|
||||||
ev->firstOccurence += ev->nextOccurence;
|
ev->firstOccurence += ev->nextOccurence;
|
||||||
std::list<CCastleEvent*>::iterator it = town->events.begin();
|
std::list<CCastleEvent*>::iterator it = town->events.begin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user