DotFilters

Methods to handle DotFilters. Dot filters are filters that filter in or out EMinimapDots.


type TDotFilter

TDotFilter = record
  Bounds: TPointArray;
  Circle: TCircle;
  Inside: Boolean;

  Timeout: Boolean;
  Timer: TCountDown;
end;

Type used to filter minimap dots.


TDotFilter.Create

function TDotFilter.Create(bounds: TPointArray; c: TCircle; inside: Boolean; time: Int32 = -1): TDotFilter; static;

Static method to create a TDotFilter.


TDotFilter.IsExpired

function TDotFilter.IsExpired(): Boolean;

Checks if a TDotFilter is already expired by checking it’s timer.


TDotFilter.IsValid

function TDotFilter.IsValid(p: TPoint): Boolean;

Checks if a point is valid accordint to the current TDotFilter;


TDotFilter.Draw

procedure TDotFilter.Draw(out bitmap: TMufasaBitmap);

Internal method to draw the current dot filter on a bitmap for debugging. You can see this in action by calling Debug(TDotFilter).


type TDotFilterArray

Type used to manage and interact with arrays of TDotFilters.


TDotFilterArray.Setup

procedure TDotFilterArray.Setup(bounds: TPointArray; circle: TCircle; inside: Boolean; time: Int32 = -1);
procedure TDotFilterArray.SetupBounds(bounds: TPointArray; inside: Boolean; time: Int32 = -1);
procedure TDotFilterArray.SetupCircle(circle: TCircle; inside: Boolean; time: Int32 = -1);

Creates and adds a TDotFilter to the current TDotFilterArray.


TDotFilterArray.ClearExpired

procedure TDotFilterArray.ClearExpired();

Clears expired TDotFilter from the current TDotFilterArray. You usually don’t need to call this directly, but you can if you want. Other methods already take care of this by default for you regardless.


TDotFilterArray.IsValid

function TDotFilterArray.IsValid(dot: TPoint; clearExpired: Boolean = True): Boolean;

Checks if a dot/point is valid in any of the TDotFilters in the current array. By default, expired TDotFilters are cleared from the array while this runs.


TDotFilterArray.FilterDots

function TDotFilterArray.FilterDots(dots: TPointArray): TPointArray;

Filter the dots/points passed into this according to our current TDotFilters.


TDotFilterArray.Draw

procedure TDotFilterArray.Draw(out bitmap: TMufasaBitmap);

Internal method for drawing the TDotFilterArray on a bitmap for debugging. You can see this in action by calling Debug(TDotFilterArray)


TMinimap.GetFilteredDot

function TMinimap.GetFilteredDotArray(dot: EMinimapDot; dotFilters: TDotFilterArray): TPointArray;
function TMinimap.GetFilteredDot(dot: EMinimapDot; dotFilters: TDotFilterArray): TPoint;

Retrieves and filters minimap dots according to the specified TDotFilters.


Debug

procedure Debug(filter: TDotFilter); overload;
procedure Debug(filterArray: TDotFilterArray); overload;

Debugs a TDotFilter or TDotFilterArray on the client.