Token PT is now set to DB values if not defined in event.
This commit is contained in:
parent
a80ccd882c
commit
e3a94ecca3
1 changed files with 5 additions and 6 deletions
|
@ -1092,13 +1092,12 @@ void Player::eventCreateToken(const Event_CreateToken &event)
|
|||
return;
|
||||
|
||||
CardItem *card = new CardItem(this, QString::fromStdString(event.card_name()), event.card_id());
|
||||
card->setColor(QString::fromStdString(event.color()));
|
||||
|
||||
// use db p/t if not provided in event
|
||||
if (QString::fromStdString(event.pt()).isEmpty())
|
||||
card->setPT(db->getCard(QString::fromStdString(event.card_name()))->getPowTough());
|
||||
else
|
||||
// use db PT if not provided in event
|
||||
if (!QString::fromStdString(event.pt()).isEmpty())
|
||||
card->setPT(QString::fromStdString(event.pt()));
|
||||
else
|
||||
card->setPT(db->getCard(QString::fromStdString(event.card_name()))->getPowTough());
|
||||
card->setColor(QString::fromStdString(event.color()));
|
||||
card->setAnnotation(QString::fromStdString(event.annotation()));
|
||||
card->setDestroyOnZoneChange(event.destroy_on_zone_change());
|
||||
|
||||
|
|
Loading…
Reference in a new issue