Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBlade committed Oct 29, 2019
2 parents a71ab4d + ae624f0 commit 4c2bccb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
7 changes: 7 additions & 0 deletions Offsets/2019.10.24.0000.0000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"WaymarkClassPtr": 29604416, // 1C3BA40
"WaymarkFunc": 7958240, // 796EE0
"Waymarks": 29604832, // 1C3BBE0
"MapID": 222 // 333,
"ActorTable": 29367696 // 1C01D90
}
3 changes: 2 additions & 1 deletion PaisleyPark/Models/Offsets.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
namespace PaisleyPark.Models
namespace PaisleyPark.Models
{
public class Offsets
{
public int WaymarkClassPtr { get; set; }
public int WaymarkFunc { get; set; }
public int Waymarks { get; set; }
public int ActorTable { get; set; }
}
}
15 changes: 1 addition & 14 deletions PaisleyPark/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class MainWindowViewModel : BindableBase
{
public static IEventAggregator EventAggregator { get; private set; }
private NhaamaProcess GameProcess { get; set; }
private Definitions GameDefinitions { get; set; }
private BackgroundWorker Worker;
public static Memory GameMemory { get; set; } = new Memory();
public Settings UserSettings { get; set; }
Expand Down Expand Up @@ -453,18 +452,6 @@ private bool InitializeNhaama()
Application.Current.Shutdown();
}

// Load in the definitions file.
try
{
GameDefinitions = Definitions.Get(GameProcess, gameVersion, Game.GameType.Dx11);
}
catch (Exception ex)
{
MessageBox.Show("Couldn't fetch latest definitions for Nhaama.", "Paisley Park", MessageBoxButton.OK, MessageBoxImage.Error);
logger.Error(ex, "Couldn't fetch or save offsets from the server!");
return false;
}

// Get offsets.
GetOffsets();

Expand Down Expand Up @@ -625,7 +612,7 @@ private void OnWork(object sender, DoWorkEventArgs e)
{
// Pointers for player position, start of the actor table (first actor in the table is you)
// NOTE: needs to be addressed in the loop because it changes dynamically.
var playerPosition = new Pointer(GameProcess, GameDefinitions.ActorTable + 0x8, 0xF0, 0x50);
var playerPosition = new Pointer(GameProcess, (ulong)Offsets.ActorTable + 0x8, 0xF0, 0x50);

// Supporting cancellation.
if (Worker.CancellationPending)
Expand Down

0 comments on commit 4c2bccb

Please sign in to comment.