public void SendAnchorToGame(PosRotAnchor pra) { var offset = PointerSolver.FollowMainPointer(CurrentConnection, OffsetHelper.PlayerCoordJumps, beriBase); CurrentConnection.WriteBytes(pra.Anchor1, offset, NHSE.Injection.RWMethod.Absolute); CurrentConnection.WriteBytes(pra.Anchor2, offset + 0x3A, NHSE.Injection.RWMethod.Absolute); }
public PosRotAnchor GetCurrentPlayerPositionalData(string name) { var offset = PointerSolver.FollowMainPointer(CurrentConnection, OffsetHelper.PlayerCoordJumps, beriBase); var bytesA = CurrentConnection.ReadBytes(offset, 0xA, NHSE.Injection.RWMethod.Absolute); var bytesB = CurrentConnection.ReadBytes(offset + 0x3A, 0x4, NHSE.Injection.RWMethod.Absolute); var sequentinalAnchor = bytesA.Concat(bytesB).ToArray(); return(new PosRotAnchor(sequentinalAnchor, name)); }
public PosRotAnchor GetCurrentPlayerPositionalData(string name) { var offset = PointerSolver.FollowMainPointer(CurrentConnection, OffsetHelper.PlayerCoordJumps, beriBase); var bytesA = CurrentConnection.ReadBytes(offset, 0xC, NHSE.Injection.RWMethod.Absolute); var bytesB = CurrentConnection.ReadBytes(offset + 0x3C, 0x4, NHSE.Injection.RWMethod.Absolute); var sequentinalAnchor = bytesA.Concat(bytesB).ToArray(); //testing //var bytesAAlt = CurrentConnection.PeekMainPointer(OffsetHelper.PlayerCoordJumps, 0xC); //Debug.Log($"Match: {bytesA.SequenceEqual(bytesAAlt)}"); return(new PosRotAnchor(sequentinalAnchor, name)); }