mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
RL stuff, this resolves #20
This commit is contained in:
parent
944d9ef0b7
commit
705d2043d8
@ -52,6 +52,21 @@ namespace Artemis.Modules.Games.RocketLeague
|
||||
MemoryHelpers.GetPointers();
|
||||
_pointer = JsonConvert.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague);
|
||||
|
||||
//var test =
|
||||
// JsonConvert.SerializeObject(new List<GamePointersCollectionModel>
|
||||
// {
|
||||
// new GamePointersCollectionModel
|
||||
// {
|
||||
// Game = "RocketLeague",
|
||||
// GameVersion = "1.12",
|
||||
// GameAddresses = new List<GamePointer> {new GamePointer
|
||||
// {
|
||||
// Description = "Boost",
|
||||
// BasePointer = new IntPtr(0x01581AF4),
|
||||
// Offsets = new []{0xB4, 0x104, 0x320, 0x708, 0x21C}
|
||||
// }}
|
||||
// }
|
||||
// });
|
||||
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
|
||||
_memory = new Memory(tempProcess);
|
||||
}
|
||||
@ -120,6 +135,8 @@ namespace Artemis.Modules.Games.RocketLeague
|
||||
public override Bitmap GenerateBitmap()
|
||||
{
|
||||
var bitmap = MainModel.ActiveKeyboard.KeyboardBitmap(Scale);
|
||||
if (_boostRect == null)
|
||||
return null;
|
||||
|
||||
using (var g = Graphics.FromImage(bitmap))
|
||||
{
|
||||
|
||||
@ -52,12 +52,12 @@ namespace Artemis.Utilities.Memory
|
||||
try
|
||||
{
|
||||
var jsonClient = new WebClient();
|
||||
var json = jsonClient
|
||||
.DownloadString("https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json");
|
||||
// Random number to get around cache issues
|
||||
var rand = new Random(DateTime.Now.Millisecond);
|
||||
var json = jsonClient.DownloadString("https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json?random=" + rand.Next());
|
||||
|
||||
// Get a list of pointers
|
||||
var pointers = JsonConvert.DeserializeObject<List<GamePointersCollectionModel>>(json);
|
||||
|
||||
// Assign each pointer to the settings file
|
||||
var rlPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "RocketLeague"));
|
||||
if (rlPointers != null)
|
||||
@ -65,13 +65,6 @@ namespace Artemis.Utilities.Memory
|
||||
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)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user