private void InitTime() { start = 0; end = 0; Hotfix_LT.Data.CronJobs startTbl = Hotfix_LT.Data.EventTemplateManager.Instance.GetCronJobsByName(worldBossStartName); Hotfix_LT.Data.CronJobs stopTbl = Hotfix_LT.Data.EventTemplateManager.Instance.GetCronJobsByName(worldBossStopName); if (startTbl == null || stopTbl == null) { return; } EB.Debug.Log(string.Format("**LTWorldBossDataManager** startTbl::{0}", startTbl.interval)); EB.Debug.Log(string.Format("**LTWorldBossDataManager** stopTbl::{0}", stopTbl.interval)); string open_time = GetWorldBossOpenWeekTime(startTbl.interval); int curweek = EB.Time.LocalWeek; if (open_time.Contains(curweek.ToString())) { Hotfix_LT.Data.ActivityTime startAct = GetWorldBossTime(startTbl.interval); Hotfix_LT.Data.ActivityTime endAct = GetWorldBossTime(stopTbl.interval); start = Hotfix_LT.Data.ZoneTimeDiff.GetTime(startAct); end = Hotfix_LT.Data.ZoneTimeDiff.GetTime(endAct); } }
private Hotfix_LT.Data.ActivityTime GetWorldBossTime(string interval) { Hotfix_LT.Data.ActivityTime act = new Hotfix_LT.Data.ActivityTime(); string[] inteStrs = interval.Split(' '); if (inteStrs.Length < 3) { EB.Debug.LogError("GetWorldBossTime is Error, inteStrs.Length < 3"); return(act); } act.hour = int.Parse(inteStrs[2]); act.minute = int.Parse(inteStrs[1]); act.second = int.Parse(inteStrs[0]); return(act); }
private bool IsVitCouldGet() { Hotfix_LT.Data.ActivityTime openTime = LTDailyDataManager.Instance.GetActivityOpenTimeByActivityID(curActData.id); if (openTime.hourStr.IndexOf(openTime.hour.ToString()) < 0) { return(false); } if (openTime.hourStr.IndexOf(openTime.hour.ToString()) == 0) { bool b = false; DataLookupsCache.Instance.SearchDataByID("user_prize_data.daily_login.is_draw_daily_vigor1", out b); return(!b); } else { bool b = false; DataLookupsCache.Instance.SearchDataByID("user_prize_data.daily_login.is_draw_daily_vigor2", out b); return(!b); } }