Example #1
0
 //购买免战牌
 public void BuyMianZhanPai(BaseResponse response)
 {
     if (response != null && response.status != BaseResponse.ERROR)
     {
         BuyMianZhanTimeResponse resp = response as BuyMianZhanTimeResponse;
         RTData.curCoin  -= Math.Abs(resp.data.coin);
         RTData.curStone -= Math.Abs(resp.data.stone);
     }
 }
Example #2
0
    public void buyMianZhanTimeCompleted(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BuyMianZhanTimeResponse buyMianZhanTimeResponse = response as BuyMianZhanTimeResponse;
            HttpRequest             req      = request as HttpRequest;
            BuyMianZhanTimeParam    tMZParam = req.ParamMem as BuyMianZhanTimeParam;
            if (buyMianZhanTimeResponse.data != null)
            {
//				Core.Data.playerManager.RTData.curCoin -= buyMianZhanTimeResponse.data.coin;
//				Core.Data.playerManager.RTData.curStone -= buyMianZhanTimeResponse.data.stone;
                Core.TimerEng.deleteTask(TaskID.DragonMianZhanTimer);

                startMianZhanTimer(Core.TimerEng.curTime, buyMianZhanTimeResponse.data.et);
                if (tMZParam.type == 3)
                {
                    long endTime = buyMianZhanTimeResponse.data.et - Core.TimerEng.curTime;
                    if (endTime > 3700)                      //太阳石   86400
                    {
                        Core.Data.itemManager.UseItem(Core.Data.itemManager.GetBagItemPid(110050), 1);
                    }
                    else
                    {
                        Core.Data.itemManager.UseItem(Core.Data.itemManager.GetBagItemPid(110049), 1);
                    }
                }
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(6034));
                if (this.buyMianZhanTimeCompletedDelegate != null)
                {
                    this.buyMianZhanTimeCompletedDelegate();
                }
            }
        }
        else if (response != null)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
        DBUIController.mDBUIInstance.RefreshUserInfoWithoutShow();
        UIMiniPlayerController.Instance.freshPlayerInfoView();
        UIMiniPlayerController.Instance.SetActive(false);
        ComLoading.Close();
    }