예제 #1
0
 public void BuyCoinRsp(CSPkg msg)
 {
     for (int i = 0; i < (int)msg.stPkgData.get_stCoinBuyRsp().stBuyList.bCoinGetCnt; i++)
     {
         BuyCoinInfo info = default(BuyCoinInfo);
         this.calcComsume((int)msg.stPkgData.get_stCoinBuyRsp().wBuyStartFreq + i);
         info.m_CostDiamond = this.m_CostDiamond;
         info.m_GainCoin    = (int)msg.stPkgData.get_stCoinBuyRsp().stBuyList.CoinGetVal[i];
         info.m_CritTime    = (int)(msg.stPkgData.get_stCoinBuyRsp().stBuyList.CoinGetVal[i] / (uint)((this.m_GainCoin != 0) ? this.m_GainCoin : 1));
         this.addInfo(info);
     }
 }
예제 #2
0
        private string GetDescribeStr(BuyCoinInfo info)
        {
            string result = null;

            if (info.m_CritTime == 1)
            {
                result = string.Format("使用{0}钻石获得{1}金币", info.m_CostDiamond, info.m_GainCoin);
            }
            if (info.m_CritTime >= 2)
            {
                result = string.Format("使用{0}钻石获得{1}金币 暴击*{2}", info.m_CostDiamond, info.m_GainCoin, info.m_CritTime);
            }
            return(result);
        }
예제 #3
0
 public void addInfo(BuyCoinInfo info)
 {
     if (this.InfoNum < this.m_LimitInfoNum)
     {
         this.m_stInfos.Add(info);
         this.InfoNum++;
     }
     else
     {
         this.m_stInfos.RemoveAt(0);
         this.m_stInfos.Add(info);
     }
     this.refreshPanel();
 }