Exemplo n.º 1
0
 BattlenetRpcErrorCode HandleOnRecentPlayersAdded(RecentPlayersAddedNotification request)
 {
     Log.outError(LogFilter.ServiceProtobuf, "{0} Client tried to call not implemented method UserManagerListener.OnRecentPlayersAdded: {1}",
                  GetCallerInfo(), request.ToString());
     return(BattlenetRpcErrorCode.RpcNotImplemented);
 }
Exemplo n.º 2
0
        public override void CallServerMethod(uint token, uint methodId, CodedInputStream stream)
        {
            switch (methodId)
            {
            case 1:
            {
                BlockedPlayerAddedNotification request = new BlockedPlayerAddedNotification();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnBlockedPlayerAdded(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method UserManagerListener.OnBlockedPlayerAdded(bgs.protocol.user_manager.v1.BlockedPlayerAddedNotification: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 2:
            {
                BlockedPlayerRemovedNotification request = new BlockedPlayerRemovedNotification();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnBlockedPlayerRemoved(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method UserManagerListener.OnBlockedPlayerRemoved(bgs.protocol.user_manager.v1.BlockedPlayerRemovedNotification: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 11:
            {
                RecentPlayersAddedNotification request = new RecentPlayersAddedNotification();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnRecentPlayersAdded(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method UserManagerListener.OnRecentPlayersAdded(bgs.protocol.user_manager.v1.RecentPlayersAddedNotification: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            case 12:
            {
                RecentPlayersRemovedNotification request = new RecentPlayersRemovedNotification();
                request.MergeFrom(stream);


                BattlenetRpcErrorCode status = HandleOnRecentPlayersRemoved(request);
                Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method UserManagerListener.OnRecentPlayersRemoved(bgs.protocol.user_manager.v1.RecentPlayersRemovedNotification: {1}) status: {2}.",
                             GetCallerInfo(), request.ToString(), status);
                if (status != 0)
                {
                    SendResponse(token, status);
                }
                break;
            }

            default:
                Log.outError(LogFilter.ServiceProtobuf, "Bad method id {0}.", methodId);
                SendResponse(token, BattlenetRpcErrorCode.RpcInvalidMethod);
                break;
            }
        }