mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[Refactor] Retype PlayerActions onto CardState
This commit is contained in:
parent
e2cbbecefe
commit
e0d2f158e9
14 changed files with 137 additions and 126 deletions
|
|
@ -444,7 +444,7 @@ void ArrowDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||
startCard->playCard(false);
|
||||
}
|
||||
|
||||
player->getPlayerActions()->createArrow(startCard, arrow, deleteInPhase);
|
||||
player->getPlayerActions()->createArrow(startCard->getState(), arrow, deleteInPhase);
|
||||
}
|
||||
|
||||
delArrow();
|
||||
|
|
@ -536,7 +536,7 @@ void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||
auto *startCard = qgraphicsitem_cast<CardItem *>(startItem);
|
||||
auto *targetCard = qgraphicsitem_cast<CardItem *>(targetItem);
|
||||
if (startCard && targetCard) {
|
||||
player->getPlayerActions()->attachCards(startCard, targetCard);
|
||||
player->getPlayerActions()->attachCards(startCard->getState(), targetCard->getState());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue