diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index 00dba2b00..5f0aea86c 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -384,6 +384,13 @@ AssettoCorsaView.xaml + + + + + TerrariaView.xaml + + @@ -561,15 +568,27 @@ + + + + + + + + LuaWindowView.xaml + + + + @@ -645,6 +664,7 @@ True Resources.resx + @@ -653,7 +673,11 @@ - + + + + + @@ -856,6 +880,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -924,6 +952,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/Artemis/Artemis/ArtemisBootstrapper.cs b/Artemis/Artemis/ArtemisBootstrapper.cs index cc6fd3565..978297814 100644 --- a/Artemis/Artemis/ArtemisBootstrapper.cs +++ b/Artemis/Artemis/ArtemisBootstrapper.cs @@ -8,8 +8,10 @@ using System.Windows.Controls; using System.Windows.Input; using Artemis.DAL; using Artemis.InjectionModules; +using Artemis.Services; using Artemis.Settings; using Artemis.Utilities; +using Artemis.Utilities.ActiveWindowDetection; using Artemis.Utilities.Converters; using Artemis.Utilities.DataReaders; using Artemis.ViewModels; @@ -31,10 +33,11 @@ namespace Artemis Logging.SetupLogging(SettingsProvider.Load().LogLevel); // Restore DDLs before interacting with any SDKs DllManager.RestoreLogitechDll(); + // Check compatibility before trying to boot further + CompatibilityService.CheckRivaTuner(); Initialize(); BindSpecialValues(); - InputHook.Start(); AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; } @@ -61,7 +64,7 @@ namespace Artemis } // If there is another type of of IInputControl get the non-scaled position - or do some processing to get a scaled position, whatever needs to happen - if ((e != null) && (input != null)) + if (e != null && input != null) return e.GetPosition(input).X; // Return 0 if no processing could be done @@ -98,6 +101,7 @@ namespace Artemis logger.Info("Artemis was run using the autorun shortcut, sleeping for 15 sec."); Thread.Sleep(15000); } + _kernel = new StandardKernel(new BaseModules(), new ManagerModules()); _kernel.Bind().To().InSingletonScope(); @@ -113,7 +117,7 @@ namespace Artemis //TODO DarthAffe 17.12.2016: Is this the right location for this? //TODO Move to Mainmanager and make disposable - ActiveWindowHelper.Initialize(); + ActiveWindowHelper.SetActiveWindowDetectionType(SettingsProvider.Load().ActiveWindowDetection); } protected override void OnExit(object sender, EventArgs e) @@ -144,6 +148,7 @@ namespace Artemis protected override void OnStartup(object sender, StartupEventArgs e) { DisplayRootViewFor(); + InputHook.Start(); } } } \ No newline at end of file diff --git a/Artemis/Artemis/DAL/ProfileProvider.cs b/Artemis/Artemis/DAL/ProfileProvider.cs index 356c53ec0..9a64c6446 100644 --- a/Artemis/Artemis/DAL/ProfileProvider.cs +++ b/Artemis/Artemis/DAL/ProfileProvider.cs @@ -134,7 +134,7 @@ namespace Artemis.DAL return null; return prof; } - catch (JsonSerializationException) + catch (JsonException) { return null; } diff --git a/Artemis/Artemis/DeviceProviders/CoolerMaster/MasterkeysProL.cs b/Artemis/Artemis/DeviceProviders/CoolerMaster/MasterkeysProL.cs index 6b83f28e8..c84f7d4d4 100644 --- a/Artemis/Artemis/DeviceProviders/CoolerMaster/MasterkeysProL.cs +++ b/Artemis/Artemis/DeviceProviders/CoolerMaster/MasterkeysProL.cs @@ -1,4 +1,5 @@ -using System.Drawing; +using System; +using System.Drawing; using System.Linq; using System.Threading; using System.Windows; @@ -67,6 +68,8 @@ namespace Artemis.DeviceProviders.CoolerMaster for (var y = 0; y < Height; y++) { var c = b.GetPixel(x, y); + if (c.R != 0) + Console.WriteLine(); matrix.KeyColor[y, x] = new KEY_COLOR(c.R, c.G, c.B); } } diff --git a/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProL.cs b/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProL.cs index 284b970f9..057439fb9 100644 --- a/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProL.cs +++ b/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProL.cs @@ -42,9 +42,16 @@ namespace Artemis.DeviceProviders.CoolerMaster CmSdk.SetControlDevice(DEVICE_INDEX.DEV_MMouse_L); // Doesn't seem reliable but better than nothing I suppose - CanUse = CmSdk.IsDevicePlug(); - if (CanUse) - CmSdk.EnableLedControl(true); + try + { + CanUse = CmSdk.IsDevicePlug(); + if (CanUse) + CmSdk.EnableLedControl(true); + } + catch (Exception) + { + CanUse = false; + } Logger.Debug("Attempted to enable Mastermouse Pro L. CanUse: {0}", CanUse); return CanUse; diff --git a/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProS.cs b/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProS.cs index 3d1fcafc7..ebb07185c 100644 --- a/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProS.cs +++ b/Artemis/Artemis/DeviceProviders/CoolerMaster/MastermouseProS.cs @@ -38,10 +38,17 @@ namespace Artemis.DeviceProviders.CoolerMaster CmSdk.SetControlDevice(DEVICE_INDEX.DEV_MMouse_S); // Doesn't seem reliable but better than nothing I suppose - CanUse = CmSdk.IsDevicePlug(); - if (CanUse) - CmSdk.EnableLedControl(true); - + try + { + CanUse = CmSdk.IsDevicePlug(); + if (CanUse) + CmSdk.EnableLedControl(true); + } + catch (Exception) + { + CanUse = false; + } + Logger.Debug("Attempted to enable Mastermouse Pro S. CanUse: {0}", CanUse); return CanUse; } diff --git a/Artemis/Artemis/DeviceProviders/Corsair/CorsairKeyboard.cs b/Artemis/Artemis/DeviceProviders/Corsair/CorsairKeyboard.cs index 3be6500e2..4468016b9 100644 --- a/Artemis/Artemis/DeviceProviders/Corsair/CorsairKeyboard.cs +++ b/Artemis/Artemis/DeviceProviders/Corsair/CorsairKeyboard.cs @@ -81,10 +81,10 @@ namespace Artemis.DeviceProviders.Corsair PreviewSettings = new PreviewSettings(new Rect(15, 30, 751, 284), Resources.k65); break; case "STRAFE RGB": - Height = 7; + Height = 8; Width = 22; Slug = "corsair-strafe-rgb"; - PreviewSettings = new PreviewSettings(new Rect(23, 30, 940, 303), Resources.strafe); + PreviewSettings = new PreviewSettings(new Rect(23, 12, 937, 324), Resources.strafe); break; } @@ -114,29 +114,8 @@ namespace Artemis.DeviceProviders.Corsair /// public override void DrawBitmap(Bitmap bitmap) { - - // For STRAFE, stretch the image on row 2. - if (_keyboard.DeviceInfo.Model == "STRAFE RGB") - { - using (var strafeBitmap = new Bitmap(22, 8)) - { - using (var g = Graphics.FromImage(strafeBitmap)) - { - g.DrawImage(bitmap, new Point(0, 0)); - g.DrawImage(bitmap, new Rectangle(0, 3, 22, 7), new Rectangle(0, 2, 22, 7), - GraphicsUnit.Pixel); - - _keyboardBrush.Image = strafeBitmap; - _keyboard.Update(); - } - } - } - else - { - _keyboardBrush.Image = bitmap; - _keyboard.Update(); - } - + _keyboardBrush.Image = bitmap; + _keyboard.Update(); } public override KeyMatch? GetKeyPosition(Keys keyCode) diff --git a/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs b/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs index d7eaa7bfc..ec8ecd391 100644 --- a/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs +++ b/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs @@ -14,8 +14,7 @@ namespace Artemis.DeviceProviders.Logitech DllManager.RestoreLogitechDll(); // Check to see if VC++ 2012 x64 is installed. - if (Registry.LocalMachine.OpenSubKey( - @"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null) + if (Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null) { CantEnableText = "Couldn't connect to your Logitech keyboard.\n" + "The Visual C++ 2012 Redistributable v11.0.61030.0 could not be found, which is required.\n" + diff --git a/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs b/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs index bc185fc6c..aff9bfcf7 100644 --- a/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs +++ b/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs @@ -37,8 +37,11 @@ namespace Artemis.DeviceProviders.Razer return false; // Some people have Synapse installed, but not a Chroma keyboard, deal with this + Chroma.Instance.Initialize(); var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected; var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected; + Chroma.Instance.Uninitialize(); + return blackWidowFound || blackWidowTeFound; } diff --git a/Artemis/Artemis/InjectionModules/BaseModules.cs b/Artemis/Artemis/InjectionModules/BaseModules.cs index 7018eef22..3cf6d05be 100644 --- a/Artemis/Artemis/InjectionModules/BaseModules.cs +++ b/Artemis/Artemis/InjectionModules/BaseModules.cs @@ -6,6 +6,7 @@ using Artemis.Profiles.Layers.Abstract; using Artemis.Profiles.Layers.Interfaces; using Artemis.Profiles.Layers.Types.Audio.AudioCapturing; using Artemis.Profiles.Lua; +using Artemis.Profiles.Lua.Modules.Gui; using Artemis.Services; using Artemis.Utilities.DataReaders; using Artemis.Utilities.GameState; @@ -116,6 +117,8 @@ namespace Artemis.InjectionModules .InheritedFrom() .BindAllBaseClasses()); + Bind().ToSelf(); + #endregion } } diff --git a/Artemis/Artemis/Managers/LuaManager.cs b/Artemis/Artemis/Managers/LuaManager.cs index bae48462d..a01b6b2cd 100644 --- a/Artemis/Artemis/Managers/LuaManager.cs +++ b/Artemis/Artemis/Managers/LuaManager.cs @@ -1,10 +1,12 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using Artemis.DeviceProviders; using Artemis.Profiles; using Artemis.Profiles.Lua; using Artemis.Profiles.Lua.Modules; +using Artemis.Profiles.Lua.Modules.Gui; using Castle.Core.Internal; using MoonSharp.Interpreter; using Ninject; @@ -17,7 +19,6 @@ namespace Artemis.Managers private readonly DeviceManager _deviceManager; private readonly IKernel _kernel; private readonly ILogger _logger; - private readonly Script _luaScript; private List _luaModules; public LuaManager(IKernel kernel, ILogger logger, DeviceManager deviceManager) @@ -25,13 +26,17 @@ namespace Artemis.Managers _kernel = kernel; _logger = logger; _deviceManager = deviceManager; - _luaScript = new Script(CoreModules.Preset_SoftSandbox); + + EditorButtons = new ObservableCollection(); + LuaScript = new Script(CoreModules.Preset_SoftSandbox); } public ProfileModel ProfileModel { get; private set; } public KeyboardProvider KeyboardProvider { get; private set; } public LuaProfileModule ProfileModule { get; private set; } public LuaEventsModule EventsModule { get; private set; } + public Script LuaScript { get; } + public ObservableCollection EditorButtons { get; set; } public void SetupLua(ProfileModel profileModel) { @@ -52,11 +57,11 @@ namespace Artemis.Managers EventsModule = (LuaEventsModule) _luaModules.First(m => m.ModuleName == "Events"); // Setup new state - _luaScript.Options.DebugPrint = LuaPrint; + LuaScript.Options.DebugPrint = LuaPrint; - // Insert each module into the script's globals - foreach (var luaModule in _luaModules) - _luaScript.Globals[luaModule.ModuleName] = luaModule; + // Insert each module with a ModuleName into the script's globals + foreach (var luaModule in _luaModules.Where(m => m.ModuleName != null)) + LuaScript.Globals[luaModule.ModuleName] = luaModule; // If there is no LUA script, don't bother executing the string if (ProfileModel.LuaScript.IsNullOrEmpty()) @@ -66,9 +71,9 @@ namespace Artemis.Managers { lock (EventsModule.InvokeLock) { - lock (_luaScript) + lock (LuaScript) { - _luaScript.DoString(ProfileModel.LuaScript); + LuaScript.DoString(ProfileModel.LuaScript); } } } @@ -97,12 +102,12 @@ namespace Artemis.Managers try { - _luaScript.Globals.Clear(); - _luaScript.Registry.Clear(); - _luaScript.Registry.RegisterConstants(); - _luaScript.Registry.RegisterCoreModules(CoreModules.Preset_SoftSandbox); - _luaScript.Globals.RegisterConstants(); - _luaScript.Globals.RegisterCoreModules(CoreModules.Preset_SoftSandbox); + LuaScript.Globals.Clear(); + LuaScript.Registry.Clear(); + LuaScript.Registry.RegisterConstants(); + LuaScript.Registry.RegisterCoreModules(CoreModules.Preset_SoftSandbox); + LuaScript.Globals.RegisterConstants(); + LuaScript.Globals.RegisterCoreModules(CoreModules.Preset_SoftSandbox); } catch (NullReferenceException) { @@ -112,15 +117,15 @@ namespace Artemis.Managers if (EventsModule != null) lock (EventsModule.InvokeLock) { - lock (_luaScript) + lock (LuaScript) { - _luaScript.DoString(""); + LuaScript.DoString(""); } } else - lock (_luaScript) + lock (LuaScript) { - _luaScript.DoString(""); + LuaScript.DoString(""); } } @@ -138,12 +143,12 @@ namespace Artemis.Managers { lock (EventsModule.InvokeLock) { - lock (_luaScript) + lock (LuaScript) { if (args != null) - _luaScript.Call(function, args); + LuaScript.Call(function, args); else - _luaScript.Call(function); + LuaScript.Call(function); } } } diff --git a/Artemis/Artemis/Managers/MainManager.cs b/Artemis/Artemis/Managers/MainManager.cs index 5870984c5..a5965fa73 100644 --- a/Artemis/Artemis/Managers/MainManager.cs +++ b/Artemis/Artemis/Managers/MainManager.cs @@ -108,6 +108,7 @@ namespace Artemis.Managers public async void EnableProgram() { Logger.Debug("Enabling program"); + ProgramEnabled = true; await LoopManager.StartAsync(); @@ -121,9 +122,12 @@ namespace Artemis.Managers public void DisableProgram() { Logger.Debug("Disabling program"); + foreach (var overlayModule in ModuleManager.OverlayModules) + { if (overlayModule.Settings.IsEnabled) overlayModule.Dispose(); + } LoopManager.Stop(); ProgramEnabled = false; RaiseEnabledChangedEvent(new EnabledChangedEventArgs(ProgramEnabled)); @@ -178,4 +182,4 @@ namespace Artemis.Managers handler?.Invoke(this, e); } } -} \ No newline at end of file +} diff --git a/Artemis/Artemis/Managers/PreviewManager.cs b/Artemis/Artemis/Managers/PreviewManager.cs index 612f2e120..68a7f8aed 100644 --- a/Artemis/Artemis/Managers/PreviewManager.cs +++ b/Artemis/Artemis/Managers/PreviewManager.cs @@ -5,6 +5,7 @@ using Artemis.DAL; using Artemis.Modules.Abstract; using Artemis.Settings; using Artemis.Utilities; +using Artemis.Utilities.ActiveWindowDetection; using Ninject.Extensions.Logging; namespace Artemis.Managers diff --git a/Artemis/Artemis/Models/ProfileEditorModel.cs b/Artemis/Artemis/Models/ProfileEditorModel.cs index cb9af3a15..389d5ecf7 100644 --- a/Artemis/Artemis/Models/ProfileEditorModel.cs +++ b/Artemis/Artemis/Models/ProfileEditorModel.cs @@ -27,8 +27,7 @@ namespace Artemis.Models private FileSystemWatcher _watcher; private ModuleModel _luaModule; - public ProfileEditorModel(WindowService windowService, MetroDialogService dialogService, - DeviceManager deviceManager, LuaManager luaManager) + public ProfileEditorModel(WindowService windowService, MetroDialogService dialogService, DeviceManager deviceManager, LuaManager luaManager) { _windowService = windowService; _dialogService = dialogService; @@ -50,7 +49,7 @@ namespace Artemis.Models new ConstructorArgument("dataModel", dataModel), new ConstructorArgument("layer", layer) }; - _windowService.ShowDialog("Artemis | Edit layer", args); + _windowService.ShowDialog("Artemis | Edit layer", null, args); // If the layer was a folder, but isn't anymore, assign it's children to it's parent. if (layer.LayerType is FolderType || !layer.Children.Any()) @@ -345,7 +344,8 @@ namespace Artemis.Models private void DisposeLuaWatcher() { - if (_watcher == null) return; + if (_watcher == null) + return; _watcher.Changed -= LuaFileChanged; _watcher.Dispose(); _watcher = null; @@ -360,8 +360,6 @@ namespace Artemis.Models #region Rendering - - #endregion } -} \ No newline at end of file +} diff --git a/Artemis/Artemis/Modules/Games/AssettoCorsa/AssettoCorsaView.xaml b/Artemis/Artemis/Modules/Games/AssettoCorsa/AssettoCorsaView.xaml index e454ed3af..04e57ed28 100644 --- a/Artemis/Artemis/Modules/Games/AssettoCorsa/AssettoCorsaView.xaml +++ b/Artemis/Artemis/Modules/Games/AssettoCorsa/AssettoCorsaView.xaml @@ -22,7 +22,7 @@ diff --git a/Artemis/Artemis/Modules/Games/GtaV/GtaVModel.cs b/Artemis/Artemis/Modules/Games/GtaV/GtaVModel.cs index 38f854a65..f97e8c245 100644 --- a/Artemis/Artemis/Modules/Games/GtaV/GtaVModel.cs +++ b/Artemis/Artemis/Modules/Games/GtaV/GtaVModel.cs @@ -29,7 +29,6 @@ namespace Artemis.Modules.Games.GtaV public override void Enable() { - var process = System.Diagnostics.Process.GetProcessesByName("GTA5").First(); DllManager.PlaceLogitechDll(); _pipeServer.PipeMessage += PipeServerOnPipeMessage; base.Enable(); diff --git a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueViewModel.cs b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueViewModel.cs index e46759d75..a1f168377 100644 --- a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueViewModel.cs +++ b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueViewModel.cs @@ -36,7 +36,7 @@ namespace Artemis.Modules.Games.RocketLeague { if (!SettingsProvider.Load().EnablePointersUpdate) { - VersionText = "You disabled pointer updates, this could result in the Rocket League effect not working after a game update."; + VersionText = "You disabled pointer updates, this could result in the Rocket League module not working after a game update."; return; } diff --git a/Artemis/Artemis/Modules/Games/Terraria/TerrariaDataModel.cs b/Artemis/Artemis/Modules/Games/Terraria/TerrariaDataModel.cs new file mode 100644 index 000000000..ce01c1f18 --- /dev/null +++ b/Artemis/Artemis/Modules/Games/Terraria/TerrariaDataModel.cs @@ -0,0 +1,18 @@ +using Artemis.Modules.Abstract; +using MoonSharp.Interpreter; + +namespace Artemis.Modules.Games.Terraria +{ + [MoonSharpUserData] + public class TerrariaDataModel : ModuleDataModel + { + public int Hp { get; set; } + public int MaxHp { get; set; } + public int Mana { get; set; } + public int MaxMana { get; set; } + public int Breath { get; set; } + public int MaxBreath { get; set; } + public bool InWater { get; set; } + public bool InLava { get; set; } + } +} \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Games/Terraria/TerrariaModel.cs b/Artemis/Artemis/Modules/Games/Terraria/TerrariaModel.cs new file mode 100644 index 000000000..c7f3c0c8c --- /dev/null +++ b/Artemis/Artemis/Modules/Games/Terraria/TerrariaModel.cs @@ -0,0 +1,91 @@ +using System; +using System.Linq; +using Artemis.DAL; +using Artemis.Managers; +using Artemis.Modules.Abstract; +using Artemis.Settings; +using Artemis.Utilities; +using Artemis.Utilities.Memory; + +namespace Artemis.Modules.Games.Terraria +{ + public class TerrariaModel : ModuleModel + { + private Memory _memory; + private GamePointersCollection _pointer; + + public TerrariaModel(DeviceManager deviceManager, LuaManager luaManager) : base(deviceManager, luaManager) + { + Settings = SettingsProvider.Load(); + 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 + // { + // new GamePointer + // { + // Description = "PlayerBase", + // BasePointer = new IntPtr(0x0039C078), + // Offsets = new[] {0x280, 0x6C0, 0x674, 0x3C} + // } + // } + //}; + //var res = JsonConvert.SerializeObject(_pointer, Formatting.Indented); + } + + public override string Name => "Terraria"; + public override bool IsOverlay => false; + public override bool IsBoundToProcess => true; + + public override void Dispose() + { + base.Dispose(); + + _memory?.Dispose(); + _memory = null; + } + + public override void Enable() + { + Updater.GetPointers(); + _pointer = SettingsProvider.Load().Terraria; + + base.Enable(); + } + + public override void Update() + { + if (_memory == null) + { + var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessNames[0]); + if (tempProcess == null) + return; + + _memory = new Memory(tempProcess); + } + + if (ProfileModel == null || DataModel == null || _memory == null) + return; + + var offsets = _pointer.GameAddresses.First(ga => ga.Description == "PlayerBase").ToString(); + var baseAddress = _memory.GetAddress("\"Terraria.exe\"" + offsets); + var basePointer = new IntPtr(_memory.ReadInt32(baseAddress)); + var playerPointer = new IntPtr(_memory.ReadInt32(basePointer + 0x18)); + + var dataModel = (TerrariaDataModel) DataModel; + dataModel.Hp = _memory.ReadInt32(playerPointer + 0x340); + dataModel.MaxHp = _memory.ReadInt32(playerPointer + 0x338); + dataModel.Mana = _memory.ReadInt32(playerPointer + 0x344); + dataModel.MaxMana = _memory.ReadInt32(playerPointer + 0x348); + dataModel.Breath = _memory.ReadInt32(playerPointer + 0x2B4); + dataModel.MaxBreath = _memory.ReadInt32(playerPointer + 0x2B0); + dataModel.InWater = Convert.ToBoolean(_memory.ReadInt32(playerPointer + 0x1D)); + dataModel.InLava = Convert.ToBoolean(_memory.ReadInt32(playerPointer + 0x20)); + } + } +} diff --git a/Artemis/Artemis/Modules/Games/Terraria/TerrariaSettings.cs b/Artemis/Artemis/Modules/Games/Terraria/TerrariaSettings.cs new file mode 100644 index 000000000..c155ff365 --- /dev/null +++ b/Artemis/Artemis/Modules/Games/Terraria/TerrariaSettings.cs @@ -0,0 +1,8 @@ +using Artemis.Modules.Abstract; + +namespace Artemis.Modules.Games.Terraria +{ + public class TerrariaSettings : ModuleSettings + { + } +} \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Games/Terraria/TerrariaView.xaml b/Artemis/Artemis/Modules/Games/Terraria/TerrariaView.xaml new file mode 100644 index 000000000..f5cf0d7e4 --- /dev/null +++ b/Artemis/Artemis/Modules/Games/Terraria/TerrariaView.xaml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + +