//
// MapBaseObj.cs
//
// Copyright (c) František Boháček. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Reloaded.Memory.Sources;
namespace NosSmooth.LocalBinding.Structs;
///
/// Base map object. Common for players, monsters, npcs.
///
public class MapBaseObj : NostaleObject
{
///
/// Initializes a new instance of the class.
///
/// The memory.
/// The map object pointer.
public MapBaseObj(IMemory memory, nuint mapObjPointer)
: base(memory, mapObjPointer)
{
}
///
/// Gets the id of the entity.
///
public long Id
{
get
{
Memory.SafeRead(Address + 0x08, out int id);
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;
}
}
}