Fixed token PT issue for #931

The problem was that back when I added #336 I made it so that if YOU
didnt recive the PT of the token, then it would be fetched from your
tokens.xml, the issue is that we needed to send that value to the
server. The server sees it as a 0/0

This fix will send the PT from the tokens.xml if available.
This commit is contained in:
Matt Lowe 2015-04-10 13:26:38 +02:00
parent db23d3c9ec
commit 9689b8e56a

View file

@ -990,14 +990,14 @@ void Player::actCreateToken()
DlgCreateToken dlg(predefinedTokens);
if (!dlg.exec())
return;
lastTokenName = dlg.getName();
lastTokenPT = dlg.getPT();
if (CardInfo *correctedCard = db->getCardBySimpleName(lastTokenName, false)) {
lastTokenName = correctedCard->getName();
lastTokenPT = correctedCard->getPowTough();
}
lastTokenColor = dlg.getColor();
lastTokenPT = dlg.getPT();
lastTokenAnnotation = dlg.getAnnotation();
lastTokenDestroy = dlg.getDestroy();
aCreateAnotherToken->setEnabled(true);