Trait veloren_server::events::ServerEvent

source ·
pub trait ServerEvent: Send + Sync + 'static {
    type SystemData<'a>: SystemData<'a>;

    const NAME: &'static str = _;

    // Required method
    fn handle(
        events: impl ExactSizeIterator<Item = Self>,
        data: Self::SystemData<'_>,
    );
}

Required Associated Types§

source

type SystemData<'a>: SystemData<'a>

Provided Associated Constants§

source

const NAME: &'static str = _

Required Methods§

source

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ServerEvent for AuraEvent

§

type SystemData<'a> = (Storage<'a, Auras, FetchMut<'a, MaskedStorage<Auras>>>, Storage<'a, EnteredAuras, FetchMut<'a, MaskedStorage<EnteredAuras>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (auras, entered_auras): Self::SystemData<'_>, )

source§

impl ServerEvent for BonkEvent

§

type SystemData<'a> = (Write<'a, BlockChange>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, ProgramTime, PanicHandler>, Read<'a, EventBus<CreateObjectEvent>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, terrain, program_time, create_object_events): Self::SystemData<'_>, )

source§

impl ServerEvent for BuffEvent

§

type SystemData<'a> = (Read<'a, Time>, Storage<'a, Buffs, FetchMut<'a, MaskedStorage<Buffs>>>, Storage<'a, Body, Fetch<'a, MaskedStorage<Body>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (time, buffs, bodies, healths, stats, masses): Self::SystemData<'_>, )

source§

impl ServerEvent for ChangeAbilityEvent

§

type SystemData<'a> = (Storage<'a, ActiveAbilities, FetchMut<'a, MaskedStorage<ActiveAbilities>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>, Storage<'a, SkillSet, Fetch<'a, MaskedStorage<SkillSet>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (active_abilities, inventories, skill_sets): Self::SystemData<'_>, )

source§

impl ServerEvent for ChangeBodyEvent

§

type SystemData<'a> = Storage<'a, Body, FetchMut<'a, MaskedStorage<Body>>>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, bodies: Self::SystemData<'_>, )

source§

impl ServerEvent for ChangeStanceEvent

§

type SystemData<'a> = Storage<'a, Stance, FetchMut<'a, MaskedStorage<Stance>>>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, stances: Self::SystemData<'_>, )

source§

impl ServerEvent for ComboChangeEvent

§

type SystemData<'a> = (Read<'a, Time>, Read<'a, EventBus<Outcome>>, Storage<'a, Combo, FetchMut<'a, MaskedStorage<Combo>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (time, outcomes, combos, uids): Self::SystemData<'_>, )

source§

impl ServerEvent for CreateSpriteEvent

§

type SystemData<'a> = (Write<'a, BlockChange, PanicHandler>, Write<'a, ScheduledBlockChange, PanicHandler>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, Time, PanicHandler>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, scheduled_block_change, terrain, time): Self::SystemData<'_>, )

source§

impl ServerEvent for DestroyEvent

Handle an entity dying. If it is a player, it will send a message to all other players. If the entity that killed it had stats, then give it exp for the kill. Experience given is equal to the level of the entity that was killed times 10.

§

type SystemData<'a> = DestroyEventData<'a>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

source§

impl ServerEvent for EnergyChangeEvent

§

type SystemData<'a> = Storage<'a, Energy, FetchMut<'a, MaskedStorage<Energy>>>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, energies: Self::SystemData<'_>, )

source§

impl ServerEvent for EntityAttackedHookEvent

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

Intended to handle things that should happen for any successful attack, regardless of the damages and effects specific to that attack

§

type SystemData<'a> = EntityAttackedHookData<'a>

source§

impl ServerEvent for ExplosionEvent

§

type SystemData<'a> = ExplosionData<'a>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

source§

impl ServerEvent for GroupManipEvent

§

type SystemData<'a> = (Read<'a, EntitiesRes>, Write<'a, GroupManager>, Read<'a, IdMaps>, Storage<'a, Group, FetchMut<'a, MaskedStorage<Group>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>, Storage<'a, MapMarker, Fetch<'a, MaskedStorage<MapMarker>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, group_manager, id_maps, groups, clients, uids, alignments, map_markers): Self::SystemData<'_>, )

source§

impl ServerEvent for HealthChangeEvent

§

type SystemData<'a> = HealthChangeEventData<'a>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

source§

impl ServerEvent for InitiateInviteEvent

§

type SystemData<'a> = (Write<'a, Trades>, Read<'a, Settings>, Read<'a, IdMaps>, Read<'a, GroupManager>, Storage<'a, PendingInvites, FetchMut<'a, MaskedStorage<PendingInvites>>>, Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, Invite, FetchMut<'a, MaskedStorage<Invite>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Group, Fetch<'a, MaskedStorage<Group>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (trades, settings, id_maps, group_manager, pending_invites, agents, invites, uids, clients, positions, groups, healths): Self::SystemData<'_>, )

