public bool IsOld() { if (mDateTime == null) { return(false); } int day1 = TimeConvert.GetDays(mDateTime); int day2 = TimeConvert.NowDay(); if (day2 != day1) { return(true); } return(false); }
public MissionLog AddLog(int _missionId, string _name, DateTime _time) { MissionLog log = new MissionLog(); log.mId = MaxID++; log.mMissionName = _name; log.mDateTime = _time; log.mMissionId = _missionId; mListMissionLog.Add(log); MissionDayLog daylog = null; if (mListMissionDayLog.Count > 0) { int _day_time = TimeConvert.GetDays(mListMissionDayLog[mListMissionDayLog.Count - 1].mDateTime); if (_day_time == TimeConvert.NowDay()) { daylog = mListMissionDayLog[mListMissionDayLog.Count - 1]; } } if (daylog == null) { daylog = new MissionDayLog(); daylog.mCount = 0; daylog.mDateTime = TimeConvert.GetNow(); mListMissionDayLog.Add(daylog); } daylog.mCount++; daylog.mTotalExp = PlayerInfo.Exp; MissionNameLog namelog = null; if (!mDicMissionNameLog.TryGetValue(_name, out namelog)) { namelog = new MissionNameLog(); namelog.mName = _name; namelog.mCount = 0; namelog.mDateTime = TimeConvert.GetNow(); mDicMissionNameLog.Add(_name, namelog); } namelog.mCount++; return(log); }