Example #1
0
        public virtual uint RequestCashShopBuy(int dataId, AckMessageCallback callback)
        {
            RequestCashShopBuyMessage message = new RequestCashShopBuyMessage();

            message.dataId = dataId;
            return(Client.ClientSendAckPacket(DeliveryMethod.ReliableOrdered, MsgTypes.CashShopBuy, message, callback));
        }
Example #2
0
        protected virtual void HandleRequestCashShopBuy(LiteNetLibMessageHandler messageHandler)
        {
            long connectionId = messageHandler.connectionId;
            RequestCashShopBuyMessage  message         = messageHandler.ReadMessage <RequestCashShopBuyMessage>();
            ResponseCashShopBuyMessage responseMessage = new ResponseCashShopBuyMessage();

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