public bool IsFinishExperienceTimes() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(SpecialFightMode.Expericence) as SpecialFightInfo; if (specialFightInfo == null) { return(false); } int maxVipTimesByType = VIPPrivilegeManager.Instance.GetMaxVipTimesByType(15); return(specialFightInfo.m_ExtendTimes >= maxVipTimesByType); }
private void OnBuyBuffCallBack() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(this.currentMode) as SpecialFightInfo; if (specialFightInfo == null) { return; } if (specialFightInfo.m_BuffIds.get_Count() > 0) { this.SelectBuff(specialFightInfo.m_BuffIds); } }
public void SetModeInit(SpecialFightMode mode) { this.currentMode = mode; SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(mode) as SpecialFightInfo; if (specialFightInfo != null && specialFightInfo.m_BuffIds.get_Count() > 0) { this.SelectBuff(specialFightInfo.m_BuffIds); } else { this.ClearBuffs(); } }
public void OnBuyExperienceTimes() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(SpecialFightMode.Expericence) as SpecialFightInfo; if (specialFightInfo == null) { return; } List <int> date = DataReader <FJingYanFuBenPeiZhi> .Get("price").date; List <int> date2 = DataReader <FJingYanFuBenPeiZhi> .Get("buyTimes").date; int extendTimes = specialFightInfo.m_ExtendTimes; int num = EntityWorld.Instance.EntSelf.VipLv; if (!VIPManager.Instance.IsVIPPrivilegeOn()) { num = 0; } int num2 = 0; if (num <= 0 && VIPManager.Instance.IsVIPCardOn()) { num2 = VIPPrivilegeManager.Instance.GetVipTimesByType(15); } int num3 = date2.get_Item(num); int num4 = Mathf.Max(num3 + num2 - extendTimes, 0); if (num4 <= 0 && extendTimes < date.get_Count()) { DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(505105, false), null, delegate { LinkNavigationManager.OpenVIPUI2Privilege(); }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true); return; } if (extendTimes >= date.get_Count() || num4 == 0) { DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(513531, false), GameDataUtils.GetChineseContent(513528, false), null, GameDataUtils.GetChineseContent(505114, false), "button_orange_1", null); } else { int num5 = date.get_Item(extendTimes); DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(513531, false), string.Format(GameDataUtils.GetChineseContent(513530, false), num5, num4, num3), null, null, delegate { DialogBoxUIViewModel.Instance.BtnRclose = true; SpecialFightManager.Instance.ExtendExperienceTimeReq(); }, GameDataUtils.GetChineseContent(500012, false), GameDataUtils.GetChineseContent(500011, false), "button_orange_1", "button_yellow_1", null); } }
protected void StartExperienceFight() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(this.currentMode) as SpecialFightInfo; if (specialFightInfo == null) { return; } if (specialFightInfo.m_RestTimes <= 0) { this.OnBuyExperienceTimes(); } else { SpecialFightManager.Instance.StartExperienceFight(); } }
protected void InitBuff(SpecialFightMode mode) { this.DifficultyList.get_gameObject().SetActive(false); this.BuffObj.SetActive(true); SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(this.currentMode) as SpecialFightInfo; if (specialFightInfo == null) { return; } int buffId = 0; if (specialFightInfo.m_BuffIds != null && specialFightInfo.m_BuffIds.get_Count() > 0) { buffId = specialFightInfo.m_BuffIds.get_Item(0); } this.OnUpdateBuff(buffId); }
protected void OnUpdateExpericenceInstanceDetailUI() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(this.currentMode) as SpecialFightInfo; if (specialFightInfo == null) { return; } this.OnUpdateDetailUI(); this.InstanceTimesNum.set_text(specialFightInfo.m_RestTimes.ToString()); this.BuyTimeBtn.get_gameObject().SetActive(specialFightInfo.m_RestTimes == 0); int buffId = 0; if (specialFightInfo.m_BuffIds != null && specialFightInfo.m_BuffIds.get_Count() > 0) { buffId = specialFightInfo.m_BuffIds.get_Item(0); } this.OnUpdateBuff(buffId); }
private void InitExperienceFightData(short state, ExperienceCopyInfoNty down = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (down == null) { return; } SpecialFightMode specialFightMode = SpecialFightMode.Expericence; SpecialFightInfo specialFightInfo = this.GetFightInfo(specialFightMode); if (specialFightInfo != null) { specialFightInfo.m_Mode = specialFightMode; specialFightInfo.m_RestTimes = down.restChallengeTimes; specialFightInfo.m_ExtendTimes = down.extendTimes; } else { specialFightInfo = new SpecialFightInfo { m_Mode = specialFightMode, m_RestTimes = down.restChallengeTimes, m_ExtendTimes = down.extendTimes, m_InstanceID = DataReader <FJingYanFuBenPeiZhi> .Get("dungeonId").num }; this.SFightInfo.Add(specialFightMode, specialFightInfo); } this.BroadcastRefreshEvent(); EventDispatcher.Broadcast(EventNames.UpdateSpecialInstanceDetailUI); if (UIManagerControl.Instance.IsOpen("DailyTaskUI")) { EventDispatcher.Broadcast(EventNames.DailyTaskNty); } }
public bool CanShowBuyExperienceTimesInDailyTask() { SpecialFightInfo specialFightInfo = SpecialFightManager.GetSpecialFightInfo(SpecialFightMode.Expericence) as SpecialFightInfo; return(specialFightInfo != null && specialFightInfo.m_RestTimes <= 0); }