public static List <WoWMount> GetAllMounts() { if (CachedMounts.Count > 0) { return(CachedMounts); } var ret = new List <WoWMount>(); var numMounts = WoWScript.Execute <int>("GetNumCompanions(\"MOUNT\")", 0); for (int i = 1; i <= numMounts; i++) { var mountInfo = WoWScript.Execute("GetCompanionInfo(\"MOUNT\", " + i + ")"); if (mountInfo.Count > 5) // GetCompanionInfo should return 6 items { try { ret.Add(new WoWMount(i, mountInfo[1], int.Parse(mountInfo[2]), int.Parse(mountInfo[5]))); } catch { } } } CachedMounts = ret; return(ret); }
public void StartAttack() { WoWScript.Execute("StartAttack()"); }