public static bool ReLoad() { try { Dictionary <int, RuneTemplateInfo> dictionary = new Dictionary <int, RuneTemplateInfo>(); if (RuneMgr.LoadItem(dictionary)) { RuneMgr.m_lock.AcquireWriterLock(15000); try { RuneMgr._items = dictionary; return(true); } catch { } finally { RuneMgr.m_lock.ReleaseWriterLock(); } } } catch (Exception exception) { if (RuneMgr.log.IsErrorEnabled) { RuneMgr.log.Error("ReLoad", exception); } } return(false); }
public static bool Init() { bool result; try { RuneMgr.m_lock = new ReaderWriterLock(); RuneMgr._items = new Dictionary <int, RuneTemplateInfo>(); result = RuneMgr.LoadItem(RuneMgr._items); } catch (Exception exception) { if (RuneMgr.log.IsErrorEnabled) { RuneMgr.log.Error("Init", exception); } result = false; } return(result); }