internal static void Start(bool needReset = false) { if (needReset) { InitKeyStates(); } _HotkeysRegistered = true; // Hook the hotkeys for the appropriate WOW Window... HotkeysManager.Initialize(StyxWoW.Memory.Process.MainWindowHandle); if (HotkeySettings.LogMarkKey != Keys.None) { RegisterHotkeyAssignment("LogMark", HotkeySettings.LogMarkKey, (hk) => { Logger.LogMark(); TellUser("LogMark #{0} Added", Logger.LogMarkIndex); }); } // define hotkeys for behaviors when using them as toggles (press once to disable, press again to enable) // .. otherwise, keys are polled for in Pulse() if (HotkeySettings.KeysToggleBehavior) { // register hotkey for commands with 1:1 key assignment if (HotkeySettings.AoeToggle != Keys.None) { RegisterHotkeyAssignment("AOE", HotkeySettings.AoeToggle, (hk) => { AoeToggle(); }); } if (HotkeySettings.CombatToggle != Keys.None) { RegisterHotkeyAssignment("Combat", HotkeySettings.CombatToggle, (hk) => { CombatToggle(); }); } // register hotkey for commands with 1:1 key assignment if (HotkeySettings.PullMoreToggle != Keys.None) { RegisterHotkeyAssignment("PullMore", HotkeySettings.PullMoreToggle, (hk) => { PullMoreToggle(); }); } // note: important to not check MovementManager if movement disabled here, since MovementManager calls us // .. and the potential for side-effects exists. check SingularSettings directly for this only if (!SingularSettings.Instance.DisableAllMovement && HotkeySettings.MovementToggle != Keys.None) { RegisterHotkeyAssignment("Movement", HotkeySettings.MovementToggle, (hk) => { MovementToggle(); }); } } }
public override void Initialize() { LatestVersion = Helpers.Version.CheckVersion(); Helpers.Logger.PrintLog("You are using Version {0} of GGWP", Helpers.Version.CurrentLocalVersion.ToString()); if (!LatestVersion) { Helpers.Logger.PrintLog(Colors.Red, "There is a new Version of Wrathful Paladin available, go to https://github.com/oruna/paladin-cr/ and download the latest Version"); } HotkeysManager.Initialize(StyxWoW.Memory.Process.MainWindowHandle); PaladinSettings.Instance.Load(); Lua.Events.AttachEvent("PLAYER_REGEN_DISABLED", OnCombatStarted); Lua.Events.AttachEvent("UPDATE_BATTLEFIELD_STATUS", BGArena); Hotkeys.RegisterHotkeys(); Talents.Init(); }