Have various game events respect the new UUID attribute on instantiation.

This commit is contained in:
Lukas Brübach 2024-11-07 08:47:04 +01:00
parent 90c4b223dd
commit c9690d790c
12 changed files with 58 additions and 26 deletions

View file

@ -24,8 +24,8 @@ CardItem::CardItem(Player *_owner,
bool _revealedCard,
QGraphicsItem *parent,
CardZone *_zone)
: AbstractCardItem(_name, _uuid, _owner, _cardid, parent), zone(_zone), revealedCard(_revealedCard), attacking(false),
destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
: AbstractCardItem(_name, _uuid, _owner, _cardid, parent), zone(_zone), revealedCard(_revealedCard),
attacking(false), destroyOnZoneChange(false), doesntUntap(false), dragItem(nullptr), attachedTo(nullptr)
{
owner->addCard(this);
@ -243,6 +243,7 @@ void CardItem::processCardInfo(const ServerInfo_Card &_info)
}
setId(_info.id());
setUUID(QString::fromStdString(_info.uuid()));
setName(QString::fromStdString(_info.name()));
setAttacking(_info.attacking());
setFaceDown(_info.face_down());