source§

impl ServerEvent for InventoryManipEvent

§

type SystemData<'a> = InventoryManipData<'a>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

source§

impl ServerEvent for InviteResponseEvent

§

type SystemData<'a> = InviteResponseData<'a>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, data: Self::SystemData<'_>, )

source§

impl ServerEvent for KnockbackEvent

§

type SystemData<'a> = (Read<'a, EntitiesRes>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, PhysicsState, Fetch<'a, MaskedStorage<PhysicsState>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Vel, FetchMut<'a, MaskedStorage<Vel>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, clients, physic_states, mass, velocities): Self::SystemData<'_>, )

source§

impl ServerEvent for LandOnGroundEvent

§

type SystemData<'a> = (Read<'a, Time>, Read<'a, MaterialStatManifest, PanicHandler>, Read<'a, EventBus<HealthChangeEvent>>, Read<'a, EventBus<PoiseChangeEvent>>, Storage<'a, PhysicsState, Fetch<'a, MaskedStorage<PhysicsState>>>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (time, msm, health_change_events, poise_change_events, physic_states, character_states, masses, inventories, stats): Self::SystemData<'_>, )

source§

impl ServerEvent for MakeAdminEvent

§

type SystemData<'a> = (Storage<'a, Admin, FetchMut<'a, MaskedStorage<Admin>>>, Storage<'a, Player, Fetch<'a, MaskedStorage<Player>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (admins, players): Self::SystemData<'_>, )

source§

impl ServerEvent for MineBlockEvent

§

type SystemData<'a> = (Write<'a, BlockChange, PanicHandler>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Read<'a, MaterialStatManifest, PanicHandler>, Read<'a, AbilityMap, PanicHandler>, Read<'a, EventBus<CreateItemDropEvent>, PanicHandler>, Read<'a, EventBus<SoundEvent>, PanicHandler>, Read<'a, EventBus<Outcome>, PanicHandler>, Read<'a, ProgramTime, PanicHandler>, Read<'a, Time, PanicHandler>, Storage<'a, SkillSet, FetchMut<'a, MaskedStorage<SkillSet>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, terrain, msm, ability_map, create_item_drop_events, sound_events, outcomes, program_time, time, skill_sets, uids): Self::SystemData<'_>, )

source§

impl ServerEvent for NpcInteractEvent

§

type SystemData<'a> = (Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (agents, positions, uids): Self::SystemData<'_>, )

source§

impl ServerEvent for ParryHookEvent

§

type SystemData<'a> = (Read<'a, Time>, Read<'a, EventBus<EnergyChangeEvent>>, Read<'a, EventBus<PoiseChangeEvent>>, Read<'a, EventBus<BuffEvent>>, Storage<'a, CharacterState, FetchMut<'a, MaskedStorage<CharacterState>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Stats, Fetch<'a, MaskedStorage<Stats>>>, Storage<'a, Mass, Fetch<'a, MaskedStorage<Mass>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (time, energy_change_events, poise_change_events, buff_events, character_states, uids, stats, masses, inventories): Self::SystemData<'_>, )

source§

impl ServerEvent for PoiseChangeEvent

§

type SystemData<'a> = (Read<'a, EntitiesRes>, Storage<'a, CharacterState, Fetch<'a, MaskedStorage<CharacterState>>>, Storage<'a, Poise, FetchMut<'a, MaskedStorage<Poise>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, character_states, poises): Self::SystemData<'_>, )

source§

impl ServerEvent for RegrowHeadEvent

§

type SystemData<'a> = (Read<'a, EventBus<HealthChangeEvent>>, Read<'a, Time>, Storage<'a, Heads, FetchMut<'a, MaskedStorage<Heads>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (health_change_events, time, heads, healths): Self::SystemData<'_>, )

source§

impl ServerEvent for RemoveLightEmitterEvent

§

type SystemData<'a> = Storage<'a, LightEmitter, FetchMut<'a, MaskedStorage<LightEmitter>>>

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, light_emitters: Self::SystemData<'_>, )

source§

impl ServerEvent for RequestPluginsEvent

Send missing plugins to the client

§

type SystemData<'a> = (Read<'a, PluginMgr, PanicHandler>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (plugin_mgr, clients): Self::SystemData<'_>, )

source§

impl ServerEvent for RequestSiteInfoEvent

§

type SystemData<'a> = (Read<'a, IndexOwned, PanicHandler>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (index, clients): Self::SystemData<'_>, )

source§

impl ServerEvent for RespawnEvent

