Exemplo n.º 1
0
    public void HttpRespGemExChange(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response.status != BaseResponse.ERROR)
        {
            HttpRequest rq = request as HttpRequest;
            if (rq.Type == RequestType.GEM_EXCHANGE)
            {
                GemExChangeResponse resp = response as GemExChangeResponse;

                GemData tempdata = Core.Data.gemsManager.getGemData(resp.data.pid);
                if (tempdata != null)
                //if(Core.Data.gemsManager.gemPriceConfig.ContainsKey(resp.data.pid))
                {
                    int price = tempdata.price;
                    Debug.Log("Price:" + price);
                    GemDebrisCountInBag -= price;
                    //view.SetGemDebrisNum(GemDebrisCountInBag);
                }
                GetGemSucUI.OpenUI(Core.Data.gemsManager.getGems(resp.data.ppid).configData, view.TEXT(9014));
            }
        }
        else
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
Exemplo n.º 2
0
    //全部合成返回
    void BackGemGroupCombine()
    {
        if (count == CombineTimes)
        {
            if (tempId != 0)
            {
                Gems resultGem = Core.Data.gemsManager.getGems(tempId);
                if (resultGem != null)
                {
                    GetGemSucUI.OpenUI(resultGem.configData, view.TEXT(5064));
                }
            }
            else
            {
                // SQYAlertViewMove.CreateAlertViewMove(view.TEXT(9014));
                ClearLastSelected();
            }

            Debug.Log(" lv  =" + tempLv + ";  defaultNum =" + defaultNum + "; successNum = " + successNum);
            view.SetCombineGemsResult(tempLv, CombineTimes, successNum);
            GemMouldNumInBag = Core.Data.itemManager.GetBagItemCount(110064);
            SelectedMouldNum = 0;
            view.SetSelectedGemNumMouldNum(SelectedMouldNum, GemMouldNumInBag);
            DBUIController.mDBUIInstance.RefreshUserInfo();
            ClearLastSelected();
            CombineTimes = 0;
        }
        ComLoading.Close();
    }