Пример #1
0
    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);
    }
Пример #2
0
    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));
    }
Пример #3
0
    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));
    }