コード例 #1
0
 public static bool IsSpellReadyByName(string name)
 {
     if (Enumerable.FirstOrDefault <BarSpell>(Enumerable.Select <KeyValuePair <string, BarSpell>, BarSpell>(Enumerable.Where <KeyValuePair <string, BarSpell> >((IEnumerable <KeyValuePair <string, BarSpell> >)BarMapper.Spells, (Func <KeyValuePair <string, BarSpell>, bool>)(barSpell => barSpell.Key == name)), (Func <KeyValuePair <string, BarSpell>, BarSpell>)(barSpell => barSpell.Value))) != null)
     {
         return(BarMapper.IsSpellReady(BarMapper.GetSpellByName(name).SpellId));
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
        public static int GetIdFromName(string name)
        {
            List <int> idsFromName = BarMapper.GetIdsFromName(name);

            if (idsFromName.Count != 0)
            {
                return(idsFromName[0]);
            }
            else
            {
                return(0);
            }
        }
コード例 #3
0
 public static string GetNameFromSpell(int spellId)
 {
     BarMapper.Load();
     try
     {
         if (BarMapper._spellDatabase.ContainsKey(spellId))
         {
             return(BarMapper._spellDatabase[spellId]);
         }
         else
         {
             return(string.Empty);
         }
     }
     catch (Exception)
     {
         Logging.Write("Error find name of spell: " + (object)spellId, new object[0]);
         return(string.Empty);
     }
 }
コード例 #4
0
 public static bool DoesBuffExist(string name)
 {
     return(BarMapper.GetIdsFromName(name).Count != 0);
 }
コード例 #5
0
        public static bool HasBuff(PUnit check, string name)
        {
            List <int> idsFromName = BarMapper.GetIdsFromName(name);

            return(ObjectManager.Initialized && check.HasBuff(idsFromName));
        }
コード例 #6
0
 public static bool IsSpellReadyById(int id)
 {
     return(BarMapper.IsSpellReady(id));
 }