pub struct GuardianSpec {
pub(crate) tag: u32,
pub(crate) npc_id: Option<u32>,
pub(crate) duration_ms: u32,
pub(crate) abilities: Vec<GuardianAbility>,
pub(crate) on_demise: Option<GuardianActionFn>,
pub(crate) owner_coefficients: PetOwnerCoefficients,
}Expand description
Definition used when a cast hook summons a temporary guardian.
Fields§
§tag: u32§npc_id: Option<u32>§duration_ms: u32§abilities: Vec<GuardianAbility>§on_demise: Option<GuardianActionFn>§owner_coefficients: PetOwnerCoefficientsImplementations§
Source§impl GuardianSpec
impl GuardianSpec
pub const fn new(tag: u32, duration_ms: u32) -> Self
pub const fn new_inheriting_owner(tag: u32, duration_ms: u32) -> Self
Sourcepub const fn npc_id(self, npc_id: u32) -> Self
pub const fn npc_id(self, npc_id: u32) -> Self
Assign the creature identity used by NPC-filtered companion modifiers.
pub fn ability(self, ability: GuardianAbility) -> Self
pub const fn on_demise(self, hook: GuardianActionFn) -> Self
pub const fn owner_coefficients( self, coefficients: PetOwnerCoefficients, ) -> Self
pub const fn inherit_owner_stats(self) -> Self
Trait Implementations§
Source§impl Clone for GuardianSpec
impl Clone for GuardianSpec
Source§fn clone(&self) -> GuardianSpec
fn clone(&self) -> GuardianSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GuardianSpec
impl RefUnwindSafe for GuardianSpec
impl Send for GuardianSpec
impl Sync for GuardianSpec
impl Unpin for GuardianSpec
impl UnsafeUnpin for GuardianSpec
impl UnwindSafe for GuardianSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more