Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -451,6 +451,7 @@ message HandStartMessage {
|
|||||||
optional bytes encryptedCards = 3;
|
optional bytes encryptedCards = 3;
|
||||||
required uint32 smallBlind = 4;
|
required uint32 smallBlind = 4;
|
||||||
repeated NetPlayerState seatStates = 5;
|
repeated NetPlayerState seatStates = 5;
|
||||||
|
optional uint32 dealerPlayerId = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PlayersTurnMessage {
|
message PlayersTurnMessage {
|
||||||
|
|||||||
+9
-6
@@ -220,8 +220,9 @@ void Game::startHand()
|
|||||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
|
boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||||
PlayerListIterator i = getSeatsList()->begin();
|
PlayerList tmpList = getSeatsList();
|
||||||
PlayerListIterator end = getSeatsList()->end();
|
PlayerListIterator i = tmpList->begin();
|
||||||
|
PlayerListIterator end = tmpList->end();
|
||||||
while (i != end) {
|
while (i != end) {
|
||||||
if ((*i)->getMyUniqueID() == id) {
|
if ((*i)->getMyUniqueID() == id) {
|
||||||
tmpPlayer = *i;
|
tmpPlayer = *i;
|
||||||
@@ -235,8 +236,9 @@ boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
|
|||||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByNumber(int number)
|
boost::shared_ptr<PlayerInterface> Game::getPlayerByNumber(int number)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||||
PlayerListIterator i = getSeatsList()->begin();
|
PlayerList tmpList = getSeatsList();
|
||||||
PlayerListIterator end = getSeatsList()->end();
|
PlayerListIterator i = tmpList->begin();
|
||||||
|
PlayerListIterator end = tmpList->end();
|
||||||
while (i != end) {
|
while (i != end) {
|
||||||
if ((*i)->getMyID() == number) {
|
if ((*i)->getMyID() == number) {
|
||||||
tmpPlayer = *i;
|
tmpPlayer = *i;
|
||||||
@@ -258,8 +260,9 @@ boost::shared_ptr<PlayerInterface> Game::getCurrentPlayer()
|
|||||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByName(const std::string &name)
|
boost::shared_ptr<PlayerInterface> Game::getPlayerByName(const std::string &name)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||||
PlayerListIterator i = getSeatsList()->begin();
|
PlayerList tmpList = getSeatsList();
|
||||||
PlayerListIterator end = getSeatsList()->end();
|
PlayerListIterator i = tmpList->begin();
|
||||||
|
PlayerListIterator end = tmpList->end();
|
||||||
while (i != end) {
|
while (i != end) {
|
||||||
if ((*i)->getMyName() == name) {
|
if ((*i)->getMyName() == name) {
|
||||||
tmpPlayer = *i;
|
tmpPlayer = *i;
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ struct GameInfo {
|
|||||||
unsigned adminPlayerId;
|
unsigned adminPlayerId;
|
||||||
PlayerIdList players;
|
PlayerIdList players;
|
||||||
PlayerIdList spectators;
|
PlayerIdList spectators;
|
||||||
|
PlayerIdList spectatorsDuringGame;
|
||||||
bool isPasswordProtected;
|
bool isPasswordProtected;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -218,6 +218,9 @@ protected:
|
|||||||
void ModifyGameInfoRemovePlayer(unsigned gameId, unsigned playerId);
|
void ModifyGameInfoRemovePlayer(unsigned gameId, unsigned playerId);
|
||||||
void ModifyGameInfoAddSpectator(unsigned gameId, unsigned playerId);
|
void ModifyGameInfoAddSpectator(unsigned gameId, unsigned playerId);
|
||||||
void ModifyGameInfoRemoveSpectator(unsigned gameId, unsigned playerId);
|
void ModifyGameInfoRemoveSpectator(unsigned gameId, unsigned playerId);
|
||||||
|
void ModifyGameInfoClearSpectatorsDuringGame();
|
||||||
|
void ModifyGameInfoAddSpectatorDuringGame(unsigned playerId);
|
||||||
|
void ModifyGameInfoRemoveSpectatorDuringGame(unsigned playerId, int removeReason);
|
||||||
void ClearGameInfoMap();
|
void ClearGameInfoMap();
|
||||||
|
|
||||||
void StartPetition(unsigned petitionId, unsigned proposingPlayerId, unsigned kickPlayerId, int timeoutSec, int numVotesToKick);
|
void StartPetition(unsigned petitionId, unsigned proposingPlayerId, unsigned kickPlayerId, int timeoutSec, int numVotesToKick);
|
||||||
|
|||||||
@@ -631,7 +631,12 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> clien
|
|||||||
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameSpectatorJoinedMessage) {
|
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameSpectatorJoinedMessage) {
|
||||||
// Another spectator joined the network game.
|
// Another spectator joined the network game.
|
||||||
const GameSpectatorJoinedMessage &netSpectatorJoined = tmpPacket->GetMsg()->gamespectatorjoinedmessage();
|
const GameSpectatorJoinedMessage &netSpectatorJoined = tmpPacket->GetMsg()->gamespectatorjoinedmessage();
|
||||||
client->GetCallback().SignalNetClientSpectatorJoined(netSpectatorJoined.playerid(), client->GetPlayerName(netSpectatorJoined.playerid()));
|
// Request player info if needed.
|
||||||
|
PlayerInfo info;
|
||||||
|
if (!client->GetCachedPlayerInfo(netSpectatorJoined.playerid(), info)) {
|
||||||
|
client->RequestPlayerInfo(netSpectatorJoined.playerid());
|
||||||
|
}
|
||||||
|
client->ModifyGameInfoAddSpectatorDuringGame(netSpectatorJoined.playerid());
|
||||||
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameSpectatorLeftMessage) {
|
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameSpectatorLeftMessage) {
|
||||||
// A spectator left the network game.
|
// A spectator left the network game.
|
||||||
const GameSpectatorLeftMessage &netSpectatorLeft = tmpPacket->GetMsg()->gamespectatorleftmessage();
|
const GameSpectatorLeftMessage &netSpectatorLeft = tmpPacket->GetMsg()->gamespectatorleftmessage();
|
||||||
@@ -645,7 +650,7 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> clien
|
|||||||
removeReason = NTF_NET_REMOVED_ON_REQUEST;
|
removeReason = NTF_NET_REMOVED_ON_REQUEST;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
client->GetCallback().SignalNetClientSpectatorLeft(netSpectatorLeft.playerid(), client->GetPlayerName(netSpectatorLeft.playerid()), removeReason);
|
client->ModifyGameInfoRemoveSpectatorDuringGame(netSpectatorLeft.playerid(), removeReason);
|
||||||
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_TimeoutWarningMessage) {
|
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_TimeoutWarningMessage) {
|
||||||
const TimeoutWarningMessage &tmpTimeout = tmpPacket->GetMsg()->timeoutwarningmessage();
|
const TimeoutWarningMessage &tmpTimeout = tmpPacket->GetMsg()->timeoutwarningmessage();
|
||||||
client->GetCallback().SignalNetClientShowTimeoutDialog((NetTimeoutReason)tmpTimeout.timeoutreason(), tmpTimeout.remainingseconds());
|
client->GetCallback().SignalNetClientShowTimeoutDialog((NetTimeoutReason)tmpTimeout.timeoutreason(), tmpTimeout.remainingseconds());
|
||||||
@@ -1252,6 +1257,7 @@ ClientStateWaitJoin::InternalHandlePacket(boost::shared_ptr<ClientThread> client
|
|||||||
GameData tmpData;
|
GameData tmpData;
|
||||||
NetPacket::GetGameData(netJoinAck.gameinfo(), tmpData);
|
NetPacket::GetGameData(netJoinAck.gameinfo(), tmpData);
|
||||||
client->SetGameData(tmpData);
|
client->SetGameData(tmpData);
|
||||||
|
client->ModifyGameInfoClearSpectatorsDuringGame();
|
||||||
|
|
||||||
// Player number is 0 on init. Will be set when the game starts.
|
// Player number is 0 on init. Will be set when the game starts.
|
||||||
boost::shared_ptr<PlayerData> playerData(
|
boost::shared_ptr<PlayerData> playerData(
|
||||||
|
|||||||
@@ -1454,6 +1454,48 @@ ClientThread::ModifyGameInfoRemoveSpectator(unsigned gameId, unsigned playerId)
|
|||||||
GetCallback().SignalNetClientGameListSpectatorLeft(gameId, playerId);
|
GetCallback().SignalNetClientGameListSpectatorLeft(gameId, playerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientThread::ModifyGameInfoClearSpectatorsDuringGame()
|
||||||
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_gameInfoMapMutex);
|
||||||
|
GameInfoMap::iterator pos = m_gameInfoMap.find(GetGameId());
|
||||||
|
if (pos != m_gameInfoMap.end()) {
|
||||||
|
pos->second.spectatorsDuringGame.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientThread::ModifyGameInfoAddSpectatorDuringGame(unsigned playerId)
|
||||||
|
{
|
||||||
|
bool spectatorAdded = false;
|
||||||
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_gameInfoMapMutex);
|
||||||
|
GameInfoMap::iterator pos = m_gameInfoMap.find(GetGameId());
|
||||||
|
if (pos != m_gameInfoMap.end()) {
|
||||||
|
pos->second.spectatorsDuringGame.push_back(playerId);
|
||||||
|
spectatorAdded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (spectatorAdded)
|
||||||
|
GetCallback().SignalNetClientSpectatorJoined(playerId, GetPlayerName(playerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientThread::ModifyGameInfoRemoveSpectatorDuringGame(unsigned playerId, int removeReason)
|
||||||
|
{
|
||||||
|
bool spectatorRemoved = false;
|
||||||
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_gameInfoMapMutex);
|
||||||
|
GameInfoMap::iterator pos = m_gameInfoMap.find(GetGameId());
|
||||||
|
if (pos != m_gameInfoMap.end()) {
|
||||||
|
pos->second.spectatorsDuringGame.remove(playerId);
|
||||||
|
spectatorRemoved = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (spectatorRemoved)
|
||||||
|
GetCallback().SignalNetClientSpectatorLeft(playerId, GetPlayerName(playerId), removeReason);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientThread::ClearGameInfoMap()
|
ClientThread::ClearGameInfoMap()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ AbstractServerGameStateReceiving::CreateNetPacketHandStart(const ServerGame &ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
netHandStart->set_smallblind(curGame.getCurrentHand()->getSmallBlind());
|
netHandStart->set_smallblind(curGame.getCurrentHand()->getSmallBlind());
|
||||||
|
netHandStart->set_dealerplayerid(curGame.getCurrentHand()->getDealerPosition());
|
||||||
return notifyCards;
|
return notifyCards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,6 +460,15 @@ AbstractServerGameStateReceiving::AcceptNewSession(boost::shared_ptr<ServerGame>
|
|||||||
++player_i;
|
++player_i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send notifications for connected spectators to client.
|
||||||
|
PlayerDataList tmpSpectatorList(server->GetSessionManager().GetSpectatorDataList());
|
||||||
|
PlayerDataList::iterator spectator_i = tmpSpectatorList.begin();
|
||||||
|
PlayerDataList::iterator spectator_end = tmpSpectatorList.end();
|
||||||
|
while (spectator_i != spectator_end) {
|
||||||
|
server->GetLobbyThread().GetSender().Send(session, CreateNetPacketSpectatorJoined(server->GetId(), *(*spectator_i)));
|
||||||
|
++spectator_i;
|
||||||
|
}
|
||||||
|
|
||||||
// Send "Player Joined"/"Spectator Joined" to other fully connected clients.
|
// Send "Player Joined"/"Spectator Joined" to other fully connected clients.
|
||||||
if (spectateOnly) {
|
if (spectateOnly) {
|
||||||
server->SendToAllPlayers(CreateNetPacketSpectatorJoined(server->GetId(), *session->GetPlayerData()), SessionData::Game | SessionData::Spectating | SessionData::SpectatorWaiting);
|
server->SendToAllPlayers(CreateNetPacketSpectatorJoined(server->GetId(), *session->GetPlayerData()), SessionData::Game | SessionData::Spectating | SessionData::SpectatorWaiting);
|
||||||
|
|||||||
@@ -161,6 +161,28 @@ SessionManager::GetPlayerDataList() const
|
|||||||
return playerList;
|
return playerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlayerDataList
|
||||||
|
SessionManager::GetSpectatorDataList() const
|
||||||
|
{
|
||||||
|
PlayerDataList spectatorList;
|
||||||
|
boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex);
|
||||||
|
|
||||||
|
SessionMap::const_iterator session_i = m_sessionMap.begin();
|
||||||
|
SessionMap::const_iterator session_end = m_sessionMap.end();
|
||||||
|
|
||||||
|
while (session_i != session_end) {
|
||||||
|
// Get all spectators of the game.
|
||||||
|
if (session_i->second->GetState() == SessionData::Spectating || session_i->second->GetState() == SessionData::SpectatorWaiting) {
|
||||||
|
boost::shared_ptr<PlayerData> tmpPlayer(session_i->second->GetPlayerData());
|
||||||
|
if (!tmpPlayer.get() || tmpPlayer->GetName().empty())
|
||||||
|
throw ServerException(__FILE__, __LINE__, ERR_NET_INVALID_SESSION, 0);
|
||||||
|
spectatorList.push_back(tmpPlayer);
|
||||||
|
}
|
||||||
|
++session_i;
|
||||||
|
}
|
||||||
|
return spectatorList;
|
||||||
|
}
|
||||||
|
|
||||||
PlayerIdList
|
PlayerIdList
|
||||||
SessionManager::GetPlayerIdList(int state) const
|
SessionManager::GetPlayerIdList(int state) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public:
|
|||||||
boost::shared_ptr<SessionData> GetSessionByUniquePlayerId(unsigned uniqueId, bool initSessions = false) const;
|
boost::shared_ptr<SessionData> GetSessionByUniquePlayerId(unsigned uniqueId, bool initSessions = false) const;
|
||||||
|
|
||||||
PlayerDataList GetPlayerDataList() const;
|
PlayerDataList GetPlayerDataList() const;
|
||||||
|
PlayerDataList GetSpectatorDataList() const;
|
||||||
PlayerIdList GetPlayerIdList(int state) const;
|
PlayerIdList GetPlayerIdList(int state) const;
|
||||||
bool IsPlayerConnected(const std::string &playerName) const;
|
bool IsPlayerConnected(const std::string &playerName) const;
|
||||||
bool IsPlayerConnected(unsigned uniqueId) const;
|
bool IsPlayerConnected(unsigned uniqueId) const;
|
||||||
|
|||||||
+35
@@ -12596,6 +12596,7 @@ const int HandStartMessage::kPlainCardsFieldNumber;
|
|||||||
const int HandStartMessage::kEncryptedCardsFieldNumber;
|
const int HandStartMessage::kEncryptedCardsFieldNumber;
|
||||||
const int HandStartMessage::kSmallBlindFieldNumber;
|
const int HandStartMessage::kSmallBlindFieldNumber;
|
||||||
const int HandStartMessage::kSeatStatesFieldNumber;
|
const int HandStartMessage::kSeatStatesFieldNumber;
|
||||||
|
const int HandStartMessage::kDealerPlayerIdFieldNumber;
|
||||||
#endif // !_MSC_VER
|
#endif // !_MSC_VER
|
||||||
|
|
||||||
HandStartMessage::HandStartMessage()
|
HandStartMessage::HandStartMessage()
|
||||||
@@ -12624,6 +12625,7 @@ void HandStartMessage::SharedCtor() {
|
|||||||
plaincards_ = NULL;
|
plaincards_ = NULL;
|
||||||
encryptedcards_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
encryptedcards_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
||||||
smallblind_ = 0u;
|
smallblind_ = 0u;
|
||||||
|
dealerplayerid_ = 0u;
|
||||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12676,6 +12678,7 @@ void HandStartMessage::Clear() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
smallblind_ = 0u;
|
smallblind_ = 0u;
|
||||||
|
dealerplayerid_ = 0u;
|
||||||
}
|
}
|
||||||
seatstates_.Clear();
|
seatstates_.Clear();
|
||||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||||
@@ -12769,6 +12772,22 @@ bool HandStartMessage::MergePartialFromCodedStream(
|
|||||||
goto handle_uninterpreted;
|
goto handle_uninterpreted;
|
||||||
}
|
}
|
||||||
if (input->ExpectTag(40)) goto parse_seatStates;
|
if (input->ExpectTag(40)) goto parse_seatStates;
|
||||||
|
if (input->ExpectTag(48)) goto parse_dealerPlayerId;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
case 6: {
|
||||||
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||||
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
||||||
|
parse_dealerPlayerId:
|
||||||
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||||
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
||||||
|
input, &dealerplayerid_)));
|
||||||
|
set_has_dealerplayerid();
|
||||||
|
} else {
|
||||||
|
goto handle_uninterpreted;
|
||||||
|
}
|
||||||
if (input->ExpectAtEnd()) return true;
|
if (input->ExpectAtEnd()) return true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -12818,6 +12837,11 @@ void HandStartMessage::SerializeWithCachedSizes(
|
|||||||
5, this->seatstates(i), output);
|
5, this->seatstates(i), output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
if (has_dealerplayerid()) {
|
||||||
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->dealerplayerid(), output);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int HandStartMessage::ByteSize() const {
|
int HandStartMessage::ByteSize() const {
|
||||||
@@ -12852,6 +12876,13 @@ int HandStartMessage::ByteSize() const {
|
|||||||
this->smallblind());
|
this->smallblind());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
if (has_dealerplayerid()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
||||||
|
this->dealerplayerid());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// repeated .NetPlayerState seatStates = 5;
|
// repeated .NetPlayerState seatStates = 5;
|
||||||
{
|
{
|
||||||
@@ -12890,6 +12921,9 @@ void HandStartMessage::MergeFrom(const HandStartMessage& from) {
|
|||||||
if (from.has_smallblind()) {
|
if (from.has_smallblind()) {
|
||||||
set_smallblind(from.smallblind());
|
set_smallblind(from.smallblind());
|
||||||
}
|
}
|
||||||
|
if (from.has_dealerplayerid()) {
|
||||||
|
set_dealerplayerid(from.dealerplayerid());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12915,6 +12949,7 @@ void HandStartMessage::Swap(HandStartMessage* other) {
|
|||||||
std::swap(encryptedcards_, other->encryptedcards_);
|
std::swap(encryptedcards_, other->encryptedcards_);
|
||||||
std::swap(smallblind_, other->smallblind_);
|
std::swap(smallblind_, other->smallblind_);
|
||||||
seatstates_.Swap(&other->seatstates_);
|
seatstates_.Swap(&other->seatstates_);
|
||||||
|
std::swap(dealerplayerid_, other->dealerplayerid_);
|
||||||
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||||||
std::swap(_cached_size_, other->_cached_size_);
|
std::swap(_cached_size_, other->_cached_size_);
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-1
@@ -6028,6 +6028,13 @@ class HandStartMessage : public ::google::protobuf::MessageLite {
|
|||||||
inline const ::google::protobuf::RepeatedField<int>& seatstates() const;
|
inline const ::google::protobuf::RepeatedField<int>& seatstates() const;
|
||||||
inline ::google::protobuf::RepeatedField<int>* mutable_seatstates();
|
inline ::google::protobuf::RepeatedField<int>* mutable_seatstates();
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
inline bool has_dealerplayerid() const;
|
||||||
|
inline void clear_dealerplayerid();
|
||||||
|
static const int kDealerPlayerIdFieldNumber = 6;
|
||||||
|
inline ::google::protobuf::uint32 dealerplayerid() const;
|
||||||
|
inline void set_dealerplayerid(::google::protobuf::uint32 value);
|
||||||
|
|
||||||
// @@protoc_insertion_point(class_scope:HandStartMessage)
|
// @@protoc_insertion_point(class_scope:HandStartMessage)
|
||||||
private:
|
private:
|
||||||
inline void set_has_gameid();
|
inline void set_has_gameid();
|
||||||
@@ -6038,15 +6045,18 @@ class HandStartMessage : public ::google::protobuf::MessageLite {
|
|||||||
inline void clear_has_encryptedcards();
|
inline void clear_has_encryptedcards();
|
||||||
inline void set_has_smallblind();
|
inline void set_has_smallblind();
|
||||||
inline void clear_has_smallblind();
|
inline void clear_has_smallblind();
|
||||||
|
inline void set_has_dealerplayerid();
|
||||||
|
inline void clear_has_dealerplayerid();
|
||||||
|
|
||||||
::HandStartMessage_PlainCards* plaincards_;
|
::HandStartMessage_PlainCards* plaincards_;
|
||||||
::google::protobuf::uint32 gameid_;
|
::google::protobuf::uint32 gameid_;
|
||||||
::google::protobuf::uint32 smallblind_;
|
::google::protobuf::uint32 smallblind_;
|
||||||
::std::string* encryptedcards_;
|
::std::string* encryptedcards_;
|
||||||
::google::protobuf::RepeatedField<int> seatstates_;
|
::google::protobuf::RepeatedField<int> seatstates_;
|
||||||
|
::google::protobuf::uint32 dealerplayerid_;
|
||||||
|
|
||||||
mutable int _cached_size_;
|
mutable int _cached_size_;
|
||||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
|
||||||
|
|
||||||
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
||||||
friend void protobuf_AddDesc_pokerth_2eproto_impl();
|
friend void protobuf_AddDesc_pokerth_2eproto_impl();
|
||||||
@@ -15865,6 +15875,28 @@ HandStartMessage::mutable_seatstates() {
|
|||||||
return &seatstates_;
|
return &seatstates_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
inline bool HandStartMessage::has_dealerplayerid() const {
|
||||||
|
return (_has_bits_[0] & 0x00000020u) != 0;
|
||||||
|
}
|
||||||
|
inline void HandStartMessage::set_has_dealerplayerid() {
|
||||||
|
_has_bits_[0] |= 0x00000020u;
|
||||||
|
}
|
||||||
|
inline void HandStartMessage::clear_has_dealerplayerid() {
|
||||||
|
_has_bits_[0] &= ~0x00000020u;
|
||||||
|
}
|
||||||
|
inline void HandStartMessage::clear_dealerplayerid() {
|
||||||
|
dealerplayerid_ = 0u;
|
||||||
|
clear_has_dealerplayerid();
|
||||||
|
}
|
||||||
|
inline ::google::protobuf::uint32 HandStartMessage::dealerplayerid() const {
|
||||||
|
return dealerplayerid_;
|
||||||
|
}
|
||||||
|
inline void HandStartMessage::set_dealerplayerid(::google::protobuf::uint32 value) {
|
||||||
|
set_has_dealerplayerid();
|
||||||
|
dealerplayerid_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
// PlayersTurnMessage
|
// PlayersTurnMessage
|
||||||
|
|||||||
@@ -27845,6 +27845,16 @@ public final class ProtoBuf {
|
|||||||
* <code>repeated .NetPlayerState seatStates = 5;</code>
|
* <code>repeated .NetPlayerState seatStates = 5;</code>
|
||||||
*/
|
*/
|
||||||
de.pokerth.protocol.ProtoBuf.NetPlayerState getSeatStates(int index);
|
de.pokerth.protocol.ProtoBuf.NetPlayerState getSeatStates(int index);
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
boolean hasDealerPlayerId();
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
int getDealerPlayerId();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code HandStartMessage}
|
* Protobuf type {@code HandStartMessage}
|
||||||
@@ -27946,6 +27956,11 @@ public final class ProtoBuf {
|
|||||||
input.popLimit(oldLimit);
|
input.popLimit(oldLimit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 48: {
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
dealerPlayerId_ = input.readUInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -28492,12 +28507,29 @@ public final class ProtoBuf {
|
|||||||
return seatStates_.get(index);
|
return seatStates_.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
public static final int DEALERPLAYERID_FIELD_NUMBER = 6;
|
||||||
|
private int dealerPlayerId_;
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasDealerPlayerId() {
|
||||||
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public int getDealerPlayerId() {
|
||||||
|
return dealerPlayerId_;
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
gameId_ = 0;
|
gameId_ = 0;
|
||||||
plainCards_ = de.pokerth.protocol.ProtoBuf.HandStartMessage.PlainCards.getDefaultInstance();
|
plainCards_ = de.pokerth.protocol.ProtoBuf.HandStartMessage.PlainCards.getDefaultInstance();
|
||||||
encryptedCards_ = com.google.protobuf.ByteString.EMPTY;
|
encryptedCards_ = com.google.protobuf.ByteString.EMPTY;
|
||||||
smallBlind_ = 0;
|
smallBlind_ = 0;
|
||||||
seatStates_ = java.util.Collections.emptyList();
|
seatStates_ = java.util.Collections.emptyList();
|
||||||
|
dealerPlayerId_ = 0;
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -28540,6 +28572,9 @@ public final class ProtoBuf {
|
|||||||
for (int i = 0; i < seatStates_.size(); i++) {
|
for (int i = 0; i < seatStates_.size(); i++) {
|
||||||
output.writeEnum(5, seatStates_.get(i).getNumber());
|
output.writeEnum(5, seatStates_.get(i).getNumber());
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
output.writeUInt32(6, dealerPlayerId_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int memoizedSerializedSize = -1;
|
private int memoizedSerializedSize = -1;
|
||||||
@@ -28573,6 +28608,10 @@ public final class ProtoBuf {
|
|||||||
size += dataSize;
|
size += dataSize;
|
||||||
size += 1 * seatStates_.size();
|
size += 1 * seatStates_.size();
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeUInt32Size(6, dealerPlayerId_);
|
||||||
|
}
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
@@ -28674,6 +28713,8 @@ public final class ProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
seatStates_ = java.util.Collections.emptyList();
|
seatStates_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
|
dealerPlayerId_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000020);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28718,6 +28759,10 @@ public final class ProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
}
|
}
|
||||||
result.seatStates_ = seatStates_;
|
result.seatStates_ = seatStates_;
|
||||||
|
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
|
||||||
|
to_bitField0_ |= 0x00000010;
|
||||||
|
}
|
||||||
|
result.dealerPlayerId_ = dealerPlayerId_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -28746,6 +28791,9 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (other.hasDealerPlayerId()) {
|
||||||
|
setDealerPlayerId(other.getDealerPlayerId());
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29021,6 +29069,39 @@ public final class ProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 dealerPlayerId = 6;
|
||||||
|
private int dealerPlayerId_ ;
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasDealerPlayerId() {
|
||||||
|
return ((bitField0_ & 0x00000020) == 0x00000020);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public int getDealerPlayerId() {
|
||||||
|
return dealerPlayerId_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public Builder setDealerPlayerId(int value) {
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
dealerPlayerId_ = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 dealerPlayerId = 6;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearDealerPlayerId() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000020);
|
||||||
|
dealerPlayerId_ = 0;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:HandStartMessage)
|
// @@protoc_insertion_point(builder_scope:HandStartMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user