public static int GetSkillCount() { if (PetMgr._skillTemplates == null) { PetMgr.Init(); } return(PetMgr._skillTemplates.Values.Count); }
public static int GetPetCount() { if (PetMgr._templateIds == null) { PetMgr.Init(); } return(PetMgr._templateIds.Values.Count); }
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); }
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); }
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); }
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); }
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); }
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); }