public void BackRefreshSecretShop(BaseHttpRequest request, BaseResponse response) { ComLoading.Close(); if (response != null && response.status != BaseResponse.ERROR) { RefreshSecretShopResponse resp = response as RefreshSecretShopResponse; if (resp.data != null) { SecretShopResponse tResp = new SecretShopResponse(); tResp.data = resp.data; TotalJifen = resp.data.jifen; _purchaseSoulStone = resp.data.purchaseSoulMoney; if (resp.data.refreshMoney != null && resp.data.refreshMoney.Length == 2) { _RefreshMoneyType = resp.data.refreshMoney[0]; _RefreshMoney = resp.data.refreshMoney[1]; if (_RefreshMoneyType == 0) { Core.Data.playerManager.RTData.curStone -= _RefreshMoney; } else if (_RefreshMoneyType == 1) { Core.Data.playerManager.RTData.curCoin -= _RefreshMoney; } } _UISecretShop.OnShow(tResp, _ShopType); } } else if (response != null && response.status == BaseResponse.ERROR) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } }
void SetSecretShopData(BaseHttpRequest request, BaseResponse response) { ComLoading.Close(); if (response != null && response.status != BaseResponse.ERROR) { SecretShopResponse mresponse = response as SecretShopResponse; if (mresponse != null) { if (_ShopType == 1) { TimerMgr(mresponse.data.Flush); } if (mresponse.data != null && mresponse.data.refreshMoney != null && mresponse.data.refreshMoney.Length == 2) { _purchaseSoulStone = mresponse.data.purchaseSoulMoney; _RefreshMoneyType = mresponse.data.refreshMoney[0]; _RefreshMoney = mresponse.data.refreshMoney[1]; TotalJifen = mresponse.data.jifen; } _UISecretShop.OnShow(mresponse, _ShopType); // _UISecretShop.gameObject.SetActive(true); // DBUIController.mDBUIInstance.HiddenFor3D_UI (); } } else if (response != null && response.status == BaseResponse.ERROR) { if (response.errorCode == 7041) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(35012)); } else if (response.errorCode == 7042) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(35013)); } else if (response.errorCode == 7043 || response.errorCode == 7044) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(35014)); } else if (response.errorCode == 3000) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(35022)); } else { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } } }
public void OnShow(SecretShopResponse mresponse, int shoptype) { if (mresponse.data == null) { return; } if (mresponse.data.Items == null) { return; } allList.Clear(); VipList.Clear(); NormalList.Clear(); LvList.Clear(); costMoney = _Mgr._RefreshMoney; costMoneyType = _Mgr._RefreshMoneyType; if (shoptype == 1) { if (m_CurJifenLab != null) { m_CurJifenLab.SafeText(Core.Data.stringManager.getString(6023)); } if (m_CurJifenNum != null) { m_CurJifenNum.SafeText(mresponse.data.jifen.ToString()); } if (mresponse.data != null && m_BaBaRefreshBtn != null) { surplusRefresh = mresponse.data.surplusRefreshTimes; m_BaBaRefreshBtn.SafeText(Core.Data.stringManager.getString(6004) + "(" + (mresponse.data.refreshMaxTimes - mresponse.data.surplusRefreshTimes).ToString() + "/" + mresponse.data.refreshMaxTimes.ToString() + ")"); } for (int i = 0; i < mresponse.data.Items.Length; i++) { if (mresponse.data.Items[i].type == 1) { VipList.Add(mresponse.data.Items[i]); } else if (mresponse.data.Items[i].type == 2) { LvList.Add(mresponse.data.Items[i]); } else { NormalList.Add(mresponse.data.Items[i]); } allList.Add(mresponse.data.Items[i]); } } else { //则卷售货屋 if (mresponse.data != null && m_ZeJuanRefreshBtn != null) { surplusRefresh = mresponse.data.surplusRefreshTimes; m_ZeJuanRefreshBtn.SafeText(Core.Data.stringManager.getString(6004) + "(" + (mresponse.data.refreshMaxTimes - mresponse.data.surplusRefreshTimes).ToString() + "/" + mresponse.data.refreshMaxTimes.ToString() + ")"); } for (int i = 0; i < 8; i++) { if (mresponse.data.Items[i].type == 1) { VipList.Add(mresponse.data.Items[i]); } else if (mresponse.data.Items[i].type == 2) { LvList.Add(mresponse.data.Items[i]); } else { NormalList.Add(mresponse.data.Items[i]); } allList.Add(mresponse.data.Items[i]); } for (int j = 0; j < SoulHeroList.Count; j++) { SoulHeroList[j].SetDetail(mresponse.data.souls[j], 0); SoulHeroList[j].gameObject.SetActive(true); } m_BuySoulBtn1.SafeText(_Mgr._purchaseSoulStone.ToString() + " " + Core.Data.stringManager.getString(6057)); m_BuySoulBtn2.SafeText(_Mgr._purchaseSoulStone.ToString() + " " + Core.Data.stringManager.getString(6057)); } //0 no 1 vip 2 lv if (UISecretShopCellList == null || UISecretShopCellList.Count == 0) { for (int i = 0; i < allList.Count; i++) { InitItem(); } } // Debug.Log(UISecretShopCellList.Count + " count ttttttt"); for (int i = 0; i < allList.Count; i++) { if (allList[i] != null && UISecretShopCellList [i] != null) { UISecretShopCellList [i].OnShow(allList[i]); } } if (shoptype == 1) { m_BabaGrid.Reposition(); } else { m_SoulGrid.Reposition(); } TimerMgr(mresponse.data.Flush); DBUIController.mDBUIInstance.RefreshUserInfo(); }