Example #1
0
 public static GoldEquipTemplateLoadInfo FindGoldEquipOldTemplate(int TemplateId)
 {
     if (GoldEquipMgr._items == null)
     {
         GoldEquipMgr.Init();
     }
     GoldEquipMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         foreach (GoldEquipTemplateLoadInfo templateLoadInfo in GoldEquipMgr._items.Values)
         {
             if (templateLoadInfo.NewTemplateId == TemplateId && templateLoadInfo.OldTemplateId.ToString().Substring(4) != "4")
             {
                 return(templateLoadInfo);
             }
         }
     }
     finally
     {
         GoldEquipMgr.m_lock.ReleaseReaderLock();
     }
     return((GoldEquipTemplateLoadInfo)null);
 }
Example #2
0
 public static GoldEquipTemplateLoadInfo FindGoldEquipCategoryID(int CategoryID)
 {
     if (GoldEquipMgr._items == null)
     {
         GoldEquipMgr.Init();
     }
     GoldEquipMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         foreach (GoldEquipTemplateLoadInfo templateLoadInfo in GoldEquipMgr._items.Values)
         {
             if (templateLoadInfo.CategoryID == CategoryID)
             {
                 return(templateLoadInfo);
             }
         }
     }
     finally
     {
         GoldEquipMgr.m_lock.ReleaseReaderLock();
     }
     return((GoldEquipTemplateLoadInfo)null);
 }
Example #3
0
 public static GoldEquipTemplateLoadInfo FindGoldEquipTemplate(int TemplateId)
 {
     if (GoldEquipMgr._items == null)
     {
         GoldEquipMgr.Init();
     }
     GoldEquipMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         foreach (GoldEquipTemplateLoadInfo current in GoldEquipMgr._items.Values)
         {
             if (current.OldTemplateId == TemplateId || current.NewTemplateId == TemplateId)
             {
                 return(current);
             }
         }
     }
     finally
     {
         GoldEquipMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }