CardsValue is now optionally sent by the server.

This commit is contained in:
lotodore
2011-11-13 15:31:35 +00:00
parent edef79e9d1
commit edde9137ae
5 changed files with 23 additions and 18 deletions
+6 -2
View File
@@ -1676,7 +1676,9 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
tmpPlayer->setMyCards(tmpCards);
for (int num = 0; num < 5; num++)
bestHandPos[num] = *r->bestHandPosition.list.array[num];
tmpPlayer->setMyCardsValueInt(r->cardsValue);
if (r->cardsValue) {
tmpPlayer->setMyCardsValueInt(*r->cardsValue);
}
tmpPlayer->setMyBestHandPosition(bestHandPos);
tmpPlayer->setMyCash(r->playerMoney);
tmpPlayer->setLastMoneyWon(r->moneyWon);
@@ -1984,7 +1986,9 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
tmpPlayer->setMyCards(tmpCards);
for (int num = 0; num < 5; num++)
bestHandPos[num] = *r->bestHandPosition.list.array[num];
tmpPlayer->setMyCardsValueInt(r->cardsValue);
if (r->cardsValue) {
tmpPlayer->setMyCardsValueInt(*r->cardsValue);
}
tmpPlayer->setMyBestHandPosition(bestHandPos);
if (tmpPlayer->getMyCardsValueInt() > highestValueOfCards)
highestValueOfCards = tmpPlayer->getMyCardsValueInt();