Struct RaidRef
pub struct RaidRef { /* private fields */ }Expand description
A raid of a level (Raid), by the id Raids keeps it under, which the
raids file saves. level.raid_at(host, pos), level.raids(host),
level.raid(host, id) and mob.raid(host) make one. A handle resolves
again on each call: it reads as None or false once the raid is gone,
for a handle of an earlier open, for a closed level, and on a client.
Reads and writes reach parked server levels without moving them into place.
Implementations§
§impl RaidRef
impl RaidRef
pub fn omen_level(self, host: &dyn Host) -> Option<i32>
pub fn omen_level(self, host: &dyn Host) -> Option<i32>
Side: server.
Raid.getRaidOmenLevel: 0 to 5 in play, any value a mod set.
pub fn groups_spawned(self, host: &dyn Host) -> Option<i32>
pub fn groups_spawned(self, host: &dyn Host) -> Option<i32>
Side: server.
Raid.getGroupsSpawned: the waves spawned so far.
pub fn num_groups(self, host: &dyn Host) -> Option<i32>
pub fn num_groups(self, host: &dyn Host) -> Option<i32>
Side: server.
Raid.numGroups, set from getNumGroups(difficulty) when the raid
began: 0, 3, 5 or 7. A raid of omen level 2 or more adds a bonus wave
(hasBonusWave).
pub fn has_bonus_wave(self, host: &dyn Host) -> Option<bool>
pub fn has_bonus_wave(self, host: &dyn Host) -> Option<bool>
Side: server.
Whether the omen level is above 1, which adds a wave after the last
(Raid.hasBonusWave).
pub fn is_started(self, host: &dyn Host) -> bool
pub fn is_started(self, host: &dyn Host) -> bool
Side: server.
Raid.isStarted.
pub fn status(self, host: &dyn Host) -> Option<RaidStatus>
pub fn status(self, host: &dyn Host) -> Option<RaidStatus>
Side: server.
Raid.RaidStatus.
pub fn total_health(self, host: &dyn Host) -> Option<f32>
pub fn total_health(self, host: &dyn Host) -> Option<f32>
Side: server.
Raid.getTotalHealth: the health of every raider that joined, which
the boss bar divides by.
pub fn living_health(self, host: &dyn Host) -> Option<f32>
pub fn living_health(self, host: &dyn Host) -> Option<f32>
Side: server.
Raid.getHealthOfLivingRaiders.
pub fn bar_progress(self, host: &dyn Host) -> Option<f32>
pub fn bar_progress(self, host: &dyn Host) -> Option<f32>
Side: server.
The boss bar’s progress, 0 to 1 (Raid.raidEvent.getProgress).
pub fn raiders(self, host: &dyn Host) -> Option<Vec<EntityRef>>
pub fn raiders(self, host: &dyn Host) -> Option<Vec<EntityRef>>
Side: server.
Raid.getAllRaiders: the living raiders that joined, in mob-list
order, as entity handles.
pub fn wave_raiders(self, host: &dyn Host, wave: i32) -> Option<Vec<EntityRef>>
pub fn wave_raiders(self, host: &dyn Host, wave: i32) -> Option<Vec<EntityRef>>
Side: server.
The living raiders of one wave (groupRaiderMap.get(wave)).
pub fn heroes(self, host: &dyn Host) -> Option<Vec<u128>>
pub fn heroes(self, host: &dyn Host) -> Option<Vec<u128>>
Side: server.
Raid.heroesOfTheVillage: the UUIDs of the players who got Hero of
the Village, online or not, in the order vanilla’s set iterates them.
pub fn set_omen_level(self, host: &mut dyn ServerHost, level: i32) -> bool
pub fn set_omen_level(self, host: &mut dyn ServerHost, level: i32) -> bool
Side: server.
Raid.setRaidOmenLevel: any value, as vanilla assigns it (only
absorbRaidOmen clamps, to 0 to 5). The raid is saved with it.
pub fn stop(self, host: &mut dyn ServerHost) -> bool
pub fn stop(self, host: &mut dyn ServerHost) -> bool
Side: server.
Raid.stop: the raid ends as stopped and its boss bar leaves the
players; the raid_state_change hook fires. False if the raid is
already stopped.