[CardInfo] refactor some fields into a UiAttributes struct (#6322)

* refactor CardInfo

* refactor everything else
This commit is contained in:
RickyRister 2025-11-16 08:56:57 -08:00 committed by GitHub
parent 722344967f
commit 9a3104c5ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 73 additions and 87 deletions

View file

@ -238,8 +238,8 @@ void ArrowDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (startZone->getName().compare("hand") == 0) {
startCard->playCard(false);
CardInfoPtr ci = startCard->getCard().getCardPtr();
if (ci && ((!SettingsCache::instance().getPlayToStack() && ci->getTableRow() == 3) ||
(SettingsCache::instance().getPlayToStack() && ci->getTableRow() != 0 &&
if (ci && ((!SettingsCache::instance().getPlayToStack() && ci->getUiAttributes().tableRow == 3) ||
(SettingsCache::instance().getPlayToStack() && ci->getUiAttributes().tableRow != 0 &&
startCard->getZone()->getName().toStdString() != "stack")))
cmd.set_start_zone("stack");
else