void BuyFashion() { SMsgTradeBuyGoods_CS sMsgTradeBuyGoods_CS = new SMsgTradeBuyGoods_CS() { dwShopID = (uint)CurrentFashionShopData._shopID, uidNPC = 0, lShopGoodsID = (uint)CurrentFashionShopData._shopGoodsID, GoodsID = (uint)CurrentFashionShopData.GoodsID, GoodsNum = 1, }; NetServiceManager.Instance.TradeService.SendTradeBuyGoods(sMsgTradeBuyGoods_CS); TraceUtil.Log("发送购买时装信息"); }
void SendDataToServer() { ShopConfigData data = curShopConfigList[curSelectIndex]; SMsgTradeBuyGoods_CS sMsgTradeBuyGoods_CS = new SMsgTradeBuyGoods_CS() { dwShopID = (uint)data._shopID, uidNPC = 0, lShopGoodsID = (uint)data._shopGoodsID, GoodsID = (uint)data.GoodsID, GoodsNum = 1, }; NetServiceManager.Instance.TradeService.SendTradeBuyGoods(sMsgTradeBuyGoods_CS); }
void SendBuyGoodsToServer(uint BuyNumber) { SoundManager.Instance.PlaySoundEffect("Sound_Button_Pay"); var ShopInfo = MyParent.sMsgTradeOpenShop_SC; var GoodsInfo = this.sMsgTradeOpenShopGoodsInfo_SC; SMsgTradeBuyGoods_CS sMsgTradeBuyGoods_CS = new SMsgTradeBuyGoods_CS() { dwShopID = ShopInfo.dwShopID, uidNPC = ShopInfo.uidNPC, lShopGoodsID = GoodsInfo.dShopGoodsID, GoodsID = GoodsInfo.dGoodsID, GoodsNum = BuyNumber, }; NetServiceManager.Instance.TradeService.SendTradeBuyGoods(sMsgTradeBuyGoods_CS); //print("购买物品:" + GoodsInfo.dGoodsID + ",Number:" + BuyNumber + ",UID:" + ShopInfo.uidNPC); }
/// <summary> /// 发送购买物品 /// </summary> public void SendTradeBuyGoods(SMsgTradeBuyGoods_CS sMsgTradeBuyGoods_CS) { this.Request(sMsgTradeBuyGoods_CS.GeneratePackage()); //var sendBuff = PackageHelper.GetNetworkSendBuffer(sMsgTradeBuyGoods_CS.GeneratePackage()); //TraceUtil.Log("SendBuff:" + sendBuff.Length); }