internal static void HandleContextChanged(object sender, WoWContextEventArg e) { // Since we hooked this in ctor, make sure we are the selected CC if (RoutineManager.Current.Name != SingularRoutine.Instance.Name) return; if (e.CurrentContext == WoWContext.Battlegrounds || StyxWoW.Me.CurrentMap.IsRaid) DetachCombatLogEvent(); else AttachCombatLogEvent(); }
internal static void HandleContextChanged(object sender, WoWContextEventArg e) { if (e.CurrentContext != WoWContext.Battlegrounds) { BattlegroundStart = DateTime.UtcNow; } else { BattlegroundStart = DateTime.UtcNow + TimeSpan.FromSeconds(120); // just add enough for now... accurate time set by event handler } if (e.PreviousContext == WoWContext.Battlegrounds) { StopMoving.AsSoonAsPossible(when => Styx.StyxWoW.IsInGame); } }
internal static void HandleContextChanged(object sender, WoWContextEventArg e) { // Since we hooked this in ctor, make sure we are the selected CC if (RoutineManager.Current == null || RoutineManager.Current.Name != SingularRoutine.Instance.Name) { return; } if (SingularSettings.Debug || (SingularRoutine.CurrentWoWContext != WoWContext.Battlegrounds && !StyxWoW.Me.CurrentMap.IsRaid)) { AttachCombatLogEvent(); } else { DetachCombatLogEvent(); } }
// set needtocheck flag anytime context changes static void PetManager_OnWoWContextChanged(object sender, WoWContextEventArg e) { NeedToCheckPetTauntAutoCast = SingularSettings.Instance.PetAutoControlTaunt; PetSpellsAvailableAfterNeedToCheck = false; }
// Disable pet growl in instances but enable it outside. static void SingularRoutine_OnWoWContextChanged(object sender, WoWContextEventArg e) { Lua.DoString(e.CurrentContext == WoWContext.Instances ? "DisableSpellAutocast(GetSpellInfo(2649))" : "EnableSpellAutocast(GetSpellInfo(2649))"); }
internal static void HandleContextChanged(object sender, WoWContextEventArg e) { if (e.CurrentContext != WoWContext.Battlegrounds) BattlegroundStart = DateTime.Now; else BattlegroundStart = DateTime.Now + TimeSpan.FromSeconds(120); // just add enough for now... accurate time set by event handler if (e.PreviousContext == WoWContext.Battlegrounds) { StopMoving.AsSoonAsPossible(when => Styx.StyxWoW.IsInGame ); } }
// set needtocheck flag anytime context changes static void PetManager_OnWoWContextChanged(object sender, WoWContextEventArg e) { NeedToCheckPetTauntAutoCast = true; }