First parts of implementation of invite system in server.
This commit is contained in:
@@ -1390,6 +1390,9 @@ ClientStateWaitJoin::InternalHandlePacket(boost::shared_ptr<ClientThread> client
|
||||
case joinGameFailureReason_notAllowedAsGuest :
|
||||
failureCode = NTF_NET_JOIN_GUEST_FORBIDDEN;
|
||||
break;
|
||||
case joinGameFailureReason_notInvited :
|
||||
failureCode = NTF_NET_JOIN_NOT_INVITED;
|
||||
break;
|
||||
default :
|
||||
failureCode = NTF_NET_INTERNAL;
|
||||
break;
|
||||
@@ -1398,6 +1401,14 @@ ClientStateWaitJoin::InternalHandlePacket(boost::shared_ptr<ClientThread> client
|
||||
client->GetCallback().SignalNetClientNotification(failureCode);
|
||||
}
|
||||
}
|
||||
else if (tmpPacket->GetMsg()->present == PokerTHMessage_PR_inviteNotifyMessage)
|
||||
{
|
||||
InviteNotifyMessage_t *netInvNotify = &tmpPacket->GetMsg()->choice.inviteNotifyMessage;
|
||||
if (netInvNotify->playerIdWho == client->GetGuiPlayerId())
|
||||
{
|
||||
client->GetCallback().SignalSelfGameInvitation(netInvNotify->gameId, netInvNotify->playerIdByWhom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user