|
@@ -409,28 +409,6 @@ void CBattleDialogQuery::onRemoval(PlayerColor color)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-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)
|
|
|
|
- {
|
|
|
|
- gh->startBattlePrimary(bi->sides[0].armyObject, bi->sides[1].armyObject, bi->tile, bi->sides[0].hero, bi->sides[1].hero, bi->creatureBank, bi->town);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- gh->endBattleConfirm(bi);
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void CBlockingDialogQuery::notifyObjectAboutRemoval(const CObjectVisitQuery & objectVisit) const
|
|
void CBlockingDialogQuery::notifyObjectAboutRemoval(const CObjectVisitQuery & objectVisit) const
|
|
{
|
|
{
|
|
assert(answer);
|
|
assert(answer);
|