예제 #1
0
 public static int GetSkillCount()
 {
     if (PetMgr._skillTemplates == null)
     {
         PetMgr.Init();
     }
     return(PetMgr._skillTemplates.Values.Count);
 }
예제 #2
0
 public static int GetPetCount()
 {
     if (PetMgr._templateIds == null)
     {
         PetMgr.Init();
     }
     return(PetMgr._templateIds.Values.Count);
 }
예제 #3
0
        public static List <PetSkillElementInfo> GameNeedPetSkill()
        {
            if (PetMgr._skillElements == null)
            {
                PetMgr.Init();
            }
            List <PetSkillElementInfo> list = new List <PetSkillElementInfo>();
            Dictionary <string, PetSkillElementInfo> dictionary = new Dictionary <string, PetSkillElementInfo>();

            foreach (PetSkillElementInfo current in PetMgr._skillElements.Values)
            {
                if (!dictionary.Keys.Contains(current.EffectPic) && !string.IsNullOrEmpty(current.EffectPic))
                {
                    list.Add(current);
                    dictionary.Add(current.EffectPic, current);
                }
            }
            return(list);
        }
예제 #4
0
 public static PetTemplateInfo FindPetTemplateById(int ID)
 {
     if (PetMgr._templateIds == null)
     {
         PetMgr.Init();
     }
     PetMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         if (PetMgr._templateIds.ContainsKey(ID))
         {
             return(PetMgr._templateIds[ID]);
         }
     }
     catch
     {
     }
     finally
     {
         PetMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }
예제 #5
0
 public static PetSkillTemplateInfo GetPetSkillTemplate(int ID)
 {
     if (PetMgr._skillTemplates == null)
     {
         PetMgr.Init();
     }
     PetMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         if (PetMgr._skillTemplates.ContainsKey(ID))
         {
             return(PetMgr._skillTemplates[ID]);
         }
     }
     catch
     {
     }
     finally
     {
         PetMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }
예제 #6
0
 public static PetSkillInfo FindPetSkill(int SkillID)
 {
     if (PetMgr._skills == null)
     {
         PetMgr.Init();
     }
     PetMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         if (PetMgr._skills.ContainsKey(SkillID))
         {
             return(PetMgr._skills[SkillID]);
         }
     }
     catch
     {
     }
     finally
     {
         PetMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }
예제 #7
0
 public static PetLevel FindPetLevel(int level)
 {
     if (PetMgr._levels == null)
     {
         PetMgr.Init();
     }
     PetMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         if (PetMgr._levels.ContainsKey(level))
         {
             return(PetMgr._levels[level]);
         }
     }
     catch
     {
     }
     finally
     {
         PetMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }
예제 #8
0
 public static PetConfig FindConfig(string key)
 {
     if (PetMgr._configs == null)
     {
         PetMgr.Init();
     }
     PetMgr.m_lock.AcquireReaderLock(15000);
     try
     {
         if (PetMgr._configs.ContainsKey(key))
         {
             return(PetMgr._configs[key]);
         }
     }
     catch
     {
     }
     finally
     {
         PetMgr.m_lock.ReleaseReaderLock();
     }
     return(null);
 }