Skip to content

ObjectManager ยป Units

Namespace: Mayo.Manager.Objects
GameClient: GC.OM


You can find more info's about the IUnit properties here:


List<IUnit> GetUnits()

Returns a list of all IUnit's.

Example
foreach (var Unit in GC.OM.GetUnits())
    Log.Write($"{Unit.Name} | Health: {Unit.CurrentHealthInPercent}%");

IUnit? GetUnit(UInt128 GUID)

Returns IUnit or null.


List<IUnit> GetHostileUnitsAround(Vector3 Location, double Distance)

Returns a list of hostile IUnit's located within the specified distance to the specified position.


bool HasHostilesAround(Vector3 Location, double Radius, int MaxHostiles)

Returns true if any hostile unit is located within the specified distance to the specified position.


IUnit? GetClosestUnit()

Returns IUnit or null.


IUnit? GetClosestUnit(int DisplayID)

Returns IUnit or null.


List<IUnit> GetUnitsAround(Vector3 Location, double Distance)

Returns a list of IUnit's located within the specified distance to the specified position.


IUnit? GetClosestSpiritHealer()

Returns IUnit or null.