Пример #1
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            this.pluginInterface = pluginInterface;

            this.pluginInterface.CommandManager.AddHandler("/ptitle", new CommandInfo(OnCommandDebugMouseover)
            {
                HelpMessage = "Open a window to set the title screen version.",
                ShowInHelp  = true
            });

            Configuration = pluginInterface.GetPluginConfig() as TitleEditConfiguration ?? new TitleEditConfiguration();

            titleEdit = new TitleEdit(pluginInterface.TargetModuleScanner, pluginInterface.ClientState, Configuration);

            titleEdit.Enable();
            SetNewConfig();

            this.pluginInterface.UiBuilder.OnBuildUi += UiBuilder_OnBuildUi;
        }
Пример #2
0
        public TitleEdit(SigScanner scanner, ClientState clientState, TitleEditConfiguration configuration)
        {
            TitleScreenNames = new List <IntPtr>();
            LastCall         = 200;

            Address = new TitleEditAddressResolver();
            Address.Setup(scanner);

            HighestExpac    = scanner.GetStaticAddressFromSig("74 0B 8B 05 ?? ?? ?? ??", 0);
            HasExpacBeenSet = scanner.GetStaticAddressFromSig("E8 ?? ?? ?? ?? 83 F8 03 77 15", 0x4);

            Log.Verbose("===== T I T L E E D I T =====");
            Log.Verbose("GetTitleMapString address {0}", Address.GetLobbyMapString);

            GetTitleMapStringHook = new Hook <OnGetTitleMapString>(Address.GetLobbyMapString, new OnGetTitleMapString(HandleGetTitleMapString), this);

            TitleScreenNames.Add(AllocateString(arrlobbybuf));
            TitleScreenNames.Add(AllocateString(hwlobbybuf));
            TitleScreenNames.Add(AllocateString(sblobbybuf));
            TitleScreenNames.Add(AllocateString(shblobbybuf));
        }