示例#1
0
 void onClick_Btn_Order_Btn(GameObject caster)
 {
     if (m_saleUIToggle == ConsignmentItemMode.Buy)
     {
         int wenqian = MainPlayerHelper.GetMoneyNumByType(ClientMoneyType.Gold);
         if (wenqian < SaleDataManager.BuyPrice * 10000)
         {
             TipsManager.Instance.ShowTips(LocalTextType.Trading_Currency_jinbibuzuxiadanshibai);
             return;
         }
         stBuyMoneyConsignmentUserCmd_CS cmd = new stBuyMoneyConsignmentUserCmd_CS();
         cmd.num   = SaleDataManager.BuyNum;
         cmd.price = SaleDataManager.BuyPrice * 10000;
         NetService.Instance.Send(cmd);
     }
     else if (m_saleUIToggle == ConsignmentItemMode.Sell)
     {
         int wenqian = MainPlayerHelper.GetMoneyNumByType(ClientMoneyType.Wenqian);
         if (wenqian < SaleDataManager.SellNum)
         {
             TipsManager.Instance.ShowTips(LocalTextType.Trading_Currency_wenqianbuzuxiadanshibai);
             return;
         }
         stSellMoneyConsignmentUserCmd_CS cmd = new stSellMoneyConsignmentUserCmd_CS();
         cmd.num   = SaleDataManager.SellNum;
         cmd.price = SaleDataManager.SellPrice * 10000;
         NetService.Instance.Send(cmd);
     }
 }
示例#2
0
 public void OnBuyOrderFinish(stBuyMoneyConsignmentUserCmd_CS cmd)
 {
     if (cmd.ret == 0)
     {
         TipsManager.Instance.ShowTips(LocalTextType.Trading_Currency_xiadanchenggong);
         // TipsManager.Instance.ShowTipsById( 117501 );
     }
 }