pub struct ActiveFight {Show 13 fields
pub id: Uuid,
pub fight_id: FightTemplateId,
pub current_wave: i64,
pub player_id: EntityId,
pub party_player_id: Option<EntityId>,
pub entities: Vec<Entity>,
pub fight_stopped: bool,
pub fight_ended: bool,
pub max_duration_ticks: u64,
pub dungeon: Option<ActiveDungeon>,
pub paused: bool,
pub pending_wave_spawns: Vec<PendingWaveSpawn>,
pub summoned_entity_ids: Vec<EntityId>,
}Fields§
§id: Uuid§fight_id: FightTemplateId§current_wave: i64§player_id: EntityId§party_player_id: Option<EntityId>§entities: Vec<Entity>§fight_stopped: bool§fight_ended: bool§max_duration_ticks: u64§dungeon: Option<ActiveDungeon>§paused: bool§pending_wave_spawns: Vec<PendingWaveSpawn>Streaming wave pool: mobs of the current wave not yet released to the field (released
one per enemy death while non-empty). The wave/fight is complete only when this is empty
AND no enemy is alive. #[serde(default)] keeps pre-existing saves loading (empty pool).
summoned_entity_ids: Vec<EntityId>Boss-summon: ids of mobs spawned by a boss summon wave (marked summoned).
Recorded on spawn so kill quests can skip their deaths at quest-tick time
(the dead entity is already removed from entities by then, mirroring the
party_player_id pattern). Keeps a boss fight’s kill-quest ticks flat.
#[serde(default)] keeps pre-existing saves loading (empty list).
Implementations§
Source§impl ActiveFight
impl ActiveFight
pub fn get_player(&self) -> Option<&Entity>
pub fn get_player_mut(&mut self) -> Option<&mut Entity>
pub fn get_party_player(&self) -> Option<&Entity>
pub fn get_party_player_mut(&mut self) -> Option<&mut Entity>
pub fn get_enemies_amount(&self) -> usize
Trait Implementations§
Source§impl Clone for ActiveFight
impl Clone for ActiveFight
Source§fn clone(&self) -> ActiveFight
fn clone(&self) -> ActiveFight
Returns a copy 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 moreSource§impl Debug for ActiveFight
impl Debug for ActiveFight
Source§impl Default for ActiveFight
impl Default for ActiveFight
Source§fn default() -> ActiveFight
fn default() -> ActiveFight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ActiveFight
impl<'de> Deserialize<'de> for ActiveFight
Source§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
Source§impl JsonSchema for ActiveFight
impl JsonSchema for ActiveFight
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ActiveFight
impl PartialEq for ActiveFight
Source§impl Serialize for ActiveFight
impl Serialize for ActiveFight
Source§impl Tsify for ActiveFight
impl Tsify for ActiveFight
const DECL: &'static str = "export interface ActiveFight {\n id: Uuid;\n fight_id: FightTemplateId;\n current_wave: number;\n player_id: EntityId;\n party_player_id: EntityId | null;\n entities: Entity[];\n fight_stopped: boolean;\n fight_ended: boolean;\n max_duration_ticks: number;\n dungeon: ActiveDungeon | null;\n paused: boolean;\n /**\n * Streaming wave pool: mobs of the current wave not yet released to the field (released\n * one per enemy death while non-empty). The wave/fight is complete only when this is empty\n * AND no enemy is alive. `#[serde(default)]` keeps pre-existing saves loading (empty pool).\n */\n pending_wave_spawns?: PendingWaveSpawn[];\n /**\n * Boss-summon: ids of mobs spawned by a boss summon wave (marked `summoned`).\n * Recorded on spawn so kill quests can skip their deaths at quest-tick time\n * (the dead entity is already removed from `entities` by then, mirroring the\n * `party_player_id` pattern). Keeps a boss fight\\\'s kill-quest ticks flat.\n * `#[serde(default)]` keeps pre-existing saves loading (empty list).\n */\n summoned_entity_ids?: EntityId[];\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl Eq for ActiveFight
impl StructuralPartialEq for ActiveFight
Auto Trait Implementations§
impl Freeze for ActiveFight
impl RefUnwindSafe for ActiveFight
impl Send for ActiveFight
impl Sync for ActiveFight
impl Unpin for ActiveFight
impl UnwindSafe for ActiveFight
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