/// <summary> /// Destroys the totem described by type. /// </summary> /// <remarks> /// Created 3/26/2011. /// </remarks> /// <param name = "type">The type.</param> public static void DestroyTotem(WoWTotemType type) { if (type == WoWTotemType.None) { return; } Lua.DoString("DestroyTotem({0})", (int)type); }
/// <summary> /// Destroys the totem described by type. /// </summary> /// <remarks> /// Created 3/26/2011. /// </remarks> /// <param name = "type">The type.</param> public static void DestroyTotem(WoWTotemType type) { if (type == WoWTotemType.None) { return; } Logger.Write("^Destroy Totem Type: {0}", type.ToString()); Lua.DoString("DestroyTotem({0})", (int)type); }
public static float GetTotemDistance(WoWUnit from, WoWTotemType type) { var info = GetTotemInfo(type); if (info == null) { return(-1); } return(info.Unit.Location.Distance(from.Location)); }
/// <summary> /// Destroys the totem described by type. /// </summary> /// <remarks> /// Created 3/26/2011. /// </remarks> /// <param name = "type">The type.</param> public static void DestroyTotem(WoWTotemType type) { if (type == WoWTotemType.None) { return; } try { Lua.DoString("DestroyTotem({0})", (int)type); } catch { CLULogger.DiagnosticLog("Lua failed in DestroyTotem"); } }
public ElementalTotem(WoWTotemType type) { this.type = type; }
/// <summary> /// gets reference to array element in Me.Totems[] corresponding to type. Return is always non-null and does not indicate totem existance /// </summary> /// <param name="type">WoWTotemType of slot to reference</param> /// <returns>WoWTotemInfo reference</returns> public static WoWTotemInfo GetTotem(WoWTotemType type) { return(Me.Totems[(int)type - 1]); }
/// <summary> /// check if type of totem (ie Air Totem) exists in range /// </summary> /// <param name="pt"></param> /// <param name="type"></param> /// <returns></returns> public static bool ExistInRange(WoWPoint pt, WoWTotemType type) { WoWTotemInfo ti = GetTotem(type); return(Exist(ti) && ti.Unit != null && ti.Unit.Location.Distance(pt) < GetTotemRange(ti.WoWTotem)); }
/// <summary> /// check if a type of totem (ie Air Totem) exists /// </summary> /// <param name="type"></param> /// <returns></returns> public static bool Exist(WoWTotemType type) { WoWTotem wt = GetTotem(type).WoWTotem; return(IsRealTotem(wt)); }
/// <summary> /// check if type of totem (ie Air Totem) exists in range /// </summary> /// <param name="pt"></param> /// <param name="type"></param> /// <returns></returns> public static bool ExistInRange(WoWPoint pt, WoWTotemType type) { WoWTotemInfo ti = GetTotem(type); return Exist(ti) && ti.Unit != null && ti.Unit.Location.Distance(pt) < GetTotemRange(ti.WoWTotem); }
/// <summary>Gets a totem information for the specified type of totem.</summary> /// <remarks>Created 3/26/2011.</remarks> /// <param name="type">The type.</param> /// <returns>The totem information.</returns> public static WoWTotemInfo GetTotemInfo(WoWTotemType type) { return StyxWoW.Me.Totems.FirstOrDefault(t => t.Type == type && t.Unit != null); }
private static WoWTotem GetTotemForSpec(WoWTotemType type) { switch (TalentManager.CurrentSpec) { case TalentSpec.ElementalShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Searing)) return WoWTotem.Searing; break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.Stoneskin)) return WoWTotem.Stoneskin; break; case WoWTotemType.Water: if (Battlegrounds.IsInsideBattleground) { if (CanPlaceTotem(WoWTotem.HealingStream) && TalentManager.HasGlyph("Healing Stream Totem")) return WoWTotem.HealingStream; if (CanPlaceTotem(WoWTotem.ElementalResistance)) return WoWTotem.ElementalResistance; } if (CanPlaceTotem(WoWTotem.HealingStream)) return WoWTotem.HealingStream; if (CanPlaceTotem(WoWTotem.ManaSpring)) return WoWTotem.ManaSpring; break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.WrathOfAir)) return WoWTotem.WrathOfAir; break; } break; case TalentSpec.RestorationShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Flametongue)) return WoWTotem.Flametongue; break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.Stoneskin)) return WoWTotem.Stoneskin; break; case WoWTotemType.Water: if (CanPlaceTotem(WoWTotem.HealingStream)) return WoWTotem.HealingStream; if (CanPlaceTotem(WoWTotem.ManaSpring)) return WoWTotem.ManaSpring; break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.Grounding)) return WoWTotem.Grounding; if (CanPlaceTotem(WoWTotem.WrathOfAir)) return WoWTotem.WrathOfAir; break; } break; case TalentSpec.EnhancementShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Searing)) return WoWTotem.Grounding; break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.StrengthOfEarth)) return WoWTotem.StrengthOfEarth; if (CanPlaceTotem(WoWTotem.Stoneskin)) return WoWTotem.Stoneskin; break; case WoWTotemType.Water: if (Battlegrounds.IsInsideBattleground) { if (CanPlaceTotem(WoWTotem.HealingStream) && TalentManager.HasGlyph("Healing Stream Totem")) return WoWTotem.HealingStream; if (CanPlaceTotem(WoWTotem.ElementalResistance)) return WoWTotem.ElementalResistance; } if (CanPlaceTotem(WoWTotem.HealingStream)) return WoWTotem.HealingStream; if (CanPlaceTotem(WoWTotem.ManaSpring)) return WoWTotem.ManaSpring; break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.Windfury)) return WoWTotem.Windfury; break; } break; } return WoWTotem.None; }
public static float GetTotemDistance(WoWUnit from, WoWTotemType type) { var info = GetTotemInfo(type); if (info == null) return -1; return info.Unit.Location.Distance(from.Location); }
/// <summary>Gets a totem information for the specified type of totem.</summary> /// <remarks>Created 3/26/2011.</remarks> /// <param name="type">The type.</param> /// <returns>The totem information.</returns> public static WoWTotemInfo GetTotemInfo(WoWTotemType type) { return(StyxWoW.Me.Totems.FirstOrDefault(t => t.Type == type && t.Unit != null)); }
private static WoWTotem GetTotemForSpec(WoWTotemType type) { switch (TalentManager.CurrentSpec) { case TalentSpec.ElementalShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Searing)) { return(WoWTotem.Searing); } break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.Stoneskin)) { return(WoWTotem.Stoneskin); } break; case WoWTotemType.Water: if (Battlegrounds.IsInsideBattleground) { if (CanPlaceTotem(WoWTotem.HealingStream) && TalentManager.HasGlyph("Healing Stream Totem")) { return(WoWTotem.HealingStream); } if (CanPlaceTotem(WoWTotem.ElementalResistance)) { return(WoWTotem.ElementalResistance); } } if (CanPlaceTotem(WoWTotem.HealingStream)) { return(WoWTotem.HealingStream); } if (CanPlaceTotem(WoWTotem.ManaSpring)) { return(WoWTotem.ManaSpring); } break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.WrathOfAir)) { return(WoWTotem.WrathOfAir); } break; } break; case TalentSpec.RestorationShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Flametongue)) { return(WoWTotem.Flametongue); } break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.Stoneskin)) { return(WoWTotem.Stoneskin); } break; case WoWTotemType.Water: if (CanPlaceTotem(WoWTotem.HealingStream)) { return(WoWTotem.HealingStream); } if (CanPlaceTotem(WoWTotem.ManaSpring)) { return(WoWTotem.ManaSpring); } break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.Grounding)) { return(WoWTotem.Grounding); } if (CanPlaceTotem(WoWTotem.WrathOfAir)) { return(WoWTotem.WrathOfAir); } break; } break; case TalentSpec.EnhancementShaman: switch (type) { case WoWTotemType.Fire: if (CanPlaceTotem(WoWTotem.Searing)) { return(WoWTotem.Grounding); } break; case WoWTotemType.Earth: if (CanPlaceTotem(WoWTotem.StrengthOfEarth)) { return(WoWTotem.StrengthOfEarth); } if (CanPlaceTotem(WoWTotem.Stoneskin)) { return(WoWTotem.Stoneskin); } break; case WoWTotemType.Water: if (Battlegrounds.IsInsideBattleground) { if (CanPlaceTotem(WoWTotem.HealingStream) && TalentManager.HasGlyph("Healing Stream Totem")) { return(WoWTotem.HealingStream); } if (CanPlaceTotem(WoWTotem.ElementalResistance)) { return(WoWTotem.ElementalResistance); } } if (CanPlaceTotem(WoWTotem.HealingStream)) { return(WoWTotem.HealingStream); } if (CanPlaceTotem(WoWTotem.ManaSpring)) { return(WoWTotem.ManaSpring); } break; case WoWTotemType.Air: if (CanPlaceTotem(WoWTotem.Windfury)) { return(WoWTotem.Windfury); } break; } break; } return(WoWTotem.None); }
/// <summary> /// check if a type of totem (ie Air Totem) exists /// </summary> /// <param name="type"></param> /// <returns></returns> public static bool Exist(WoWTotemType type) { WoWTotem wt = GetTotem(type).WoWTotem; return IsRealTotem(wt); }
/// <summary> /// gets reference to array element in Me.Totems[] corresponding to type. Return is always non-null and does not indicate totem existance /// </summary> /// <param name="type">WoWTotemType of slot to reference</param> /// <returns>WoWTotemInfo reference</returns> public static WoWTotemInfo GetTotem(WoWTotemType type) { return Me.Totems[(int)type - 1]; }