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 == "Boost").ToString(); var boostAddress = _memory.GetAddress("\"RocketLeague.exe\"" + offsets); var boostInt = (int)(_memory.ReadFloat(boostAddress) * 100); if (boostInt > 100) { boostInt = 100; } if (boostInt < 0) { boostInt = 0; } ((RocketLeagueDataModel)DataModel).Boost = boostInt; }
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)); }
public bool ReadAddresses() { if (_memory == null) { var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessNames[0]); if (tempProcess == null) { return(false); } _memory = new Memory(tempProcess); } if (_memory == null) { return(false); } var boostOffsets = _pointer.GameAddresses.First(ga => ga.Description == "Boost").ToString(); boostAddress = _memory.GetAddress("\"RocketLeague.exe\"" + boostOffsets); var speedOffsets = _pointer.GameAddresses.First(ga => ga.Description == "Speed").ToString(); speedAddress = _memory.GetAddress("\"RocketLeague.exe\"" + speedOffsets); return(true); }
public override void Enable() { var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName); if (tempProcess == null) { return; } _process = new ProcessSharp(tempProcess, MemoryType.Remote); Initialized = true; }
public override void Update() { if (_process == null) { var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessNames[0]); if (tempProcess == null) { return; } _process = new ProcessSharp(tempProcess, MemoryType.Remote); } if (ProfileModel == null || DataModel == null || _process == null) { return; } var dataModel = (WoWDataModel)DataModel; var objectManager = new WoWObjectManager(_process, _pointer.GameAddresses.First(a => a.Description == "ObjectManager").BasePointer); 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, _pointer.GameAddresses.First(a => a.Description == "TargetGuid").BasePointer, true); dataModel.Player = player; if (dataModel.Player != null && dataModel.Player.Guid != Guid.Empty) { dataModel.Player.UpdateDetails(nameCache); var target = player.GetTarget(objectManager); if (target == null) { return; } dataModel.Target = new WoWUnit(target.Process, target.BaseAddress); dataModel.Target.UpdateDetails(nameCache); } else { dataModel.Target = null; } }
public override void Enable() { Initialized = false; Updater.GetPointers(); _pointer = SettingsProvider.Load <OffsetSettings>().RocketLeague; var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName); if (tempProcess == null) { return; } _memory = new Memory(tempProcess); Initialized = true; }
public override void Enable() { Initialized = false; Updater.GetPointers(); _pointer = JsonConvert.DeserializeObject <GamePointersCollection>(Offsets.Default.RocketLeague); var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName); if (tempProcess == null) { return; } _memory = new Memory(tempProcess); Initialized = true; }
public override void Update() { var etsProcess = MemoryHelpers.GetProcessIfRunning("eurotrucks2"); var atsProcess = MemoryHelpers.GetProcessIfRunning("amtrucks"); if (etsProcess == null && atsProcess == null) { return; } var dataModel = (EurotruckSimulator2DataModel)DataModel; var telemetryData = Ets2TelemetryDataReader.Instance.Read(); dataModel.GameName = etsProcess != null ? TruckSimulatorGameName.EuroTruckSimulator2 : TruckSimulatorGameName.AmericanTruckSimulator; dataModel.Game = telemetryData.Game; dataModel.Job = telemetryData.Job; dataModel.Navigation = telemetryData.Navigation; dataModel.Trailer = telemetryData.Trailer; dataModel.Truck = telemetryData.Truck; }