Table of Contents

Interface IPetController

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

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

Action<Pet>

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

Action<Pet>

OnPetSummoned

Event triggered when a pet is summoned. Provides the summoned pet instance.

public static Action<Pet> OnPetSummoned

Field Value

Action<Pet>

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

int

MovementOrder

The pets' movement order as this peer currently understands it.

PetMovementOrder MovementOrder { get; set; }

Property Value

PetMovementOrder

OnPetDismissTriggers

Triggers invoked when a pet is dismissed or destroyed.

List<Trigger> OnPetDismissTriggers { get; }

Property Value

List<Trigger>

OnPetSummonTriggers

Triggers invoked when a pet is summoned.

List<Trigger> OnPetSummonTriggers { get; }

Property Value

List<Trigger>

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

int

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

IReadOnlyList<Pet>

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

PetStance

Methods

AddPet(Pet)

Adds a pet. False when it is already listed or null.

bool AddPet(Pet pet)

Parameters

pet Pet

Returns

bool

ClearPets()

Forgets every pet.

void ClearPets()

RemovePet(Pet)

Removes a pet. False when it was not listed.

bool RemovePet(Pet pet)

Parameters

pet Pet

Returns

bool

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

Action<IPetController, ICharacter>

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

Event Type

Action<IPetController>