public static bool Reload()
 {
     try
     {
         Dictionary <int, MissionInfo> dictionary = MissionInfoMgr.LoadFromDatabase();
         if (dictionary.Count > 0)
         {
             Interlocked.Exchange <Dictionary <int, MissionInfo> >(ref MissionInfoMgr.m_missionInfos, dictionary);
         }
         return(true);
     }
     catch (Exception exception)
     {
         MissionInfoMgr.log.Error("MissionInfoMgr", exception);
     }
     return(false);
 }
Exemple #2
0
        public static bool Reload()
        {
            bool result;

            try
            {
                Dictionary <int, MissionInfo> tempMissionInfo = MissionInfoMgr.LoadFromDatabase();
                if (tempMissionInfo.Count > 0)
                {
                    Interlocked.Exchange <Dictionary <int, MissionInfo> >(ref MissionInfoMgr.m_missionInfos, tempMissionInfo);
                }
                result = true;
                return(result);
            }
            catch (Exception e)
            {
                MissionInfoMgr.log.Error("MissionInfoMgr", e);
            }
            result = false;
            return(result);
        }
 public static bool Init()
 {
     return(MissionInfoMgr.Reload());
 }