public static EventMapModel GetRunningEvent() { try { int date = int.Parse(DateTime.Now.ToString("yyMMddHHmm")); for (int i = 0; i < list.Count; i++) { EventMapModel eventMap = list[i]; if (eventMap.startDate <= date && date < eventMap.endDate) { return(eventMap); } } } catch (Exception ex) { Logger.Exception(ex); } return(null); }
public static bool EventIsValid(EventMapModel eventMap, int mapId, int stageType) { return(eventMap != null && (eventMap.mapId == mapId || eventMap.stageType == stageType)); }