mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed default profiles missing on first run
Seperated G810 from G910
This commit is contained in:
parent
54ff3a05ef
commit
50decfc6e0
@ -106,6 +106,8 @@ namespace Artemis.DAL
|
||||
private static void ReadProfiles()
|
||||
{
|
||||
CheckProfiles();
|
||||
InstallDefaults();
|
||||
|
||||
lock (Profiles)
|
||||
{
|
||||
Profiles.Clear();
|
||||
@ -139,7 +141,6 @@ namespace Artemis.DAL
|
||||
}
|
||||
}
|
||||
}
|
||||
InstallDefaults();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -11,7 +11,7 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
public G810()
|
||||
{
|
||||
Name = "Logitech G810 RGB";
|
||||
Slug = "logitech-g910"; // Shares slugs with the G910 because the layout is identical
|
||||
Slug = "logitech-g810";
|
||||
CantEnableText = "Couldn't connect to your Logitech G810.\n" +
|
||||
"Please check your cables and updating the Logitech Gaming Software\n" +
|
||||
"A minimum version of 8.81.15 is required.\n\n" +
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.DAL;
|
||||
using Artemis.Managers;
|
||||
@ -7,6 +8,7 @@ using Artemis.Profiles.Layers.Models;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities;
|
||||
using Artemis.Utilities.Memory;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Artemis.Modules.Games.RocketLeague
|
||||
{
|
||||
@ -25,20 +27,20 @@ namespace Artemis.Modules.Games.RocketLeague
|
||||
Initialized = false;
|
||||
|
||||
// Generate a new offset when the game is updated
|
||||
// var offset = new GamePointersCollection
|
||||
// {
|
||||
// Game = "RocketLeague",
|
||||
// GameVersion = "1.21",
|
||||
// GameAddresses = new List<GamePointer>
|
||||
// {
|
||||
// new GamePointer
|
||||
// {
|
||||
// Description = "Boost",
|
||||
// BasePointer = new IntPtr(0x016AD528),
|
||||
// Offsets = new[] {0x304, 0x8, 0x50, 0x720, 0x224}
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
//var offset = new GamePointersCollection
|
||||
//{
|
||||
// Game = "RocketLeague",
|
||||
// GameVersion = "1.24",
|
||||
// GameAddresses = new List<GamePointer>
|
||||
// {
|
||||
// new GamePointer
|
||||
// {
|
||||
// Description = "Boost",
|
||||
// BasePointer = new IntPtr(0x016BBFB4),
|
||||
// Offsets = new[] { 0xc4, 0x210, 0x320, 0x734, 0x224}
|
||||
// }
|
||||
// }
|
||||
//};
|
||||
//var res = JsonConvert.SerializeObject(offset, Formatting.Indented);
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ using Artemis.Modules.Games.WoW.Data;
|
||||
using Artemis.Profiles.Layers.Models;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities.Memory;
|
||||
using Newtonsoft.Json;
|
||||
using Process.NET;
|
||||
using Process.NET.Memory;
|
||||
|
||||
@ -32,25 +33,36 @@ namespace Artemis.Modules.Games.WoW
|
||||
|
||||
Initialized = false;
|
||||
|
||||
// TODO: Retrieve from GitHub
|
||||
_pointer = new GamePointersCollection
|
||||
{
|
||||
Game = "WorldOfWarcraft",
|
||||
GameVersion = "7.0.3.22522",
|
||||
GameAddresses = new List<GamePointer>
|
||||
{
|
||||
new GamePointer
|
||||
{
|
||||
Description = "ObjectManager",
|
||||
BasePointer = new IntPtr(0x1575E10)
|
||||
},
|
||||
new GamePointer
|
||||
{
|
||||
Description = "LocalPlayer",
|
||||
BasePointer = new IntPtr(0x169BCB0)
|
||||
}
|
||||
}
|
||||
};
|
||||
_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);
|
||||
}
|
||||
|
||||
public int Scale { get; set; }
|
||||
@ -83,10 +95,11 @@ namespace Artemis.Modules.Games.WoW
|
||||
|
||||
var objectManager = new WoWObjectManager(_process,
|
||||
_pointer.GameAddresses.First(a => a.Description == "ObjectManager").BasePointer);
|
||||
var nameCache = new WoWNameCache(_process, new IntPtr(0x151BA88));
|
||||
var nameCache = new WoWNameCache(_process,
|
||||
_pointer.GameAddresses.First(a => a.Description == "NameCache").BasePointer);
|
||||
var player = new WoWPlayer(_process,
|
||||
_pointer.GameAddresses.First(a => a.Description == "LocalPlayer").BasePointer, new IntPtr(0x179A6E0),
|
||||
true);
|
||||
_pointer.GameAddresses.First(a => a.Description == "LocalPlayer").BasePointer,
|
||||
_pointer.GameAddresses.First(a => a.Description == "TargetGuid").BasePointer, true);
|
||||
|
||||
dataModel.Player = player;
|
||||
if (dataModel.Player != null && dataModel.Player.Guid != Guid.Empty)
|
||||
|
||||
Binary file not shown.
@ -7,6 +7,7 @@ namespace Artemis.Settings
|
||||
public class OffsetSettings : IArtemisSettings
|
||||
{
|
||||
public GamePointersCollection RocketLeague { get; set; }
|
||||
public GamePointersCollection WorldOfWarcraft { get; set; }
|
||||
|
||||
public void Save()
|
||||
{
|
||||
|
||||
@ -27,9 +27,10 @@ namespace Artemis.Utilities
|
||||
debuggerTarget.Layout = @"${logger:shortName=True} - ${uppercase:${level}}: ${message}";
|
||||
fileTarget.FileName = "${specialfolder:folder=MyDocuments}/Artemis/logs/${shortdate}.txt";
|
||||
fileTarget.Layout = "${longdate}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}";
|
||||
fileTarget.ArchiveEvery = FileArchivePeriod.Day;
|
||||
fileTarget.EnableFileDelete = true;
|
||||
fileTarget.MaxArchiveFiles = 7;
|
||||
|
||||
fileTarget.ArchiveEvery = FileArchivePeriod.Minute;
|
||||
|
||||
// Step 4. Define rules
|
||||
var rule1 = new LoggingRule("*", logLevel, debuggerTarget);
|
||||
config.LoggingRules.Add(rule1);
|
||||
|
||||
@ -147,6 +147,8 @@ namespace Artemis.Utilities
|
||||
// Assign each pointer to the settings file
|
||||
if (pointers.FirstOrDefault(p => p.Game == "RocketLeague") != null)
|
||||
offsetSettings.RocketLeague = pointers.FirstOrDefault(p => p.Game == "RocketLeague");
|
||||
if (pointers.FirstOrDefault(p => p.Game == "WorldOfWarcraft") != null)
|
||||
offsetSettings.WorldOfWarcraft = pointers.FirstOrDefault(p => p.Game == "WorldOfWarcraft");
|
||||
|
||||
offsetSettings.Save();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user