1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Development

This commit is contained in:
nordsoft
2022-11-03 23:48:55 +04:00
parent 219a282916
commit 48925a50f2
5 changed files with 17 additions and 3 deletions

View File

@@ -379,14 +379,22 @@ bool CGarrisonDialogQuery::blocksPack(const CPack * pack) const
return CDialogQuery::blocksPack(pack);
}
CBattleDialogQuery::CBattleDialogQuery(CGameHandler * owner, const BattleInfo * Bi):
CDialogQuery(owner)
{
bi = Bi;
for(auto & side : bi->sides)
addPlayer(side.color);
}
void CBattleDialogQuery::onRemoval(PlayerColor color)
{
assert(answer);
if(*answer == 1)
{
int a = 0;
++a;
gh->startBattlePrimary(bi->sides[0].armyObject, bi->sides[1].armyObject, bi->tile, bi->sides[0].hero, bi->sides[1].hero, bi->creatureBank, bi->town);
}
}