Function veloren_common::combat::permit_pvp
source ยท pub fn permit_pvp(
alignments: &ReadStorage<'_, Alignment>,
players: &ReadStorage<'_, Player>,
entered_auras: &ReadStorage<'_, EnteredAuras>,
id_maps: &IdMaps,
attacker: Option<Entity>,
target: Entity,
) -> bool
Expand description
Function that checks for unintentional PvP between players.
Returns false
if attack will create unintentional conflict,
e.g. if player with PvE mode will harm pets of other players
or other players will do the same to such player.
If both players have PvP mode enabled, interact with NPC and
in any other case, this function will return true