Example #1
0
        protected virtual void HandleResponseCashPackageBuyValidation(LiteNetLibMessageHandler messageHandler)
        {
            TransportHandler transportHandler = messageHandler.transportHandler;
            ResponseCashPackageBuyValidationMessage message = messageHandler.ReadMessage <ResponseCashPackageBuyValidationMessage>();

            transportHandler.TriggerAck(message.ackId, message.responseCode, message);
        }
Example #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);
        }