public void OpenSaveMoney() { bankTag.gameObject.SetActive(true); numWidget.NumIndex = 0; VipInfoData tdata = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if (Core.Data.playerManager.Stone >= tdata.bankmax) { numWidget.Maxnum = tdata.bankmax / unitMoney; numWidget.uislider.numberOfSteps = tdata.bankmax / unitMoney + 1; } else { numWidget.Maxnum = Core.Data.playerManager.Stone / unitMoney; numWidget.uislider.numberOfSteps = tdata.bankmax / unitMoney + 1; } numWidget._unitprice = unitMoney; if (Core.Data.playerManager.Stone >= unitMoney) { btnSave.isEnabled = true; } else { btnSave.isEnabled = false; } }
void Start() { InitUI(); UpdateBuildState(); if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_PRODUCE || m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_BATTLE) { InvokeRepeating("CheckBuildGetState", 0, 1); } if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_PRODUCE) { showMoneyTip = transform.GetComponentInChildren <ProduceMoneyTip> (); showMoneyTip.gameObject.SetActive(false); } if (buildNum == BaseBuildingData.Q_phD) { VipInfoData vip = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.RTData.curVipLevel); if (vip != null) { bool isVisib = vip.iqshow > 0 && Core.Data.playerManager.RTData.curLevel >= m_buildData.config.limitLevel; RED.SetActive(isVisib, this.gameObject); } else { RED.SetActive(false, this.gameObject); } } }
//1:技能副本;2:战魂副本;3:经验副本;4:宝石副本 //通过当前可以购买的次数,获取下一个VIP等级 public VipInfoData GetNextVipLevelBuyActiveFB(int PVE_Type, int Cur_BuyCount) { VipInfoData data = null; bool result = false; foreach (VipInfoData vipData in VipInfoDataListConfig) { switch (PVE_Type) { case 1: result = vipData.specialdoor1 > Cur_BuyCount; break; case 2: result = vipData.specialdoor2 > Cur_BuyCount; break; case 3: result = vipData.specialdoor3 > Cur_BuyCount; break; case 4: result = vipData.specialdoor4 > Cur_BuyCount; break; } if (result) { data = vipData; return(data); } } return(data); }
public void OnShow(GetFinalTrialStateInfo m_data) { mShaluLab.SafeText(m_data.shalu.fCount.ToString() + "/" + m_data.shalu.count.ToString()); mBuouLab.SafeText(m_data.buou.fCount.ToString() + "/" + m_data.buou.count.ToString()); m_BtnName1.SafeText(Core.Data.stringManager.getString(5142)); m_BtnName2.SafeText(Core.Data.stringManager.getString(5142)); if (m_data.shalu.fCount == 0 && FinalTrialMgr.GetInstance()._FinalTrialData.CurDungeon < 15) { m_ShaluBtn.isEnabled = false; } else { m_ShaluBtn.isEnabled = true; } if (m_data.buou.fCount == 0 && FinalTrialMgr.GetInstance()._FinalTrialData.CurDungeon < 15) { m_BuouBtn.isEnabled = false; } else { m_BuouBtn.isEnabled = true; } m_Stone1.SafeText(m_data.shalu.needStone.ToString()); m_Stone2.SafeText(m_data.buou.needStone.ToString()); m_ShaluStone = m_data.shalu.needStone; m_BuouStone = m_data.buou.needStone; _data = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); }
public void UpdateBuildState() { string strPath = GetPrefabName(); if (!this.transform.FindChild(strPath)) { CreateBuild(); } else { if (m_getUI != null) { m_getUI.InitUI(m_buildData, this); } if (buildNum == BaseBuildingData.Q_phD) { VipInfoData vip = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.RTData.curVipLevel); if (vip != null) { bool isVisib = vip.iqshow > 0 && Core.Data.playerManager.RTData.curLevel >= m_buildData.config.limitLevel; RED.SetActive(isVisib, this.gameObject); } else { RED.SetActive(false, this.gameObject); } } m_tipUI = transform.GetComponentInChildren <BuildTipUI>(); UpdateRobFire(); if (m_tipUI != null) { m_tipUI.InitName(m_buildData); } if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_BATTLE) { if (m_firePar == null) { m_firePar = transform.FindChild(FIRE_PATH); } if (m_firePar != null) { RED.SetActive(m_buildData.RTData.dur > 0, m_firePar.gameObject); } } CheckLighting(); } }
void OnClickReset() { VipInfoData vip = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if (floordata.resetTimes < vip.starttimes) { string strText = Core.Data.stringManager.getString(9108); strText = string.Format(strText, Core.Data.newDungeonsManager.GetResetFloorCost(floordata.resetTimes + 1), floordata.resetTimes); UIInformation.GetInstance().SetInformation(strText, Core.Data.stringManager.getString(5030), BuyReset, null); } else { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(5239)); } }
void CheckPvpVipTitle() { VipInfoData info = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if (info != null && m_TrialMgr.allPVPRobData != null && m_TrialMgr.allPVPRobData.pvpStatus != null) { if (m_TrialMgr.m_QiangduoEnum == QiangduoEnum.QiangduoEnum_List) { if (m_TrialMgr.NowEnum == TrialEnum.TrialType_TianXiaDiYi) { time = info.pvptype2; if (m_TrialMgr.allPVPRobData.pvpStatus.rank != null) { buytime = m_TrialMgr.allPVPRobData.pvpStatus.rank.buyTime; } } else if (m_TrialMgr.NowEnum == TrialEnum.TrialType_QiangDuoDragonBall) { time = info.pvptype1; if (m_TrialMgr.allPVPRobData.pvpStatus.ball != null) { buytime = m_TrialMgr.allPVPRobData.pvpStatus.ball.buyTime; } } else if (m_TrialMgr.NowEnum == TrialEnum.TrialType_QiangDuoGold) { time = info.pvptype3; if (m_TrialMgr.allPVPRobData.pvpStatus.robs != null) { buytime = m_TrialMgr.allPVPRobData.pvpStatus.robs.buyTime; } } } else if (m_TrialMgr.m_QiangduoEnum == QiangduoEnum.QiangduoEnum_Sudi) { time = info.pvptype4; if (m_TrialMgr.allPVPRobData.pvpStatus.revenge != null) { buytime = m_TrialMgr.allPVPRobData.pvpStatus.revenge.buyTime; } } } }
void SetVipSpeedUp() { int vipLv = 0; PlayerManager playerMgr = Core.Data.playerManager; VipManager vipMgr = Core.Data.vipManager; if (playerMgr != null && vipMgr != null) { vipLv = playerMgr.RTData.curVipLevel; VipInfoData vipdata = vipMgr.GetVipInfoData(vipLv); if (vipdata != null) { OpenSpeedUp = vipdata.speedup == (short)1; } else { OpenSpeedUp = false; } } }
void SetVipAuto() { int vipLv = 0; PlayerManager playerMgr = Core.Data.playerManager; VipManager vipMgr = Core.Data.vipManager; if (playerMgr != null && vipMgr != null) { vipLv = playerMgr.RTData.curVipLevel; VipInfoData vipdata = vipMgr.GetVipInfoData(vipLv); if (vipdata != null) { isAutoBattle = true; //vipdata.speedup == (short)1; } else { isAutoBattle = false; } } }
void CheckVipStone() { VipInfoData info = Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if (info != null && m_TrialMgr.allPVPRobData != null && m_TrialMgr.allPVPRobData.pvpStatus != null) { if (m_TrialMgr.m_QiangduoEnum == QiangduoEnum.QiangduoEnum_List) { if (m_TrialMgr.NowEnum == TrialEnum.TrialType_TianXiaDiYi) { if (m_TrialMgr.allPVPRobData.pvpStatus.rank != null) { stone = m_TrialMgr.allPVPRobData.pvpStatus.rank.needStone; } } else if (m_TrialMgr.NowEnum == TrialEnum.TrialType_QiangDuoDragonBall) { if (m_TrialMgr.allPVPRobData.pvpStatus.ball != null) { stone = m_TrialMgr.allPVPRobData.pvpStatus.ball.needStone; } } else if (m_TrialMgr.NowEnum == TrialEnum.TrialType_QiangDuoGold) { if (m_TrialMgr.allPVPRobData.pvpStatus.robs != null) { stone = m_TrialMgr.allPVPRobData.pvpStatus.robs.needStone; } } } else if (m_TrialMgr.m_QiangduoEnum == QiangduoEnum.QiangduoEnum_Sudi) { if (m_TrialMgr.allPVPRobData.pvpStatus.revenge != null) { stone = m_TrialMgr.allPVPRobData.pvpStatus.revenge.needStone; } } } }
public void SetDetail(VipInfoData _data) { m_data = _data; if (m_data == null) { return; } if (m_data.vipLv == 0) { return; } if (m_Panel != null) { m_Size = m_Panel.baseClipRegion; } HideRewardList(); m_Des.SafeText(""); m_ScrollBar.value = 0f; m_Grid.Reposition(); m_Des.SafeText(DealWithStr(m_data.tips)); BoxCollider _box = m_Des.GetComponent <BoxCollider>(); _box.size = new Vector3(m_Des.width, (float)m_Des.height, _box.size.z); _box.center = new Vector3((float)m_Des.width / 2, (float)-m_Des.height / 2, _box.center.z); int _Count = 0; for (; _Count < _data.reward.Count; _Count++) { m_RewardList[_Count].gameObject.SetActive(true); ItemOfReward itemodreward = new ItemOfReward(); itemodreward.pid = _data.reward[_Count][0]; itemodreward.num = _data.reward[_Count][1]; m_RewardList[_Count].InitUI(itemodreward); } m_Id = _data.vipLv; VipShopInfo _info; if (m_Id > Core.Data.playerManager.curVipLv) { m_Title.gameObject.SetActive(true); m_GetReward.gameObject.SetActive(false); m_Title.SafeText(string.Format(Core.Data.stringManager.getString(25167), m_Id)); } else { m_Title.gameObject.SetActive(false); m_GetReward.gameObject.SetActive(true); m_GetReward.isEnabled = false; if (Core.Data.vipManager.IsFirstLogin_Vip) { m_GetReward.isEnabled = false; } else { if (!UIDragonMallMgr.GetInstance().m_VipStatusDic.TryGetValue(m_Id, out _info)) { m_GetReward.isEnabled = true; } } } }
//安全自动显示购买弹出窗 type --> //1:技能副本;2:战魂副本;3:经验副本;4:宝石副本 public void AutoShowBuyBox(int type) { NewDungeonsManager ndm = Core.Data.newDungeonsManager; string title = null; string content = null; //是否够买一次机会 bool haveEnoughMoney = false; if(type == 1) //技能副本 { VipInfoData vip =Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if(vip != null && ndm.explorDoors != null && ndm.explorDoors.skill != null && ndm.explorDoors.skill.passCount >= ndm.explorDoors.skill.count ) { if(ndm.explorDoors.skill.buyCount < vip.specialdoor1) { title = Core.Data.stringManager.getString(9115)+":"+ndm.explorDoors.skill.buyCount.ToString()+"/"+vip.specialdoor1.ToString(); content = Core.Data.stringManager.getString(9116).Replace("{}","[ffff00]"+ndm.explorDoors.skill.needStone.ToString()+"[-]"); haveEnoughMoney = Core.Data.playerManager.Stone >= ndm.explorDoors.skill.needStone; } else { VipInfoData data = Core.Data.vipManager.GetNextVipLevelBuyActiveFB(type,ndm.explorDoors.skill.buyCount); if(data != null) SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(9120).Replace("{}",data.vipLv.ToString())); } } } else if(type ==2) //战魂副本 { VipInfoData vip =Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if(vip != null && ndm.explorDoors != null && ndm.explorDoors.souls != null && ndm.explorDoors.souls.passCount >= ndm.explorDoors.souls.count ) { if(ndm.explorDoors.souls.buyCount < vip.specialdoor2) { title = Core.Data.stringManager.getString(9115)+":"+ndm.explorDoors.souls.buyCount.ToString()+"/"+vip.specialdoor2.ToString(); content = Core.Data.stringManager.getString(9116).Replace("{}","[ffff00]"+ndm.explorDoors.souls.needStone.ToString()+"[-]"); haveEnoughMoney = Core.Data.playerManager.Stone >= ndm.explorDoors.souls.needStone; } else { VipInfoData data = Core.Data.vipManager.GetNextVipLevelBuyActiveFB(type,ndm.explorDoors.souls.buyCount); if(data != null) SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(9120).Replace("{}",data.vipLv.ToString())); } } } else if(type ==3) //经验副本 { VipInfoData vip =Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if(vip != null && ndm.explorDoors != null && ndm.explorDoors.exp != null && ndm.explorDoors.exp.passCount >= ndm.explorDoors.exp.count ) { if(ndm.explorDoors.exp.buyCount < vip.specialdoor3) { title = Core.Data.stringManager.getString(9115)+":"+ndm.explorDoors.exp.buyCount.ToString()+"/"+vip.specialdoor3.ToString(); content = Core.Data.stringManager.getString(9116).Replace("{}","[ffff00]"+ndm.explorDoors.exp.needStone.ToString()+"[-]"); haveEnoughMoney = Core.Data.playerManager.Stone >= ndm.explorDoors.exp.needStone; } else { VipInfoData data = Core.Data.vipManager.GetNextVipLevelBuyActiveFB(type,ndm.explorDoors.exp.buyCount); if(data != null) SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(9120).Replace("{}",data.vipLv.ToString())); } } } else if(type ==4) //宝石副本 { VipInfoData vip =Core.Data.vipManager.GetVipInfoData(Core.Data.playerManager.curVipLv); if(vip != null && ndm.explorDoors != null && ndm.explorDoors.gems != null && ndm.explorDoors.gems.passCount >= ndm.explorDoors.gems.count ) { if(ndm.explorDoors.gems.buyCount < vip.specialdoor4) { title = Core.Data.stringManager.getString(9115)+":"+ndm.explorDoors.gems.buyCount.ToString()+"/"+vip.specialdoor4.ToString(); content = Core.Data.stringManager.getString(9116).Replace("{}","[ffff00]"+ndm.explorDoors.gems.needStone.ToString()+"[-]"); haveEnoughMoney = Core.Data.playerManager.Stone >= ndm.explorDoors.gems.needStone; } else { VipInfoData data = Core.Data.vipManager.GetNextVipLevelBuyActiveFB(type,ndm.explorDoors.gems.buyCount); if(data != null) SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(9120).Replace("{}",data.vipLv.ToString())); } } } //如果调用弹窗 if(title != null && content != null) { JCPromptBox.OpenUI(title,content).OnBtnBuyClick = () => { //客户端预判钻石 if(haveEnoughMoney) { HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response); task.AppendCommonParam(RequestType.BUY_PVEACT_FB, new BuyPVEActivityFB(Core.Data.playerManager.PlayerID,type,1) ); task.afterCompleted = (BaseHttpRequest request, BaseResponse response) => { if (response.status != BaseResponse.ERROR) { SyncPveResponse SPR= response as SyncPveResponse; Core.Data.newDungeonsManager.explorDoors = SPR.data; OnEnable(); if(FreshExpOrGem != null) { FreshExpOrGem(); } JCPromptBox.Close(); DBUIController.mDBUIInstance.RefreshUserInfo(); } else { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } }; task.DispatchToRealHandler(); } else { //35006钻石不足 SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(35006)); } }; } }