private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (e.Destination == WoWPoint.Zero) { return; } if (e.Destination.DistanceSqr(StyxWoW.Me.Location) < 60 * 60) { if (SpellManager.HasSpell("Ghost Wolf") && TalentManager.GetCount(2, 6) == 2) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write("Using Ghost Wolf instead of mounting"); SpellManager.Cast("Ghost Wolf"); } } else if (SpellManager.HasSpell("Travel Form")) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { Logger.Write("Using Travel Form instead of mounting."); SpellManager.Cast("Travel Form"); } } } }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (e.Destination == WoWPoint.Zero) return; if (e.Destination.DistanceSqr(StyxWoW.Me.Location) < 60*60) { if (SpellManager.HasSpell("Ghost Wolf") && TalentManager.GetCount(2,6) == 2) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write("Using Ghost Wolf instead of mounting"); SpellManager.Cast("Ghost Wolf"); } } else if (SpellManager.HasSpell("Travel Form")) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { Logger.Write("Using Travel Form instead of mounting."); SpellManager.Cast("Travel Form"); } } } }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (e.Destination == WoWPoint.Zero) return; if (e.Destination.DistanceSqr(StyxWoW.Me.Location) < 60 * 60 && (!Battlegrounds.IsInsideBattleground || DateTime.Now > Battlegrounds.BattlefieldStartTime )) { if (SpellManager.HasSpell("Ghost Wolf") && TalentManager.IsSelected(6)) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write("Using Ghost Wolf instead of mounting"); SpellManager.Cast("Ghost Wolf"); } } else if (SpellManager.HasSpell("Travel Form")) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { Logger.Write("Using Travel Form instead of mounting."); SpellManager.Cast("Travel Form"); } } } }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (e.Destination == WoWPoint.Zero) { return; } if (e.Destination.DistanceSqr(StyxWoW.Me.Location) < 60 * 60 && (!Battlegrounds.IsInsideBattleground || DateTime.Now > Battlegrounds.BattlefieldStartTime)) { if (SpellManager.HasSpell("Ghost Wolf") && TalentManager.IsSelected(6)) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write("Using Ghost Wolf instead of mounting"); SpellManager.Cast("Ghost Wolf"); } } else if (SpellManager.HasSpell("Travel Form")) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { Logger.Write("Using Travel Form instead of mounting."); SpellManager.Cast("Travel Form"); } } } }
// The below code idea was borrowed from Bobby. Credit to him for this mount check event void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (!Spell.IsKnown("Travel Form")) { return; } if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("NEVER")) { return; } if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("ALWAYS") && ClassHelpers.Druid.Shapeshift.IsTravelForm) { e.Cancel = true; return; } if (ClassHelpers.Druid.Shapeshift.IsTravelForm) { return; } while (Me.IsCasting) { System.Threading.Thread.Sleep(250); } /* * if ((Me.IsInParty || Me.IsInRaid) && RAF.PartyTankRole != null && !RAF.PartyTankRole.IsFlying && RAF.PartyTankRole.Distance < 50) * { * e.Cancel = true; * return; * } */ if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("ALWAYS")) { if (Timers.Expired("TravelFormMount", 2000)) { Spell.Cast("Travel Form"); Timers.Reset("TravelFormMount"); } e.Cancel = true; return; } }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && PVP.PrepTimeLeft > 5) { e.Cancel = true; return; } if (e.Destination == WoWPoint.Zero) return; if (Spell.GcdActive || StyxWoW.Me.IsCasting || StyxWoW.Me.ChanneledSpell != null ) return; if (e.Destination.Distance(StyxWoW.Me.Location) < Styx.Helpers.CharacterSettings.Instance.MountDistance && (!Battlegrounds.IsInsideBattleground || !PVP.IsPrepPhase) && !Utilities.EventHandlers.IsShapeshiftSuppressed) { if (StyxWoW.Me.Class == WoWClass.Shaman && SpellManager.HasSpell("Ghost Wolf") && SingularSettings.Instance.Shaman().UseGhostWolf) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write("Using Ghost Wolf instead of mounting"); SpellManager.Cast("Ghost Wolf"); } } else if (StyxWoW.Me.Class == WoWClass.Druid && SpellManager.HasSpell("Travel Form") && SingularSettings.Instance.Druid().UseTravelForm && StyxWoW.Me.IsOutdoors) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { Logger.Write("Using Travel Form instead of mounting."); SpellManager.Cast("Travel Form"); } } } // help HB out and stop immediately if we allow mount to proceed if (e.Cancel == false && StyxWoW.Me.IsMoving && Mount.CanMount()) { Logger.WriteDebug( Color.White, "OnMountUp: stopping to help HB mount quicker (fewer failed mount attempts)"); StopMoving.Now(); } }
public static void UseTravelForm(object sender, MountUpEventArgs e) { float traveldist = 30; float dist = StyxWoW.Me.Location.Distance(e.Destination); string errmsg = string.Empty; while (SpellManager.GlobalCooldown || StyxWoW.Me.IsCasting || StyxWoW.Me.ChanneledSpell != null) { Thread.Sleep(10); } if (!SpellManager.HasSpell("Travel Form")) { errmsg = "Don't have travel form."; } else if (e.Destination == WoWPoint.Zero) { errmsg = "Destination is WoWPoint.Zero"; } else if (dist > traveldist) { errmsg = string.Format("Dist {0} > traveldist {1}", dist, traveldist); } else if (Battlegrounds.IsInsideBattleground && DateTime.Now < Battlegrounds.BattlefieldStartTime) { errmsg = "Battle hasn't started yet."; } if (errmsg != string.Empty) { FTWLogger.log("Not using travel form because {0}", errmsg); } else { e.Cancel = true; FTWLogger.log("Using travel form for point {0} yards away (MountDistance: {1})", dist, Styx.Helpers.CharacterSettings.Instance.MountDistance); if (!StyxWoW.Me.HasAura("Travel Form")) { SpellManager.Cast("Travel Form"); } } }
void Mount_OnMountUp(object sender, MountUpEventArgs e) { e.Cancel = true; }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && PVP.PrepTimeLeft > 5) { e.Cancel = true; return; } if (!e.MoveDistance.HasValue) { return; } if (Spell.GcdActive || StyxWoW.Me.IsCasting || StyxWoW.Me.ChanneledSpell != null) { return; } if ((!Battlegrounds.IsInsideBattleground || !PVP.IsPrepPhase) && !Utilities.EventHandlers.IsShapeshiftSuppressed) { if (e.MoveDistance.Value < 60) { if (StyxWoW.Me.Class == WoWClass.Shaman && SpellManager.HasSpell("Ghost Wolf") && SingularSettings.Instance.Shaman().UseGhostWolf) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write(LogColor.Hilite, "^Ghost Wolf instead of mounting"); Spell.LogCast("Ghost Wolf", StyxWoW.Me); Spell.CastPrimative("Ghost Wolf"); } } else if (StyxWoW.Me.Class == WoWClass.Druid && SingularSettings.Instance.Druid().UseTravelForm&& SpellManager.HasSpell("Travel Form") && StyxWoW.Me.IsOutdoors) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { WoWAura aura = StyxWoW.Me.GetAllAuras().FirstOrDefault(a => a.Spell.Name.Substring(a.Name.Length - 5).Equals(" Form")); Logger.Write(LogColor.Hilite, "^Travel Form instead of mounting."); Logger.WriteDiagnostic("MountManager: changing to form='{0}', current='{1}', hb-says='{2}'", "Travel Form", aura == null ? "-none-" : aura.Name, StyxWoW.Me.Shapeshift.ToString() ); Spell.LogCast("Travel Form", StyxWoW.Me); Spell.CastPrimative("Travel Form"); } } } else if (StyxWoW.Me.Class == WoWClass.Druid && ClassSpecific.Druid.Common.AllowAquaticForm) { e.Cancel = true; if (!StyxWoW.Me.HasAnyShapeshift(ShapeshiftForm.Aqua, ShapeshiftForm.Travel, ShapeshiftForm.FlightForm, ShapeshiftForm.EpicFlightForm)) // check flightform in case we jump cast it at water surface { WoWAura aura = StyxWoW.Me.GetAllAuras().FirstOrDefault(a => a.Spell.Name.Substring(a.Name.Length - 5).Equals(" Form")); Logger.WriteDiagnostic("MountManager: changing to form='{0}', current='{1}', hb-says='{2}'", "Travel Form", aura == null ? "-none-" : aura.Name, StyxWoW.Me.Shapeshift.ToString() ); Logger.Write(LogColor.Hilite, "^Aquatic Form instead of mounting."); Spell.LogCast("Travel Form", StyxWoW.Me); Spell.CastPrimative("Travel Form"); } } } if (StyxWoW.Me.Class == WoWClass.Shaman && SingularRoutine.CurrentWoWContext != WoWContext.Battlegrounds && ClassSpecific.Shaman.Totems.NeedToRecallTotems) { Logger.WriteDiagnostic("OnMountUp: recalling totems since about to mount"); ClassSpecific.Shaman.Totems.RecallTotems(); } }
// The below code idea was borrowed from Bobby. Credit to him for this mount check event void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (!Spell.IsKnown("Travel Form")) return; if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("NEVER")) return; if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("ALWAYS") && ClassHelpers.Druid.Shapeshift.IsTravelForm) { e.Cancel = true; return; } if (ClassHelpers.Druid.Shapeshift.IsTravelForm) return; while (Me.IsCasting) System.Threading.Thread.Sleep(250); /* if ((Me.IsInParty || Me.IsInRaid) && RAF.PartyTankRole != null && !RAF.PartyTankRole.IsFlying && RAF.PartyTankRole.Distance < 50) { e.Cancel = true; return; } */ if (ClassHelpers.Druid.CLCTravelForm.ToUpper().Contains("ALWAYS")) { if (Timers.Expired("TravelFormMount", 2000)) { Spell.Cast("Travel Form"); Timers.Reset("TravelFormMount"); } e.Cancel = true; return; } }
public static void UseTravelForm(object sender, MountUpEventArgs e) { float traveldist = 30; float dist = StyxWoW.Me.Location.Distance(e.Destination); string errmsg = string.Empty; while (SpellManager.GlobalCooldown || StyxWoW.Me.IsCasting || StyxWoW.Me.ChanneledSpell != null) Thread.Sleep(10); if (!SpellManager.HasSpell("Travel Form")) errmsg = "Don't have travel form."; else if (e.Destination == WoWPoint.Zero) errmsg = "Destination is WoWPoint.Zero"; else if (dist > traveldist) errmsg = string.Format("Dist {0} > traveldist {1}", dist, traveldist); else if (Battlegrounds.IsInsideBattleground && DateTime.Now < Battlegrounds.BattlefieldStartTime) errmsg = "Battle hasn't started yet."; if (errmsg != string.Empty) { FTWLogger.log("Not using travel form because {0}", errmsg); } else { e.Cancel = true; FTWLogger.log("Using travel form for point {0} yards away (MountDistance: {1})", dist, Styx.Helpers.CharacterSettings.Instance.MountDistance); if (!StyxWoW.Me.HasAura("Travel Form")) SpellManager.Cast("Travel Form"); } }
private static void Mount_OnMountUp(object sender, MountUpEventArgs e) { if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && PVP.PrepTimeLeft > 5) { e.Cancel = true; return; } if (e.Destination == WoWPoint.Zero) return; if (Spell.GcdActive || StyxWoW.Me.IsCasting || StyxWoW.Me.ChanneledSpell != null ) return; if ((!Battlegrounds.IsInsideBattleground || !PVP.IsPrepPhase) && !Utilities.EventHandlers.IsShapeshiftSuppressed) { if (e.Destination.Distance(StyxWoW.Me.Location) < Styx.Helpers.CharacterSettings.Instance.MountDistance) { if (StyxWoW.Me.Class == WoWClass.Shaman && SpellManager.HasSpell("Ghost Wolf") && SingularSettings.Instance.Shaman().UseGhostWolf) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Ghost Wolf")) { Logger.Write( LogColor.Hilite, "^Ghost Wolf instead of mounting"); Spell.LogCast("Ghost Wolf", StyxWoW.Me); Spell.CastPrimative("Ghost Wolf"); } } else if (StyxWoW.Me.Class == WoWClass.Druid && SingularSettings.Instance.Druid().UseTravelForm && SpellManager.HasSpell("Travel Form") && StyxWoW.Me.IsOutdoors) { e.Cancel = true; if (!StyxWoW.Me.HasAura("Travel Form")) { WoWAura aura = StyxWoW.Me.GetAllAuras().FirstOrDefault(a => a.Spell.Name.Substring(a.Name.Length - 5).Equals(" Form")); Logger.Write(LogColor.Hilite, "^Travel Form instead of mounting."); Logger.WriteDiagnostic("MountManager: changing to form='{0}', current='{1}', hb-says='{2}'", "Travel Form", aura == null ? "-none-" : aura.Name, StyxWoW.Me.Shapeshift.ToString() ); Spell.LogCast("Travel Form", StyxWoW.Me); Spell.CastPrimative("Travel Form"); } } } else if (StyxWoW.Me.Class == WoWClass.Druid && ClassSpecific.Druid.Common.AllowAquaticForm) { e.Cancel = true; if (!StyxWoW.Me.HasAnyShapeshift(ShapeshiftForm.Aqua, ShapeshiftForm.Travel, ShapeshiftForm.FlightForm, ShapeshiftForm.EpicFlightForm)) // check flightform in case we jump cast it at water surface { WoWAura aura = StyxWoW.Me.GetAllAuras().FirstOrDefault(a => a.Spell.Name.Substring(a.Name.Length - 5).Equals(" Form")); Logger.WriteDiagnostic("MountManager: changing to form='{0}', current='{1}', hb-says='{2}'", "Travel Form", aura == null ? "-none-" : aura.Name, StyxWoW.Me.Shapeshift.ToString() ); Logger.Write(LogColor.Hilite, "^Aquatic Form instead of mounting."); Spell.LogCast("Travel Form", StyxWoW.Me); Spell.CastPrimative("Travel Form"); } } } if (StyxWoW.Me.Class == WoWClass.Shaman && SingularRoutine.CurrentWoWContext != WoWContext.Battlegrounds && ClassSpecific.Shaman.Totems.NeedToRecallTotems ) { Logger.WriteDiagnostic("OnMountUp: recalling totems since about to mount"); ClassSpecific.Shaman.Totems.RecallTotems(); } }