Esempio n. 1
0
 internal static bool PetIsSpellReady(string name)
 {
     name = name.Replace("()", "");
     if (!PetCooldownManager.Contains("GCD") && !PetCooldownManager.Contains(name))
     {
         string   LuaStatement = "eins, zwei = gotPetSpellCd('" + name + "')";
         string[] result       = Calls.GetText(LuaStatement, new string[] { "eins", "zwei" }, 20);
         if (result[0].Trim() == "0")
         {
             return(true);
         }
         else
         {
             if (result[0] != "" && result[1] != "")
             {
                 double timeStamp = Convert.ToDouble(result[0].Replace(".", ""));
                 double secCd     = TimeSpan.FromSeconds(Convert.ToDouble(result[1].Replace(".", ","))).TotalMilliseconds;
                 if (secCd == 1500)
                 {
                     PetCooldownManager.Add("GCD", timeStamp + secCd);
                 }
                 PetCooldownManager.Add(name, timeStamp + secCd);
             }
         }
     }
     return(false);
 }
Esempio n. 2
0
 internal static bool IsPetGCD()
 {
     return(PetCooldownManager.Contains("GCD"));
 }