public static bool ReLoad() { try { Dictionary <int, QuestInfo> quests = QuestMgr.LoadQuestInfoDb(); Dictionary <int, List <QuestConditionInfo> > dictionary1 = QuestMgr.LoadQuestCondictionDb(quests); Dictionary <int, List <QuestAwardInfo> > dictionary2 = QuestMgr.LoadQuestGoodDb(quests); if (quests.Count > 0) { Interlocked.Exchange <Dictionary <int, QuestInfo> >(ref QuestMgr.m_questinfo, quests); Interlocked.Exchange <Dictionary <int, List <QuestConditionInfo> > >(ref QuestMgr.m_questcondiction, dictionary1); Interlocked.Exchange <Dictionary <int, List <QuestAwardInfo> > >(ref QuestMgr.m_questgoods, dictionary2); } return(true); } catch (Exception ex) { QuestMgr.log.Error((object)"QuestMgr", ex); } return(false); }
public static bool ReLoad() { try { Dictionary <int, QuestInfo> dictionary = QuestMgr.LoadQuestInfoDb(); Dictionary <int, List <QuestConditionInfo> > value = QuestMgr.LoadQuestCondictionDb(dictionary); Dictionary <int, List <QuestAwardInfo> > value2 = QuestMgr.LoadQuestGoodDb(dictionary); if (dictionary.Count > 0) { Interlocked.Exchange <Dictionary <int, QuestInfo> >(ref QuestMgr.m_questinfo, dictionary); Interlocked.Exchange <Dictionary <int, List <QuestConditionInfo> > >(ref QuestMgr.m_questcondiction, value); Interlocked.Exchange <Dictionary <int, List <QuestAwardInfo> > >(ref QuestMgr.m_questgoods, value2); } return(true); } catch (Exception exception) { QuestMgr.log.Error("QuestMgr", exception); } return(false); }
public static bool Init() { return(QuestMgr.ReLoad()); }