public MOAction(SigScanner scanner, ClientState clientState, MOActionConfiguration configuration) { Configuration = configuration; Address = new MOActionAddressResolver(); Address.Setup(scanner); byteBase = scanner.Module.BaseAddress; this.mouseoverLocation = byteBase + 0x1C2AA20; RequestActionAddress = byteBase + 0x6cbd40; UiMOEntityIdAddress = byteBase + 0x623100; Log.Verbose("===== M O A C T I O N ====="); Log.Verbose("RequestAction address {IsIconReplaceable}", Address.RequestAction); Log.Verbose("SetUiMouseoverEntityId address {SetUiMouseoverEntityId}", Address.SetUiMouseoverEntityId); requestActionHook = new Hook <OnRequestActionDetour>(Address.RequestAction, new OnRequestActionDetour(HandleRequestAction), this); uiMoEntityIdHook = new Hook <OnSetUiMouseoverEntityId>(Address.SetUiMouseoverEntityId, new OnSetUiMouseoverEntityId(HandleUiMoEntityId), this); }
public void Initialize(DalamudPluginInterface pluginInterface) { this.pluginInterface = pluginInterface; this.pluginInterface.CommandManager.AddHandler("/pmoaction", new CommandInfo(OnCommandDebugCombo) { HelpMessage = "Open a window to edit custom combo settings.", ShowInHelp = true }); Configuration = pluginInterface.GetPluginConfig() as MOActionConfiguration ?? new MOActionConfiguration(); moAction = new MOAction(pluginInterface.TargetModuleScanner, pluginInterface.ClientState, Configuration); SetNewConfig(); moAction.Enable(); this.pluginInterface.UiBuilder.OnBuildUi += UiBuilder_OnBuildUi; }