Struct rscache::definition::osrs::NpcDefinition
source · [−]pub struct NpcDefinition {Show 14 fields
pub id: u16,
pub name: String,
pub size: usize,
pub actions: [String; 5],
pub visible_on_minimap: bool,
pub combat_level: Option<u16>,
pub configs: Vec<u16>,
pub varbit_id: Option<u16>,
pub varp_index: Option<u16>,
pub interactable: bool,
pub pet: bool,
pub params: HashMap<u32, String>,
pub model_data: NpcModelData,
pub animation_data: NpcAnimationData,
}
Expand description
Contains all the information about a certain npc fetched from the cache through the NpcLoader.
Fields
id: u16
name: String
size: usize
actions: [String; 5]
visible_on_minimap: bool
combat_level: Option<u16>
configs: Vec<u16>
varbit_id: Option<u16>
varp_index: Option<u16>
interactable: bool
pet: bool
params: HashMap<u32, String>
model_data: NpcModelData
animation_data: NpcAnimationData
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for NpcDefinition
impl Send for NpcDefinition
impl Sync for NpcDefinition
impl Unpin for NpcDefinition
impl UnwindSafe for NpcDefinition
Blanket Implementations
Mutably borrows from an owned value. Read more
fn fetch_from_index<D>(
cache: &Cache,
index_id: u8
) -> Result<HashMap<u16, D>, Error> where
D: Definition,
fn fetch_from_index<D>(
cache: &Cache,
index_id: u8
) -> Result<HashMap<u16, D>, Error> where
D: Definition,
Fetches multiple definitions from every archive in the index. Read more