Interface IPetController
Interface for controllers that manage pet entities, including summoning and destruction events.
public interface IPetController : ICharacterBehaviour
- Inherited Members
Fields
OnPetDestroyed
Event triggered when a pet is dismissed or destroyed. Carries the pet that left, or null when every pet left at once.
public static Action<Pet> OnPetDestroyed
Field Value
OnPetOrdersChanged
Event triggered when the server confirms a change to the pets' stance or movement order. Orders apply to every pet, so this carries the first pet, or null when none is out.
public static Action<Pet> OnPetOrdersChanged
Field Value
OnPetSummoned
Event triggered when a pet is summoned. Provides the summoned pet instance.
public static Action<Pet> OnPetSummoned
Field Value
Properties
AttackPriority
The packed order a pet attack command tries its target choices in; see
PetAttackPriority. Mirrored on this controller so the panel has something to
bind to between a pet being dismissed and re-summoned.
int AttackPriority { get; set; }
Property Value
MovementOrder
The pets' movement order as this peer currently understands it.
PetMovementOrder MovementOrder { get; set; }
Property Value
OnPetDismissTriggers
Triggers invoked when a pet is dismissed or destroyed.
List<Trigger> OnPetDismissTriggers { get; }
Property Value
OnPetSummonTriggers
Triggers invoked when a pet is summoned.
List<Trigger> OnPetSummonTriggers { get; }
Property Value
PetSlots
How many pets this character may keep out at once: the final value of its Pet Slots character attribute, so an
archetype, an item or a buff grants slots as it moves any attribute. A summon spell's own MaxPets can only
lower it. See PetSlotRules.
int PetSlots { get; }
Property Value
Pets
The pets out, in the order they were summoned. Every order and stance applies to all of them.
IReadOnlyList<Pet> Pets { get; }
Property Value
Stance
The pets' combat stance as this peer currently understands it. Server-authoritative; clients only ever request a change.
PetStance Stance { get; set; }
Property Value
Methods
AddPet(Pet)
Adds a pet. False when it is already listed or null.
bool AddPet(Pet pet)
Parameters
petPet
Returns
ClearPets()
Forgets every pet.
void ClearPets()
RemovePet(Pet)
Removes a pet. False when it was not listed.
bool RemovePet(Pet pet)
Parameters
petPet
Returns
Events
OnOwnerAttacked
Raised on the server when this controller's owner is damaged by a hostile character, so a defensive pet can come to their aid.
event Action<IPetController, ICharacter> OnOwnerAttacked
Event Type
Remarks
The first argument is the controller that raised it. Carrying it means a single shared handler can service every player without having to search the scene for whose pet just heard about an attack.
OnPetSlotsReduced
Raised on the server when the Pet Slots attribute falls under a slot a pet holds, so that pet can be dismissed.
event Action<IPetController> OnPetSlotsReduced