§

type SystemData<'a> = (Read<'a, SpawnPoint>, Storage<'a, Health, FetchMut<'a, MaskedStorage<Health>>>, Storage<'a, Combo, FetchMut<'a, MaskedStorage<Combo>>>, Storage<'a, Pos, FetchMut<'a, MaskedStorage<Pos>>>, Storage<'a, PhysicsState, FetchMut<'a, MaskedStorage<PhysicsState>>>, Storage<'a, ForceUpdate, FetchMut<'a, MaskedStorage<ForceUpdate>>>, Storage<'a, Heads, FetchMut<'a, MaskedStorage<Heads>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Hardcore, Fetch<'a, MaskedStorage<Hardcore>>>, Storage<'a, Waypoint, Fetch<'a, MaskedStorage<Waypoint>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (spawn_point, healths, combos, positions, physic_states, force_updates, heads, clients, hardcore, waypoints): Self::SystemData<'_>, )

source§

impl ServerEvent for SetLanternEvent

§

type SystemData<'a> = (Storage<'a, LightEmitter, FetchMut<'a, MaskedStorage<LightEmitter>>>, Storage<'a, Inventory, Fetch<'a, MaskedStorage<Inventory>>>, Storage<'a, Health, Fetch<'a, MaskedStorage<Health>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (light_emitters, inventories, healths): Self::SystemData<'_>, )

source§

impl ServerEvent for SetPetStayEvent

§

type SystemData<'a> = (Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, CharacterActivity, FetchMut<'a, MaskedStorage<CharacterActivity>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>, Storage<'a, Is<Mount>, Fetch<'a, MaskedStorage<Is<Mount>>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (agents, character_activities, positions, alignments, is_mounts, uids): Self::SystemData<'_>, )

source§

impl ServerEvent for SoundEvent

§

type SystemData<'a> = (Read<'a, EventBus<Outcome>, PanicHandler>, Storage<'a, Agent, FetchMut<'a, MaskedStorage<Agent>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (outcomes, agents, positions): Self::SystemData<'_>, )

source§

impl ServerEvent for StartTeleportingEvent

§

type SystemData<'a> = (Read<'a, Time>, Storage<'a, Teleporting, FetchMut<'a, MaskedStorage<Teleporting>>>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>, Storage<'a, Object, Fetch<'a, MaskedStorage<Object>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (time, teleportings, positions, objects): Self::SystemData<'_>, )

source§

impl ServerEvent for TeleportToEvent

§

type SystemData<'a> = (Read<'a, IdMaps>, Storage<'a, Pos, FetchMut<'a, MaskedStorage<Pos>>>, Storage<'a, ForceUpdate, FetchMut<'a, MaskedStorage<ForceUpdate>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (id_maps, positions, force_updates): Self::SystemData<'_>, )

source§

impl ServerEvent for TeleportToPositionEvent

§

type SystemData<'a> = (Read<'a, IdMaps>, Storage<'a, Is<VolumeRider>, FetchMut<'a, MaskedStorage<Is<VolumeRider>>>>, Storage<'a, Pos, FetchMut<'a, MaskedStorage<Pos>>>, Storage<'a, ForceUpdate, FetchMut<'a, MaskedStorage<ForceUpdate>>>, Storage<'a, Is<Rider>, Fetch<'a, MaskedStorage<Is<Rider>>>>, Storage<'a, Presence, Fetch<'a, MaskedStorage<Presence>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (id_maps, is_volume_riders, positions, force_updates, is_riders, presences, clients): Self::SystemData<'_>, )

source§

impl ServerEvent for ToggleSpriteLightEvent

§

type SystemData<'a> = (Write<'a, BlockChange, PanicHandler>, Read<'a, VolGrid2d<Chonk<Block, TerrainChunkSize, TerrainChunkMeta>>, PanicHandler>, Storage<'a, Pos, Fetch<'a, MaskedStorage<Pos>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (block_change, terrain, positions): Self::SystemData<'_>, )

source§

impl ServerEvent for UpdateMapMarkerEvent

§

type SystemData<'a> = (Read<'a, EntitiesRes>, Storage<'a, MapMarker, FetchMut<'a, MaskedStorage<MapMarker>>>, Storage<'a, Group, Fetch<'a, MaskedStorage<Group>>>, Storage<'a, Uid, Fetch<'a, MaskedStorage<Uid>>>, Storage<'a, Client, Fetch<'a, MaskedStorage<Client>>>, Storage<'a, Alignment, Fetch<'a, MaskedStorage<Alignment>>>)

source§

fn handle( events: impl ExactSizeIterator<Item = Self>, (entities, map_markers, groups, uids, clients, alignments): Self::SystemData<'_>, )

Implementors§