From 9689b8e56a5d97845ea6c90f97f6057d3a82edb6 Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Fri, 10 Apr 2015 13:26:38 +0200 Subject: [PATCH] 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. --- cockatrice/src/player.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index a7971fc2..bb69a774 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -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);