pub struct LootChest {
pub id: u32,
pub name: String,
pub chest_kind: ChestKind,
pub pool_id: u32,
pub position: (i32, i32, i32),
pub locked: bool,
pub lock_tier: u32,
pub opened: bool,
pub respawn_time_secs: Option<f32>,
pub level_requirement: u32,
pub is_mimic: bool,
pub faction: String,
}Fields§
§id: u32§name: String§chest_kind: ChestKind§pool_id: u32§position: (i32, i32, i32)§locked: bool§lock_tier: u32§opened: bool§respawn_time_secs: Option<f32>§level_requirement: u32§is_mimic: bool§faction: StringImplementations§
Source§impl LootChest
impl LootChest
pub fn new( id: u32, name: impl Into<String>, chest_kind: ChestKind, pool_id: u32, ) -> Self
pub fn locked(self, tier: u32) -> Self
pub fn at(self, x: i32, y: i32, z: i32) -> Self
pub fn open(&mut self) -> bool
pub fn can_open(&self, player_level: u32, has_key: bool) -> bool
pub fn is_boss_chest(&self) -> bool
pub fn is_secret(&self) -> bool
pub fn respawns(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LootChest
impl RefUnwindSafe for LootChest
impl Send for LootChest
impl Sync for LootChest
impl Unpin for LootChest
impl UnsafeUnpin for LootChest
impl UnwindSafe for LootChest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.