예제 #1
0
        public CatalogThemeDefinition GetThemeByScheduelId(long id)
        {
            CatalogThemeScheduleDefinition scheduleById = GetScheduleById(id);

            if (scheduleById == null)
            {
                return(null);
            }
            return(GetThemeById(scheduleById.CatalogThemeId));
        }
예제 #2
0
        public CatalogThemeScheduleDefinition GetScheduleById(long scheduleId)
        {
            CatalogThemeScheduleDefinition result = null;
            Dictionary <int, CatalogThemeScheduleDefinition> dictionary = Service.Get <GameData>().Get <Dictionary <int, CatalogThemeScheduleDefinition> >();

            if (dictionary != null)
            {
                if (dictionary.ContainsKey((int)scheduleId))
                {
                    result = dictionary[(int)scheduleId];
                }
                else
                {
                    Log.LogErrorFormatted(this, "Unable to locate schedule definition with id {0}.", scheduleId);
                }
            }
            return(result);
        }