~ruther/NosSmooth

871522590a314dee113f67a867acd10748cbf244 — Rutherther 3 years ago 8bd2c5c
fix(localbinding): correctly get pet managers
M Local/NosSmooth.LocalBinding/Structs/PetManager.cs => Local/NosSmooth.LocalBinding/Structs/PetManager.cs +1 -1
@@ 42,7 42,7 @@ public class PetManager : ControlManager
    {
        get
        {
            _memory.SafeRead(Address + 0x20, out int playerAddress);
            _memory.SafeRead(Address + 0x7C, out int playerAddress);
            return new MapNpcObj(_memory, (IntPtr)playerAddress);
        }
    }

M Local/NosSmooth.LocalBinding/Structs/PetManagerList.cs => Local/NosSmooth.LocalBinding/Structs/PetManagerList.cs +4 -4
@@ 88,7 88,7 @@ public class PetManagerList
    /// Get the first pet.
    /// </summary>
    /// <returns>First pet, if exists.</returns>
    public MapNpcObj? GetFirst()
    public PetManager? GetFirst()
    {
        if (Length == 0)
        {


@@ 96,14 96,14 @@ public class PetManagerList
        }

        _memory.SafeRead(List, out int firstAddress);
        return new MapNpcObj(_memory, (IntPtr)firstAddress);
        return new PetManager(_memory, (IntPtr)firstAddress);
    }

    /// <summary>
    /// Get the second pet.
    /// </summary>
    /// <returns>Second pet, if exists.</returns>
    public MapNpcObj? GetSecond()
    public PetManager? GetSecond()
    {
        if (Length < 2)
        {


@@ 111,6 111,6 @@ public class PetManagerList
        }

        _memory.SafeRead(List + 0x04, out int secondAddress);
        return new MapNpcObj(_memory, (IntPtr)secondAddress);
        return new PetManager(_memory, (IntPtr)secondAddress);
    }
}
\ No newline at end of file

Do not follow this link