From 6fd5c4dd270410a38d16c8bb903de16a3e85292e Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Mon, 27 Apr 2015 10:17:46 +0200 Subject: [PATCH] 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. --- cockatrice/src/player.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index c20746db..0b02c4db 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -1003,7 +1003,8 @@ void Player::actCreateToken() lastTokenPT = dlg.getPT(); if (CardInfo *correctedCard = db->getCardBySimpleName(lastTokenName, false)) { lastTokenName = correctedCard->getName(); - lastTokenPT = correctedCard->getPowTough(); + if (lastTokenPT.isEmpty()) + lastTokenPT = correctedCard->getPowTough(); } lastTokenColor = dlg.getColor(); lastTokenAnnotation = dlg.getAnnotation();