internal void AddRankHistory(int rank) { DateTime today_prize_time = ArenaSystem.GetNextExcuteDate(PrizeTime); if (DateTime.Now > today_prize_time) { today_prize_time = today_prize_time.AddDays(1); } m_RankHistory[today_prize_time] = rank; RemoveExpireRankHistory(); }
internal PrizeManager(Rank <ArenaInfo> rank, List <ArenaPrizeConfig> prize_rules, SimpleTime prizetime, MailSystem mailsystem) { m_Rank = rank; m_PrizeRules = prize_rules; m_PrizePresentTime = prizetime; m_MailSystem = mailsystem; m_NextPrizeDate = ArenaSystem.GetNextExcuteDate(m_PrizePresentTime); if (m_MailSystem != null) { m_MailSystem.RegisterModuleMailHandler(ModuleMailTypeEnum.ArenaModule, this); } }
internal void Tick() { if (DateTime.Now > m_NextPrizeDate) { m_NextPrizeDate = ArenaSystem.GetNextExcuteDate(m_PrizePresentTime); ModuleMailInfo module_mail = new ModuleMailInfo(); module_mail.m_Module = ModuleMailTypeEnum.ArenaModule; if (m_MailSystem != null) { m_MailSystem.SendModuleMail(module_mail, ArenaSystem.PRIZE_RETAIN_DAYS); } } }