From 2ed1006565d793bc5bda0bb4eea116c7d09e8de8 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 27 Jan 2022 20:26:09 +0100 Subject: [PATCH] feat(localbinding): add map object x, y --- .../Structs/MapBaseObj.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Local/NosSmooth.LocalBinding/Structs/MapBaseObj.cs b/Local/NosSmooth.LocalBinding/Structs/MapBaseObj.cs index 9e77a840f30e59b30bdea6e0aa82135325e5c4ab..38ba7c80518d7259b0aaa1c7ad4670ccdc9582fc 100644 --- a/Local/NosSmooth.LocalBinding/Structs/MapBaseObj.cs +++ b/Local/NosSmooth.LocalBinding/Structs/MapBaseObj.cs @@ -41,4 +41,28 @@ public class MapBaseObj : NostaleObject return id; } } + + /// + /// Gets the x coordinate of the entity. + /// + public ushort X + { + get + { + Memory.SafeRead(Address + 0x0C, out ushort x); + return x; + } + } + + /// + /// Gets the y coordinate of the entity. + /// + public ushort Y + { + get + { + Memory.SafeRead(Address + 0x0E, out ushort y); + return y; + } + } } \ No newline at end of file