Skip to main content

TargetCollectorManager

A static class in Root.Township, Alta.Intelligence.

Static list of every registered target on the server (creatures, players, anything with a Target). Each creature decision walks the whole list to add or drop targets by distance.

Fields​

1 private and internal field
MemberWhat it is
private static LinkedList<ITarget> targetsThe linked list of registered targets.

Methods​

MemberWhat it is
static void DeregisterTarget(ITarget target)Removes a target from the list. Target.OnDestroy calls it.
static void ForceUpdateCollector(TargetCollector collector)Adds every target within the collector's radius to its agent and removes the rest. Targets that no longer exist are dropped from the list for good.
static void RegisterTarget(ITarget target)Adds a target to the end of the list. Target.Initialize calls it on the server.
1 private and internal method
MemberWhat it is
private static bool CanAddTarget(float distance, float range, ITarget target)True if the target is within range and, for a player, not downed.