Exemplo n.º 1
0
        private void PipeServerOnPipeMessage(string msg)
        {
            // Ensure it's Light FX JSON
            if (!msg.Contains("lightFxState"))
            {
                return;
            }

            // Deserialize and data
            try
            {
                JsonConvert.PopulateObject(msg, DataModel);
            }
            catch (Exception ex)
            {
                Logger?.Error(ex, "Failed to deserialize LightFX JSON");
                throw;
            }

            // Setup process name
            var processName = Path.GetFileNameWithoutExtension(((LightFxDataModel)DataModel).LightFxState.game);

            if (!ProcessNames.Contains(processName))
            {
                ProcessNames.Add(processName);
            }
        }
Exemplo n.º 2
0
 public void AddProcessName(string name)
 {
     if (!ProcessNames.Contains(name))
     {
         ProcessNames.Add(name);
     }
 }
Exemplo n.º 3
0
        public GtaVModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer) : base(deviceManager, luaManager)
        {
            _pipeServer = pipeServer;

            Settings  = SettingsProvider.Load <GtaVSettings>();
            DataModel = new GtaVDataModel();
            ProcessNames.Add("GTA5");
        }
Exemplo n.º 4
0
        public TheDivisionModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer)
            : base(deviceManager, luaManager)
        {
            _pipeServer = pipeServer;

            Settings  = SettingsProvider.Load <TheDivisionSettings>();
            DataModel = new TheDivisionDataModel();
            ProcessNames.Add("TheDivision");
        }
Exemplo n.º 5
0
        public Witcher3Model(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
        {
            _updateSw    = new Stopwatch();
            _configRegex = new Regex("\\[Artemis\\](.+?)\\[", RegexOptions.Singleline);

            Settings  = SettingsProvider.Load <Witcher3Settings>();
            DataModel = new Witcher3DataModel();
            ProcessNames.Add("witcher3");
        }
Exemplo n.º 6
0
        public LightFxModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer)
            : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <LightFxSettings>();
            DataModel = new LightFxDataModel();
            ProcessNames.Add("LoL");

            // This model can enable itself by changing its process name to the currently running Light FX game.
            pipeServer.PipeMessage += PipeServerOnPipeMessage;
        }
Exemplo n.º 7
0
        public Dota2Model(DeviceManager deviceManager, LuaManager luaManager, MetroDialogService dialogService,
                          GameStateWebServer gameStateWebServer) : base(deviceManager, luaManager)
        {
            _gameStateWebServer = gameStateWebServer;
            _dialogService      = dialogService;

            Settings  = SettingsProvider.Load <Dota2Settings>();
            DataModel = new Dota2DataModel();
            ProcessNames.Add("dota2");

            FindGameDir();
            PlaceConfigFile();
        }
Exemplo n.º 8
0
        public CounterStrikeModel(DeviceManager deviceManager, LuaManager luaManager, MetroDialogService dialogService,
                                  GameStateWebServer gameStateWebServer) : base(deviceManager, luaManager)
        {
            _gameStateWebServer = gameStateWebServer;
            _dialogService      = dialogService;

            Settings  = SettingsProvider.Load <CounterStrikeSettings>();
            DataModel = new CounterStrikeDataModel();
            ProcessNames.Add("csgo");

            FindGameDir();
            PlaceConfigFile();
        }
Exemplo n.º 9
0
        public EurotruckSimulator2Model(DeviceManager deviceManager, LuaManager luaManager,
                                        MetroDialogService dialogService) : base(deviceManager, luaManager)
        {
            _dialogService = dialogService;

            Settings  = SettingsProvider.Load <EurotruckSimulator2Settings>();
            DataModel = new EurotruckSimulator2DataModel();
            ProcessNames.Add("eurotrucks2");
            ProcessNames.Add("amtrucks");

            FindEts2GameDir();
            FindAtsGameDir();
        }
Exemplo n.º 10
0
        public OverwatchModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer,
                              MetroDialogService dialogService, DebugViewModel debugViewModel) : base(deviceManager, luaManager)
        {
            _pipeServer     = pipeServer;
            _dialogService  = dialogService;
            _debugViewModel = debugViewModel;

            Settings  = SettingsProvider.Load <OverwatchSettings>();
            DataModel = new OverwatchDataModel();
            ProcessNames.Add("Overwatch");

            LoadOverwatchCharacters();
            FindOverwatch();
        }
Exemplo n.º 11
0
        public UnrealTournamentModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer,
                                     MetroDialogService dialogService) : base(deviceManager, luaManager)
        {
            _pipeServer    = pipeServer;
            _dialogService = dialogService;

            Settings  = SettingsProvider.Load <UnrealTournamentSettings>();
            DataModel = new UnrealTournamentDataModel();
            ProcessNames.Add("UE4-Win64-Shipping");

            _killTimer          = new Timer(3500);
            _killTimer.Elapsed += KillTimerOnElapsed;

            FindGame();
        }
Exemplo n.º 12
0
        public WoWModel(DeviceManager deviceManager, LuaManager luaManager, WowPacketScanner packetScanner, MetroDialogService dialogService) : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <WoWSettings>();
            DataModel = new WoWDataModel();
            ProcessNames.Add("Wow-64");

            _packetScanner = packetScanner;
            _dialogService = dialogService;
            _packetScanner.RaiseDataReceived += (sender, args) => HandleGameData(args.Command, args.Data);

            FindWoW();

            // I simply cannot be sure wether this addon will bring people's accounts in trouble so
            // lets remove it whenever Artemis isn't running the WoW module.
            // (This also means the addon isnt left behind should the user uninstall Artemis.)
            RemoveAddon();
        }
