[Game] Move zone dump request onto ZoneViewZoneLogic per review

This commit is contained in:
BruebachL 2026-10-13 11:49:35 +02:00 • committed by GitHub
parent aabec45d2b
commit 1ab7f3666d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 5 deletions

View file

@ -97,10 +97,10 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
}
reorganizeCards();
} else if (!qobject_cast<ZoneViewZoneLogic *>(getLogic())->getOriginalZone()->contentsKnown()) {
auto *playerActions = getLogic()->getPlayer()->getPlayerActions();
PendingCommand *pend = playerActions->prepareZoneDump(getLogic(), numberCards);
connect(pend, &PendingCommand::finished, this, &ZoneViewZone::zoneDumpReceived);
playerActions->sendGameCommand(pend);
PendingCommand *pend = qobject_cast<ZoneViewZoneLogic *>(getLogic())->requestZoneDump();
if (pend != nullptr) {
connect(pend, &PendingCommand::finished, this, &ZoneViewZone::zoneDumpReceived);
}
} else {
const CardList &c = qobject_cast<ZoneViewZoneLogic *>(getLogic())->getOriginalZone()->getCards();
int number = numberCards == -1 ? c.size() : (numberCards < c.size() ? numberCards : c.size());