示例#1
0
        public static bool ReLoad()
        {
            bool result = false;

            try
            {
                List <DropCondiction> tempDropCondiction = DropMgr.LoadDropConditionDb();
                Interlocked.Exchange <List <DropCondiction> >(ref DropMgr.m_dropcondiction, tempDropCondiction);
                Dictionary <int, List <DropItem> > tempDropItem = DropMgr.LoadDropItemDb();
                Interlocked.Exchange <Dictionary <int, List <DropItem> > >(ref DropMgr.m_dropitem, tempDropItem);
                if (tempDropCondiction.Count > 0 && tempDropItem.Count > 0)
                {
                    result = true;
                }
                else
                {
                    DropMgr.log.Warn("DropMgr didn't load any data!");
                }
            }
            catch (Exception e)
            {
                DropMgr.log.Error("DropMgr", e);
            }
            return(result);
        }
示例#2
0
 public static bool ReLoad()
 {
     try
     {
         List <DropCondiction> list = DropMgr.LoadDropConditionDb();
         Interlocked.Exchange <List <DropCondiction> >(ref DropMgr.m_dropcondiction, list);
         Dictionary <int, List <DropItem> > dictionary = DropMgr.LoadDropItemDb();
         Interlocked.Exchange <Dictionary <int, List <DropItem> > >(ref DropMgr.m_dropitem, dictionary);
         return(true);
     }
     catch (Exception ex)
     {
         DropMgr.log.Error((object)"DropMgr", ex);
     }
     return(false);
 }
示例#3
0
 public static bool ReLoad()
 {
     try
     {
         List <DropCondiction> value = DropMgr.LoadDropConditionDb();
         Interlocked.Exchange <List <DropCondiction> >(ref DropMgr.m_dropcondiction, value);
         Dictionary <int, List <DropItem> > value2 = DropMgr.LoadDropItemDb();
         Interlocked.Exchange <Dictionary <int, List <DropItem> > >(ref DropMgr.m_dropitem, value2);
         return(true);
     }
     catch (Exception exception)
     {
         DropMgr.log.Error("DropMgr", exception);
     }
     return(false);
 }