Only use local db if no pt is provided

Addresses issue #1032

If a token is created with no p/t then the local db value will be passed
instead. If a value is provided then that will be used instead.
This commit is contained in:
Matt Lowe 2015-04-27 10:17:46 +02:00
parent 11da8d09bf
commit 6fd5c4dd27

View file

@ -1003,6 +1003,7 @@ void Player::actCreateToken()
lastTokenPT = dlg.getPT();
if (CardInfo *correctedCard = db->getCardBySimpleName(lastTokenName, false)) {
lastTokenName = correctedCard->getName();
if (lastTokenPT.isEmpty())
lastTokenPT = correctedCard->getPowTough();
}
lastTokenColor = dlg.getColor();