Table of Contents

Interface IHarmRelation

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

One feature's say in who may harm whom: the arena's teams, wildlife, companions (party, guild, one's own pet), faction standing. HarmRule asks the relations in Order; the first that decides wins.

public interface IHarmRelation

Remarks

A feature declares its relation with [assembly: HarmRelation(typeof(MyRelation))], so removing the feature (a module's folder) removes its say and nothing else: with no relation deciding, a hit is allowed. Relations are asked with each side's principal (Principal(ICharacter): a pet answers as its owner).

Properties

AggressionLiftsRefusal

True when this relation's refusal is lifted by the attacking side turning its aggression toggle on (the factions' "not an enemy" refusal). False for refusals no toggle changes: an arena's teams, a pack, companions.

bool AggressionLiftsRefusal { get; }

Property Value

bool

Order

Lower is asked first. The built-ins: arena 100, wildlife 200, companions 300, factions 400.

int Order { get; }

Property Value

int

Methods

Judge(ICharacter, ICharacter)

This relation's say about attacker harming defender (two different sides).

HarmJudgement Judge(ICharacter attacker, ICharacter defender)

Parameters

attacker ICharacter
defender ICharacter

Returns

HarmJudgement

OnAllowed(ICharacter, ICharacter)

A hit between two different sides was allowed and is about to land (each relation hears it, whoever decided).

void OnAllowed(ICharacter attacker, ICharacter defender)

Parameters

attacker ICharacter
defender ICharacter

OnRefusedAttack(ICharacter, ICharacter, long, IHarmRelation)

A hit was refused at the character an attack cast actually struck (never area splash): refusedBy is the relation that refused it. Each relation hears it.

void OnRefusedAttack(ICharacter attacker, ICharacter defender, long castKey, IHarmRelation refusedBy)

Parameters

attacker ICharacter
defender ICharacter
castKey long
refusedBy IHarmRelation