diff --git a/Artemis/Artemis/App.config b/Artemis/Artemis/App.config
index 154bc2f17..1dceb70cb 100644
--- a/Artemis/Artemis/App.config
+++ b/Artemis/Artemis/App.config
@@ -4,6 +4,8 @@
+
+
@@ -25,10 +27,24 @@
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+
+
+
+ {"Game":"RocketLeague","GameVersion":"1.10","GameAddresses":[{"Description":"Boost","BasePointer":{"value":21998084},"Offsets":[88,1452,1780,540]}]}
+
+
+ {"Game":"Witcher3","GameVersion":"1.11","GameAddresses":[{"Description":"Sign","BasePointer":{"value":42942304},"Offsets":[40,16,32,3008]}]}
+
+
+
+
+ True
+
+
4
@@ -74,6 +90,9 @@
True
+
+ True
+
@@ -175,6 +194,9 @@
Logitech G910 Orion Spark RGB
+
+ True
+
diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj
index fd981c2bd..8126e7061 100644
--- a/Artemis/Artemis/Artemis.csproj
+++ b/Artemis/Artemis/Artemis.csproj
@@ -84,7 +84,11 @@
..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll
True
-
+
+ False
+
+
+ False
E:\Downloads\Chome Downloads\MyMemory-x64.dll
@@ -168,6 +172,7 @@
+
AudioVisualization.settings
True
@@ -196,6 +201,11 @@
True
+
+ True
+ True
+ Witcher3.settings
+
@@ -218,6 +228,11 @@
True
General.settings
+
+ True
+ True
+ Offsets.settings
+
@@ -310,12 +325,20 @@
SettingsSingleFileGenerator
RocketLeague.Designer.cs
+
+ SettingsSingleFileGenerator
+ Witcher3.Designer.cs
+
SettingsSingleFileGenerator
VolumeDisplay.Designer.cs
+
+ SettingsSingleFileGenerator
+ Offsets.Designer.cs
+
SettingsSingleFileGenerator
diff --git a/Artemis/Artemis/Models/GamePointersCollectionModel.cs b/Artemis/Artemis/Models/GamePointersCollectionModel.cs
new file mode 100644
index 000000000..6a5d4ace4
--- /dev/null
+++ b/Artemis/Artemis/Models/GamePointersCollectionModel.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Artemis.Models
+{
+ public class GamePointersCollectionModel
+ {
+ public string Game { get; set; }
+ public string GameVersion { get; set; }
+ public List GameAddresses { get; set; }
+ }
+
+ public class GamePointer
+ {
+ public string Description { get; set; }
+ public IntPtr BasePointer { get; set; }
+ public int[] Offsets { get; set; }
+ public override string ToString()
+ {
+ return Offsets.Aggregate(BasePointer.ToString("X"), (current, offset) => current + $"+{offset.ToString("X")}");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Artemis/Artemis/Models/MainModel.cs b/Artemis/Artemis/Models/MainModel.cs
index 3f10dc754..614b73feb 100644
--- a/Artemis/Artemis/Models/MainModel.cs
+++ b/Artemis/Artemis/Models/MainModel.cs
@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Threading;
+using System.Threading.Tasks;
using Artemis.Events;
using Artemis.KeyboardProviders;
using Artemis.Settings;
@@ -34,8 +35,8 @@ namespace Artemis.Models
}
public EffectModel ActiveEffect { get; set; }
- public List EffectModels { get; set; }
public KeyboardProvider ActiveKeyboard { get; set; }
+ public List EffectModels { get; set; }
public List KeyboardProviders { get; set; }
public GameStateWebServer GameStateWebServer { get; set; }
@@ -104,6 +105,11 @@ namespace Artemis.Models
if (effectModel is OverlayModel)
throw new ArgumentException("Can't set an Overlay effect as the active effect");
+ // Game models are only used if they are enabled
+ var gameModel = effectModel as GameModel;
+ if (gameModel != null)
+ if (!gameModel.Enabled)
+ return;
if (ActiveEffect != null && effectModel.Name == ActiveEffect.Name)
return;
diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs
index bc7c0a518..71d9a1953 100644
--- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs
+++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.Designer.cs
@@ -23,6 +23,18 @@ namespace Artemis.Modules.Games.CounterStrike {
}
}
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool Enabled {
+ get {
+ return ((bool)(this["Enabled"]));
+ }
+ set {
+ this["Enabled"] = value;
+ }
+ }
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings
index 75e9907fb..d45c34188 100644
--- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings
+++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrike.settings
@@ -1,7 +1,12 @@
-
+
+
+
+ True
+
diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml
index d6d9746c0..57ea3b8a9 100644
--- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml
+++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeView.xaml
@@ -54,13 +54,13 @@
+ Margin="5,3,0,0" Width="180" />
+ FontFamily="Segoe UI Semibold" Foreground="#535353" Width="180" />
@@ -68,7 +68,7 @@
Grid.Column="1"
HorizontalAlignment="Left">
+ FontFamily="Segoe UI Semibold" Foreground="#535353" Width="180" />
@@ -78,7 +78,7 @@
+ Margin="5,3,0,0" Width="180" />
+ Margin="5,3,0,0" Width="180" />
+ Margin="5,3,0,0" Width="180" />
+ Margin="5,3,0,0" Width="180" />
diff --git a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs
index 16c874bbc..0649b23b5 100644
--- a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs
+++ b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs
@@ -1,118 +1,118 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Artemis.Models;
+using Artemis.Settings;
using Artemis.Utilities;
using Artemis.Utilities.Keyboard;
using Artemis.Utilities.Memory;
+using MyMemory;
+using Newtonsoft.Json;
namespace Artemis.Modules.Games.RocketLeague
{
public class RocketLeagueModel : GameModel
{
+ private readonly KeyboardRectangle _boostRect;
+
+ private int _boostAmount;
+ private bool _boostGrowing;
+ private int _previousBoost;
+
+ private Memory _memory;
+ private GamePointersCollectionModel _pointer;
+
public RocketLeagueModel(RocketLeagueSettings settings)
{
Name = "RocketLeague";
ProcessName = "RocketLeague";
Scale = 4;
- Settings = settings;
- BoostRectangle = new KeyboardRectangle(Scale, 0, 0, Scale*21, Scale*8,
+ _boostRect = new KeyboardRectangle(Scale, 0, 0, Scale*21, Scale*8,
new List
{
- ColorHelpers.MediaColorToDrawingColor(Settings.MainColor),
- ColorHelpers.MediaColorToDrawingColor(Settings.SecondaryColor)
+ ColorHelpers.MediaColorToDrawingColor(settings.MainColor),
+ ColorHelpers.MediaColorToDrawingColor(settings.SecondaryColor)
}, LinearGradientMode.Horizontal);
- Enabled = Settings.Enabled;
+ Enabled = settings.Enabled;
}
public int Scale { get; set; }
- public RocketLeagueSettings Settings { get; set; }
-
- private int BoostAmount { get; set; }
- private KeyboardRectangle BoostRectangle { get; }
-
- private Process Process { get; set; }
-
- private int PreviousBoost { get; set; }
-
-
- private bool BoostGrowing { get; set; }
-
- private Memory Memory { get; set; }
-
public override void Dispose()
{
- Process = null;
- Memory = null;
+ _memory = null;
}
public override void Enable()
{
- Process = MemoryHelpers.GetProcessIfRunning(ProcessName);
- Memory = new Memory(Process);
+ MemoryHelpers.GetPointers();
+ _pointer = JsonConvert
+ .DeserializeObject(Offsets.Default.RocketLeague);
+
+ var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
+ _memory = new Memory(tempProcess);
}
public override void Update()
{
- if (BoostGrowing)
+ if (_boostGrowing)
return;
- if (Memory == null)
+ if (_memory == null)
return;
- // TODO: Get address from web on startup
- var boostAddress = Memory.GetAddress("\"RocketLeague.exe\"+014FAA04+58+5ac+6f4+21c");
- var boostFloat = Memory.ReadFloat(boostAddress)*100/3;
+ var offsets = _pointer.GameAddresses.First(ga => ga.Description == "Boost").ToString();
+ var boostAddress = _memory.GetAddress("\"RocketLeague.exe\"" + offsets);
+ var boostFloat = _memory.ReadFloat(boostAddress)*100/3;
- PreviousBoost = BoostAmount;
- BoostAmount = (int) Math.Ceiling(boostFloat);
+ _previousBoost = _boostAmount;
+ _boostAmount = (int) Math.Ceiling(boostFloat);
// Take care of any reading errors resulting in an OutOfMemory on draw
- if (BoostAmount < 0)
- BoostAmount = 0;
- if (BoostAmount > 100)
- BoostAmount = 100;
+ if (_boostAmount < 0)
+ _boostAmount = 0;
+ if (_boostAmount > 100)
+ _boostAmount = 100;
- BoostRectangle.Width = (int) Math.Ceiling(((Scale*21)/100.00)*BoostAmount);
+ _boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
Task.Run(() => GrowIfHigher());
}
private void GrowIfHigher()
{
- if (BoostAmount <= PreviousBoost || BoostGrowing)
+ if (_boostAmount <= _previousBoost || _boostGrowing)
return;
- BoostGrowing = true;
+ _boostGrowing = true;
const int amountOfSteps = 6;
- var difference = BoostAmount - PreviousBoost;
+ var difference = _boostAmount - _previousBoost;
var differenceStep = difference/amountOfSteps;
var differenceStepRest = difference%amountOfSteps;
- BoostAmount = PreviousBoost;
- BoostRectangle.Width = (int) Math.Ceiling(((Scale*21)/100.00)*BoostAmount);
+ _boostAmount = _previousBoost;
+ _boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
for (var i = 0; i < amountOfSteps; i++)
{
if (differenceStepRest > 0)
{
differenceStepRest -= 1;
- BoostAmount += 1;
- BoostRectangle.Width = (int) Math.Ceiling(((Scale*21)/100.00)*BoostAmount);
+ _boostAmount += 1;
+ _boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
}
- BoostAmount += differenceStep;
- BoostRectangle.Width = (int) Math.Ceiling(((Scale*21)/100.00)*BoostAmount);
+ _boostAmount += differenceStep;
+ _boostRect.Width = (int) Math.Ceiling(((Scale*21)/100.00)*_boostAmount);
Thread.Sleep(50);
}
- BoostGrowing = false;
+ _boostGrowing = false;
}
public override Bitmap GenerateBitmap()
@@ -122,7 +122,7 @@ namespace Artemis.Modules.Games.RocketLeague
using (var g = Graphics.FromImage(bitmap))
{
g.Clear(Color.Transparent);
- BoostRectangle.Draw(g);
+ _boostRect.Draw(g);
}
return bitmap;
}
diff --git a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.Designer.cs b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.Designer.cs
new file mode 100644
index 000000000..05b6e6662
--- /dev/null
+++ b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.Designer.cs
@@ -0,0 +1,38 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Artemis.Modules.Games.Witcher3 {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+ internal sealed partial class Witcher3 : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Witcher3 defaultInstance = ((Witcher3)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Witcher3())));
+
+ public static Witcher3 Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool Enabled {
+ get {
+ return ((bool)(this["Enabled"]));
+ }
+ set {
+ this["Enabled"] = value;
+ }
+ }
+ }
+}
diff --git a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.settings b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.settings
new file mode 100644
index 000000000..fd062ce0f
--- /dev/null
+++ b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3.settings
@@ -0,0 +1,9 @@
+
+
+
+
+
+ True
+
+
+
\ No newline at end of file
diff --git a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3Model.cs b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3Model.cs
index 7c6a16161..b826735b5 100644
--- a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3Model.cs
+++ b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3Model.cs
@@ -2,74 +2,75 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.Linq;
using Artemis.Models;
using Artemis.Modules.Games.RocketLeague;
+using Artemis.Settings;
using Artemis.Utilities.Keyboard;
using Artemis.Utilities.Memory;
using MyMemory;
+using Newtonsoft.Json;
namespace Artemis.Modules.Games.Witcher3
{
public class Witcher3Model : GameModel
{
- // TODO: Update for 1.12
+ private readonly KeyboardRectangle _signRect;
+
+ private IntPtr _baseAddress;
+ private GamePointersCollectionModel _pointer;
+ private RemoteProcess _process;
+
public Witcher3Model(RocketLeagueSettings settings)
{
Name = "Witcher3";
ProcessName = "witcher3";
Scale = 4;
- Settings = settings;
- SignRect = new KeyboardRectangle(Scale, 0, 0, 84, 24, new List(), LinearGradientMode.Horizontal)
+ _signRect = new KeyboardRectangle(Scale, 0, 0, 84, 24, new List(), LinearGradientMode.Horizontal)
{
Rotate = true,
LoopSpeed = 0.5
};
- Enabled = Settings.Enabled;
+ Enabled = settings.Enabled;
}
public int Scale { get; set; }
- public RocketLeagueSettings Settings { get; set; }
-
- public KeyboardRectangle SignRect { get; set; }
-
- private RemoteProcess Process { get; set; }
- private Memory Memory { get; set; }
-
- public IntPtr BaseAddress { get; set; }
public override void Dispose()
{
- Process = null;
- Memory = null;
+ _process = null;
}
public override void Enable()
{
+ MemoryHelpers.GetPointers();
+ _pointer = JsonConvert
+ .DeserializeObject(Offsets.Default.Witcher3);
+
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
- BaseAddress = tempProcess.MainModule.BaseAddress;
- Process = new RemoteProcess((uint) tempProcess.Id);
+ _baseAddress = tempProcess.MainModule.BaseAddress;
+ _process = new RemoteProcess((uint) tempProcess.Id);
}
public override void Update()
{
- if (Process == null)
+ if (_process == null)
return;
- // TODO: Get address from web on startup
- var processHandle = Process.ProcessHandle;
- var baseAddress = (IntPtr) 0x028F3F60;
- int[] offsets = {0x28, 0x10, 0x20, 0xbc0};
+ var processHandle = _process.ProcessHandle;
+ var addr = MemoryHelpers.FindAddress(processHandle, _baseAddress,
+ _pointer.GameAddresses.First(ga => ga.Description == "Sign").BasePointer,
+ _pointer.GameAddresses.First(ga => ga.Description == "Sign").Offsets);
- var addr = MemoryHelpers.FindAddress(processHandle, BaseAddress, baseAddress, offsets);
- var result = Process.MemoryManager.Read(addr);
+ var result = _process.MemoryManager.Read(addr);
switch (result)
{
case 0:
// Aard
- SignRect.Colors = new List
+ _signRect.Colors = new List
{
Color.DeepSkyBlue,
Color.Blue,
@@ -79,7 +80,7 @@ namespace Artemis.Modules.Games.Witcher3
break;
case 1:
// Yrden
- SignRect.Colors = new List
+ _signRect.Colors = new List
{
Color.Purple,
Color.DeepPink,
@@ -89,7 +90,7 @@ namespace Artemis.Modules.Games.Witcher3
break;
case 2:
// Igni
- SignRect.Colors = new List
+ _signRect.Colors = new List
{
Color.DarkOrange,
Color.Red,
@@ -99,7 +100,7 @@ namespace Artemis.Modules.Games.Witcher3
break;
case 3:
// Quen
- SignRect.Colors = new List
+ _signRect.Colors = new List
{
Color.DarkOrange,
Color.Yellow,
@@ -109,7 +110,7 @@ namespace Artemis.Modules.Games.Witcher3
break;
case 4:
// Axii
- SignRect.Colors = new List
+ _signRect.Colors = new List
{
Color.LawnGreen,
Color.DarkGreen,
@@ -126,7 +127,7 @@ namespace Artemis.Modules.Games.Witcher3
using (var g = Graphics.FromImage(bitmap))
{
g.Clear(Color.Transparent);
- SignRect.Draw(g);
+ _signRect.Draw(g);
}
return bitmap;
}
diff --git a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3View.xaml b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3View.xaml
index 2bcd50156..5c2bb24d2 100644
--- a/Artemis/Artemis/Modules/Games/Witcher3/Witcher3View.xaml
+++ b/Artemis/Artemis/Modules/Games/Witcher3/Witcher3View.xaml
@@ -5,7 +5,39 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Artemis/Artemis/Settings/General.Designer.cs b/Artemis/Artemis/Settings/General.Designer.cs
index 167471ec7..e588bb13d 100644
--- a/Artemis/Artemis/Settings/General.Designer.cs
+++ b/Artemis/Artemis/Settings/General.Designer.cs
@@ -46,5 +46,17 @@ namespace Artemis.Settings {
this["LastKeyboard"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool EnablePointersUpdate {
+ get {
+ return ((bool)(this["EnablePointersUpdate"]));
+ }
+ set {
+ this["EnablePointersUpdate"] = value;
+ }
+ }
}
}
diff --git a/Artemis/Artemis/Settings/General.settings b/Artemis/Artemis/Settings/General.settings
index ce84d6f67..7b0750280 100644
--- a/Artemis/Artemis/Settings/General.settings
+++ b/Artemis/Artemis/Settings/General.settings
@@ -1,7 +1,5 @@
-
-
+
@@ -10,5 +8,8 @@
Logitech G910 Orion Spark RGB
+
+ True
+
\ No newline at end of file
diff --git a/Artemis/Artemis/Settings/Offsets.Designer.cs b/Artemis/Artemis/Settings/Offsets.Designer.cs
new file mode 100644
index 000000000..0577c0586
--- /dev/null
+++ b/Artemis/Artemis/Settings/Offsets.Designer.cs
@@ -0,0 +1,52 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Artemis.Settings {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+ internal sealed partial class Offsets : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Offsets defaultInstance = ((Offsets)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Offsets())));
+
+ public static Offsets Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("{\"Game\":\"RocketLeague\",\"GameVersion\":\"1.10\",\"GameAddresses\":[{\"Description\":\"Boos" +
+ "t\",\"BasePointer\":{\"value\":21998084},\"Offsets\":[88,1452,1780,540]}]}")]
+ public string RocketLeague {
+ get {
+ return ((string)(this["RocketLeague"]));
+ }
+ set {
+ this["RocketLeague"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("{\"Game\":\"Witcher3\",\"GameVersion\":\"1.11\",\"GameAddresses\":[{\"Description\":\"Sign\",\"B" +
+ "asePointer\":{\"value\":42942304},\"Offsets\":[40,16,32,3008]}]}")]
+ public string Witcher3 {
+ get {
+ return ((string)(this["Witcher3"]));
+ }
+ set {
+ this["Witcher3"] = value;
+ }
+ }
+ }
+}
diff --git a/Artemis/Artemis/Settings/Offsets.settings b/Artemis/Artemis/Settings/Offsets.settings
new file mode 100644
index 000000000..077f8c24b
--- /dev/null
+++ b/Artemis/Artemis/Settings/Offsets.settings
@@ -0,0 +1,12 @@
+
+
+
+
+
+ {"Game":"RocketLeague","GameVersion":"1.10","GameAddresses":[{"Description":"Boost","BasePointer":{"value":21998084},"Offsets":[88,1452,1780,540]}]}
+
+
+ {"Game":"Witcher3","GameVersion":"1.11","GameAddresses":[{"Description":"Sign","BasePointer":{"value":42942304},"Offsets":[40,16,32,3008]}]}
+
+
+
\ No newline at end of file
diff --git a/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs b/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs
index 651cd36d8..f51392380 100644
--- a/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs
+++ b/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs
@@ -1,6 +1,12 @@
using System;
+using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
+using System.Net;
using System.Runtime.InteropServices;
+using Artemis.Models;
+using Artemis.Settings;
+using Newtonsoft.Json;
namespace Artemis.Utilities.Memory
{
@@ -37,5 +43,40 @@ namespace Artemis.Utilities.Memory
}
return address;
}
+
+ public static void GetPointers()
+ {
+ if (!General.Default.EnablePointersUpdate)
+ return;
+
+ try
+ {
+ var jsonClient = new WebClient();
+ var json = jsonClient
+ .DownloadString("https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json");
+
+ // Get a list of pointers
+ var pointers = JsonConvert.DeserializeObject>(json);
+
+ // Assign each pointer to the settings file
+ var rlPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "RocketLeague"));
+ if (rlPointers != null)
+ {
+ Offsets.Default.RocketLeague = rlPointers;
+ Offsets.Default.Save();
+ }
+
+ var witcherPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "Witcher3"));
+ if (witcherPointers != null)
+ {
+ Offsets.Default.Witcher3 = witcherPointers;
+ Offsets.Default.Save();
+ }
+ }
+ catch (Exception)
+ {
+ // ignored
+ }
+ }
}
}
\ No newline at end of file