power and toughness values displayed after card flip (#3120)
This commit is contained in:
parent
66958b5975
commit
281e52eaa9
3 changed files with 10 additions and 0 deletions
|
@ -2205,6 +2205,11 @@ void Player::cardMenuAction()
|
|||
cmd->set_zone(card->getZone()->getName().toStdString());
|
||||
cmd->set_card_id(card->getId());
|
||||
cmd->set_face_down(!card->getFaceDown());
|
||||
if (card->getFaceDown()) {
|
||||
CardInfoPtr ci = card->getInfo();
|
||||
if (ci)
|
||||
cmd->set_pt(ci->getPowTough().toStdString());
|
||||
}
|
||||
commandList.append(cmd);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ message Command_FlipCard {
|
|||
optional string zone = 1;
|
||||
optional sint32 card_id = 2 [default = -1];
|
||||
optional bool face_down = 3;
|
||||
optional string pt = 4;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1013,6 +1013,10 @@ Server_Player::cmdFlipCard(const Command_FlipCard &cmd, ResponseContainer & /*rc
|
|||
event.set_face_down(faceDown);
|
||||
ges.enqueueGameEvent(event, playerId);
|
||||
|
||||
QString ptString = QString::fromStdString(cmd.pt());
|
||||
if (!ptString.isEmpty() && !faceDown)
|
||||
setCardAttrHelper(ges, playerId, zone->getName(), card->getId(), AttrPT, ptString);
|
||||
|
||||
return Response::RespOk;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue