Exemplo n.º 1
0
 public override void Initialize(IDiabloInterface di)
 {
     this.di = di;
     SetConfig(di.configService.CurrentConfig.PluginConf(Name));
     di.game.ProcessFound += Game_ProcessFound;
     di.game.DataRead     += Game_DataRead;
 }
Exemplo n.º 2
0
        public override void Initialize(IDiabloInterface di)
        {
            Logger.Info("Creating auto split service.");

            SetConfig(di.configService.CurrentConfig.PluginConf(Name));
            di.game.DataRead += Game_DataRead;
        }
Exemplo n.º 3
0
 public static RequestBody FromProcessFoundEventArgs(ProcessFoundEventArgs e, IDiabloInterface di)
 {
     return(new RequestBody()
     {
         Event = "ProcessFound",
         D2ProcessInfo = e.ProcessInfo,
         DIApplicationInfo = di.appInfo,
     });
 }
Exemplo n.º 4
0
        public MainWindow(IDiabloInterface di)
        {
            this.di = di;

            Logger.Info("Creating main window.");

            RegisterServiceEventHandlers();
            InitializeComponent();
            PopulateConfigFileListContextMenu(this.di.configService.ConfigFileCollection);
            ApplyConfig(this.di.configService.CurrentConfig);
        }
Exemplo n.º 5
0
        public VerticalLayout(IDiabloInterface di)
        {
            this.di = di;
            RegisterServiceEventHandlers();
            InitializeComponent();

            Load += (sender, e) => UpdateConfig(di.configService.CurrentConfig);

            // Clean up events when disposed because services outlive us.
            Disposed += (sender, e) => UnregisterServiceEventHandlers();
            Logger.Info("Creating vertical layout.");
        }
Exemplo n.º 6
0
        public DebugWindow(IDiabloInterface di)
        {
            Logger.Info("Creating debug window.");

            this.di = di;

            RegisterServiceEventHandlers();

            // Unregister event handlers when we are done.
            Disposed += (sender, args) =>
            {
                Logger.Info("Disposing debug window.");
                UnregisterServiceEventHandlers();
            };

            InitializeComponent();
        }
Exemplo n.º 7
0
 public static RequestBody FromDataReadEventArgs(DataReadEventArgs e, IDiabloInterface di)
 {
     return(new RequestBody()
     {
         Area = e.Game.Area,
         InventoryTab = e.Game.InventoryTab,
         Difficulty = e.Game.Difficulty,
         PlayersX = e.Game.PlayersX,
         Seed = e.Game.Seed,
         SeedIsArg = e.Game.SeedIsArg,
         GameCount = e.Game.GameCount,
         CharCount = e.Game.CharCount,
         Name = e.Character.Name,
         Guid = e.Character.Guid,
         CharClass = e.Character.CharClass,
         IsHardcore = e.Character.IsHardcore,
         IsExpansion = e.Character.IsExpansion,
         IsDead = e.Character.IsDead,
         Deaths = e.Character.Deaths,
         Level = e.Character.Level,
         Experience = e.Character.Experience,
         Strength = e.Character.Strength,
         Dexterity = e.Character.Dexterity,
         Vitality = e.Character.Vitality,
         Energy = e.Character.Energy,
         Life = e.Character.Life,
         LifeMax = e.Character.LifeMax,
         Mana = e.Character.Mana,
         ManaMax = e.Character.ManaMax,
         FireResist = e.Character.FireResist,
         ColdResist = e.Character.ColdResist,
         LightningResist = e.Character.LightningResist,
         PoisonResist = e.Character.PoisonResist,
         Gold = e.Character.Gold,
         GoldStash = e.Character.GoldStash,
         FasterCastRate = e.Character.FasterCastRate,
         FasterHitRecovery = e.Character.FasterHitRecovery,
         FasterRunWalk = e.Character.FasterRunWalk,
         IncreasedAttackSpeed = e.Character.IncreasedAttackSpeed,
         MagicFind = e.Character.MagicFind,
         Items = e.Character.Items,
         Quests = e.Quests.CompletedQuestIds,
         Hireling = new HirelingDiff
         {
             Name = e.Game.Hireling?.Name,
             Class = e.Game.Hireling?.Class,
             SkillIds = e.Game.Hireling?.SkillIds,
             Level = e.Game.Hireling?.Level,
             Experience = e.Game.Hireling?.Experience,
             Strength = e.Game.Hireling?.Strength,
             Dexterity = e.Game.Hireling?.Dexterity,
             FireResist = e.Game.Hireling?.FireResist,
             ColdResist = e.Game.Hireling?.ColdResist,
             LightningResist = e.Game.Hireling?.LightningResist,
             PoisonResist = e.Game.Hireling?.PoisonResist,
             Items = e.Game.Hireling?.Items
         },
         KilledMonsters = e.KilledMonsters,
         D2ProcessInfo = e.ProcessInfo,
         DIApplicationInfo = di.appInfo,
     });
 }
Exemplo n.º 8
0
 public PluginService(IDiabloInterface di, string pluginDir)
 {
     this.di = di;
     plugins = PluginsByTypes(ReadTypesInDir(pluginDir));
 }
Exemplo n.º 9
0
 public PluginService(IDiabloInterface di, List <Type> pluginTypes)
 {
     this.di = di;
     plugins = PluginsByTypes(pluginTypes);
 }
Exemplo n.º 10
0
 public abstract void Initialize(IDiabloInterface di);
Exemplo n.º 11
0
 public override void Initialize(IDiabloInterface di)
 {
     SetConfig(di.configService.CurrentConfig.PluginConf(Name));
     AutomaticallyCheckVersion();
 }
Exemplo n.º 12
0
 public GameService(IDiabloInterface di)
 {
     this.di = di;
 }
Exemplo n.º 13
0
 public override void Initialize(IDiabloInterface di)
 {
     this.di = di;
     SetConfig(di.configService.CurrentConfig.PluginConf(Name));
 }
Exemplo n.º 14
0
 public override void Initialize(IDiabloInterface di)
 {
     SetConfig(di.configService.CurrentConfig.PluginConf(Name));
     di.game.DataRead += Game_DataRead;
 }