diff --git a/src/gui/generic/serverguiwrapper.cpp b/src/gui/generic/serverguiwrapper.cpp index 3bb1131c..581b930e 100644 --- a/src/gui/generic/serverguiwrapper.cpp +++ b/src/gui/generic/serverguiwrapper.cpp @@ -165,6 +165,6 @@ void ServerGuiWrapper::SignalLobbyPlayerJoined(unsigned playerId, const std::str void ServerGuiWrapper::SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason) { if (myClientcb) myClientcb->SignalLobbyPlayerKicked(nickName, byWhom, reason); } void ServerGuiWrapper::SignalLobbyPlayerLeft(unsigned playerId) { if (myClientcb) myClientcb->SignalLobbyPlayerLeft(playerId); } -void ServerGuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom) {} -void ServerGuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom) {} -void ServerGuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason) {} +void ServerGuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom) { if (myClientcb) myClientcb->SignalSelfGameInvitation(gameId, playerIdFrom); } +void ServerGuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom) { if (myClientcb) myClientcb->SignalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom); } +void ServerGuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason) { if (myClientcb) myClientcb->SignalRejectedGameInvitation(gameId, playerIdWho, reason); } diff --git a/src/gui/generic/serverguiwrapper.h b/src/gui/generic/serverguiwrapper.h index 8047a431..eba7eaa0 100644 --- a/src/gui/generic/serverguiwrapper.h +++ b/src/gui/generic/serverguiwrapper.h @@ -111,7 +111,7 @@ public: void SignalNetClientStatsUpdate(const ServerStats &stats); void SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec); void SignalNetClientRemovedFromGame(int notificationId); - void SignalNetClientSelfJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin); + void SignalNetClientSelfJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin); void SignalNetClientPlayerJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin); void SignalNetClientPlayerChanged(unsigned playerId, const std::string &newPlayerName); void SignalNetClientPlayerLeft(unsigned playerId, const std::string &playerName, int removeReason); @@ -151,9 +151,9 @@ public: void SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason); void SignalLobbyPlayerLeft(unsigned playerId); - void SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom); - void SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom); - void SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason); + void SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom); + void SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom); + void SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason); private: diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index 0cc1e2e9..5f9b853e 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -327,7 +327,7 @@ ClientThread::SendRejectGameInvitation(unsigned gameId, DenyGameInvitationReason boost::shared_ptr packet(new NetPacket(NetPacket::Alloc)); packet->GetMsg()->present = PokerTHMessage_PR_rejectGameInvitationMessage; RejectGameInvitationMessage_t *netReject = &packet->GetMsg()->choice.rejectGameInvitationMessage; - netReject->gameId = GetGameId(); + netReject->gameId = gameId; netReject->myRejectReason = static_cast(reason); m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet)); }