Commit 277aba79 authored by Gavin Bisesi's avatar Gavin Bisesi
Browse files

Merge pull request #336 from poixen/master

Tokens use PT levels from cards.xml if available
parents 48817ed2 e3a94ecc
...@@ -1092,8 +1092,12 @@ void Player::eventCreateToken(const Event_CreateToken &event) ...@@ -1092,8 +1092,12 @@ void Player::eventCreateToken(const Event_CreateToken &event)
return; return;
CardItem *card = new CardItem(this, QString::fromStdString(event.card_name()), event.card_id()); CardItem *card = new CardItem(this, QString::fromStdString(event.card_name()), event.card_id());
// 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->setColor(QString::fromStdString(event.color()));
card->setPT(QString::fromStdString(event.pt()));
card->setAnnotation(QString::fromStdString(event.annotation())); card->setAnnotation(QString::fromStdString(event.annotation()));
card->setDestroyOnZoneChange(event.destroy_on_zone_change()); card->setDestroyOnZoneChange(event.destroy_on_zone_change());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment