Skip to content

Commit

Permalink
Ensure compatibility with 5.21 pre-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ngld committed Mar 17, 2020
1 parent 01e8471 commit 42e9cc5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OverlayPlugin.Core/EventSources/EnmityMemory52.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public class EnmityMemory52 : EnmityMemory
private IntPtr aggroAddress = IntPtr.Zero;

private const string charmapSignature = "48c1ea0381faa7010000????8bc2488d0d";
private const string targetSignature = "83E901740832C04883C4205BC3488D0D";
private const string targetSignatureH0 = "83E901740832C04883C4205BC3488D0D"; // pre hotfix
private const string targetSignatureH1 = "e8f2652f0084c00f8591010000488d0d"; // post hotfix 1
private const string enmitySignature = "83f9ff7412448b048e8bd3488d0d";

// Offsets from the signature to find the correct address.
Expand Down Expand Up @@ -124,7 +125,10 @@ private bool GetPointerAddress()
}

/// TARGET
list = memory.SigScan(targetSignature, 0, bRIP);
list = memory.SigScan(targetSignatureH1, 0, bRIP);
if (list == null || list.Count == 0)
list = memory.SigScan(targetSignatureH0, 0, bRIP);

if (list != null && list.Count > 0)
{
targetAddress = list[0] + targetSignatureOffset;
Expand Down

0 comments on commit 42e9cc5

Please sign in to comment.