FivePD API
Interfaces/Callouts

ICalloutDistributionService

Responsible for creating and distributing callouts.

Methods

AssignUnitToCallout

Assigns a unit to a callout.

Parameters

NameTypeDescription
unitUnitThe unit.
calloutCalloutThe callout.
acceptedByUnitbooltrue = accepted by a unit; false = assigned by a dispatcher or an addon.

Returns

NameType
booltrue if the unit was assigned to the callout; otherwise, false.

UnassignUnitFromCallout

Unassigns a unit from a callout.

Parameters

NameTypeDescription
unitUnitThe unit.
calloutCalloutThe callout.
acceptedByUnitbooltrue = accepted by a unit; false = assigned by a dispatcher or an addon.

Returns

NameType
booltrue if the unit was assigned to the callout; otherwise, false.

DistributeCallout

Parameters

NameTypeDescription
internalCalloutInternalCalloutThe callout.
manualTriggerbooltrue = callout was triggered manually; false = callout was triggered automatically.

Events

OnCalloutDispatched

Invoked when a callout is dispatched to units.

Type: EventHandler<DispatchedCalloutEventArgs>

OnCalloutAccepted

Invoked when a callout is accepted.

Type: EventHandler<AcceptedCalloutEventArgs>

OnUnitAssignedToCallout

Invoked when a unit is assigned to a callout.

Type: EventHandler<UnitAssignedToCalloutEventArgs>

OnUnitUnassignedFromCallout

Invoked when a unit is unassigned from a callout.

Type: EventHandler<UnitAssignedToCalloutEventArgs>