Ejemplo n.º 1
0
        public virtual uint RequestCashPackageBuyValidation(int dataId, string receipt, AckMessageCallback callback)
        {
            RequestCashPackageBuyValidationMessage message = new RequestCashPackageBuyValidationMessage();

            message.dataId   = dataId;
            message.platform = Application.platform;
            message.receipt  = receipt;
            return(Client.ClientSendAckPacket(DeliveryMethod.ReliableOrdered, MsgTypes.CashPackageBuyValidation, message, callback));
        }
Ejemplo n.º 2
0
        protected virtual void HandleRequestCashPackageBuyValidation(LiteNetLibMessageHandler messageHandler)
        {
            long connectionId = messageHandler.connectionId;
            RequestCashPackageBuyValidationMessage  message         = messageHandler.ReadMessage <RequestCashPackageBuyValidationMessage>();
            ResponseCashPackageBuyValidationMessage responseMessage = new ResponseCashPackageBuyValidationMessage();

            responseMessage.ackId        = message.ackId;
            responseMessage.responseCode = AckResponseCode.Error;
            responseMessage.error        = ResponseCashPackageBuyValidationMessage.Error.NotAvailable;
            ServerSendPacket(connectionId, DeliveryMethod.ReliableOrdered, MsgTypes.CashPackageBuyValidation, responseMessage);
        }