HarmPermission

Raise

This Event is raised when a Player tries to Hurt another Player in some way

It is also called when a Player shoots a Dummy

This is not the Actual Damage Event.

Usage

This Event should be used when a Plugin or Module wants to change the friendly fire behavior of the Game in some way.

An Example would be Pets: an MTF could shoot a ClassD Pet even when the Owner of the Pet is also an MTF, so you maybe want to disallow the killing of the Pet in this Case

HarmPermissionEvent

EventArgsTypeDescription

Allow

bool

Whether the Attacker is allowed to damage the Victim

Attacker

SynapsePlayer

The Player who attacks another Player

Victim

SynapsePlayer

The Player that is being attacked

public class HarmPermissionEvent : IEvent
{
    public HarmPermissionEvent(SynapsePlayer attacker, SynapsePlayer victim, bool allow)
    {
        Victim = victim;
        Attacker = attacker;
        Allow = allow;
    }
    
    public bool Allow { get; set; }
    
    public SynapsePlayer Attacker { get; }
    
    public SynapsePlayer Victim { get; }
}

Last updated