public static bool ReLoad() { try { Dictionary <int, TotemHonorTemplateInfo> TotemHonorTemplate = new Dictionary <int, TotemHonorTemplateInfo>(); if (TotemHonorMgr.Load(TotemHonorTemplate)) { TotemHonorMgr.m_lock.AcquireWriterLock(15000); try { TotemHonorMgr._totemHonorTemplate = TotemHonorTemplate; return(true); } catch { } finally { TotemHonorMgr.m_lock.ReleaseWriterLock(); } } } catch (Exception ex) { if (TotemHonorMgr.log.IsErrorEnabled) { TotemHonorMgr.log.Error((object)"ConsortiaLevelMgr", ex); } } return(false); }
public static bool Init() { bool flag; try { TotemHonorMgr.m_lock = new ReaderWriterLock(); TotemHonorMgr._totemHonorTemplate = new Dictionary <int, TotemHonorTemplateInfo>(); TotemHonorMgr.rand = new ThreadSafeRandom(); flag = TotemHonorMgr.Load(TotemHonorMgr._totemHonorTemplate); } catch (Exception ex) { if (TotemHonorMgr.log.IsErrorEnabled) { TotemHonorMgr.log.Error((object)"ConsortiaLevelMgr", ex); } flag = false; } return(flag); }