Exemplo n.º 13
0
        public WoWModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <WoWSettings>();
            DataModel = new WoWDataModel();
            ProcessNames.Add("Wow-64");

            // Currently WoW is locked behind a hidden trigger (obviously not that hidden since you're reading this)
            // It is using memory reading and lets first try to contact Blizzard
            var settings = SettingsProvider.Load <GeneralSettings>();

            Settings.IsEnabled = settings.GamestatePort == 62575 && Settings.IsEnabled;

            _pointer = SettingsProvider.Load <OffsetSettings>().WorldOfWarcraft;
            //_pointer = new GamePointersCollection
            //{
            //    Game = "WorldOfWarcraft",
            //    GameVersion = "7.0.3.22810",
            //    GameAddresses = new List<GamePointer>
            //    {
            //        new GamePointer
            //        {
            //            Description = "ObjectManager",
            //            BasePointer = new IntPtr(0x1578070)
            //        },
            //        new GamePointer
            //        {
            //            Description = "LocalPlayer",
            //            BasePointer = new IntPtr(0x169DF10)
            //        },
            //        new GamePointer
            //        {
            //            Description = "NameCache",
            //            BasePointer = new IntPtr(0x151DCE8)
            //        },
            //        new GamePointer
            //        {
            //            Description = "TargetGuid",
            //            BasePointer = new IntPtr(0x179C940)
            //        }
            //    }
            //};
            //var res = JsonConvert.SerializeObject(_pointer, Formatting.Indented);
        }
Exemplo n.º 14
0
        public RocketLeagueModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <RocketLeagueSettings>();
            DataModel = new RocketLeagueDataModel();
            ProcessNames.Add("RocketLeague");

            // Generate a new offset when the game is updated
            //var offset = new GamePointersCollection
            //{
            //    Game = "RocketLeague",
            //    GameVersion = "1.27",
            //    GameAddresses = new List<GamePointer>
            //    {
            //        new GamePointer
            //        {
            //            Description = "Boost",
            //            BasePointer = new IntPtr(0x016D5084),
            //            Offsets = new[] {0xC4, 0x214, 0x320, 0x73C, 0x224}
            //        }
            //    }
            //};
            //var res = JsonConvert.SerializeObject(offset, Formatting.Indented);
        }
Exemplo n.º 15
0
        public TerrariaModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <TerrariaSettings>();
            DataModel = new TerrariaDataModel();
            ProcessNames.Add("Terraria");

            // Generate a new offset when the game is updated
            //_pointer = new GamePointersCollection
            //{
            //    Game = "Terraria",
            //    GameVersion = "1.3.4.4",
            //    GameAddresses = new List<GamePointer>
            //    {
            //        new GamePointer
            //        {
            //            Description = "PlayerBase",
            //            BasePointer = new IntPtr(0x0039C078),
            //            Offsets = new[] {0x280, 0x6C0, 0x674, 0x3C}
            //        }
            //    }
            //};
            //var res = JsonConvert.SerializeObject(_pointer, Formatting.Indented);
        }
Exemplo n.º 16
0
        public RocketLeagueModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
        {
            Settings  = SettingsProvider.Load <RocketLeagueSettings>();
            DataModel = new RocketLeagueDataModel();
            ProcessNames.Add("RocketLeague");

            // Generate a new offset when the game is updated
            var offset = new GamePointersCollection
            {
                Game          = "RocketLeague",
                GameVersion   = "1.30",
                GameAddresses = new List <GamePointer>
                {
                    new GamePointer
                    {
                        Description = "Boost",
                        BasePointer = new IntPtr(0x016E00B4),
                        Offsets     = new[] { 0xC4, 0x18, 0x388, 0x73C, 0x224 }
                    }
                }
            };
            var res = JsonConvert.SerializeObject(offset, Formatting.Indented);
        }
Exemplo n.º 17
0
 static PhoenixMiner()
 {
     ProcessNames.Add("PhoenixMiner");
 }
Exemplo n.º 18
0
 public FormulaOne2017Model(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
 {
     Settings  = SettingsProvider.Load <FormulaOne2017Settings>();
     DataModel = new FormulaOne2017DataModel();
     ProcessNames.Add("F1_2017");
 }
Exemplo n.º 19
0
 static Gminer()
 {
     ProcessNames.Add("miner");
 }
Exemplo n.º 20
0
 public ProjectCarsModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
 {
     Settings  = SettingsProvider.Load <ProjectCarsSettings>();
     DataModel = new ProjectCarsDataModel();
     ProcessNames.Add("pCARS64");
 }
Exemplo n.º 21
0
 public AssettoCorsaModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager)
 {
     Settings  = SettingsProvider.Load <AssettoCorsaSettings>();
     DataModel = new AssettoCorsaDataModel();
     ProcessNames.Add("AssettoCorsa");
 }
Exemplo n.º 22
0
 static Claymore()
 {
     ProcessNames.Add("EthDcrMiner64");
 }
Exemplo n.º 23
0
 static Bminer()
 {
     ProcessNames.Add("bminer");
 }