コード例 #1
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            _pluginInterface = pluginInterface;
            _commandManager  = new Managers.CommandManager(pluginInterface);
            _configuration   = pluginInterface.GetPluginConfig() as GatherBuddyConfiguration ?? new GatherBuddyConfiguration();
            Gatherer         = new Gatherer(pluginInterface, _configuration, _commandManager);
            Alarms           = Gatherer.Alarms;
            _gatherInterface = new Interface(this, pluginInterface, _configuration);
            _fishingTimer    = new FishingTimer(_pluginInterface, _configuration, Gatherer !.FishManager);

            var tmp = _pluginInterface.TargetModuleScanner.GetStaticAddressFromSig("0F 84 AD 01 00 00 49 89 5B 08 4C 8D 15");

            PluginLog.Information($"Doop : {tmp.ToInt64():X16} {tmp.ToInt64() - _pluginInterface.TargetModuleScanner.Module.BaseAddress.ToInt64():X16}");

            var count = _pluginInterface.Data.Excel.GetSheet <Lumina.Excel.GeneratedSheets.FishParameter>().Count(f => f.IsInLog);

            PluginLog.Information($"Derp : {tmp.ToInt64() + count / 8:X16} {tmp.ToInt64() - _pluginInterface.TargetModuleScanner.Module.BaseAddress.ToInt64() + count / 8:X16}");

            if (!Gatherer !.FishManager.GetSaveFileName(_pluginInterface).Exists)
            {
                Gatherer !.FishManager.SaveFishRecords(_pluginInterface);
            }