Class StatChangeProcessor
- Namespace
- RisingV.Core.Processors
- Assembly
- RisingV.Core.StatEngine.dll
Processes stat changes for entities and publishes events based on the type of entity and the reason for the stat change.
public class StatChangeProcessor : SourceToTargetEntityProcessor<StatChangeData>, IProcessor<StatChangeData, bool?>, IProcessor, IManageable<ProcessorManager>, IManageable
- Inheritance
-
StatChangeProcessor
- Implements
- Inherited Members
- Extension Methods
Properties
AnyEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> AnyEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
BossEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> BossEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
GatherableEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> GatherableEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
Log
protected override Logger Log { get; }
Property Value
MinionEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> MinionEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
PlayerEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> PlayerEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
UnitEventMap
public LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>> UnitEventMap { get; }
Property Value
- LazyMap<StatType, LazyMap<StatChangeReason, List<Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>>>>
Methods
CanProcess(StatChangeData, bool)
Determines whether the processor can handle the given event and whether it is a post-processing event.
public override bool CanProcess(StatChangeData @event, bool isPost)
Parameters
eventStatChangeDataThe event to process.
isPostboolIndicates whether the event is a post-processing event.
Returns
- bool
true if the processor can handle the event; otherwise, false.
GetSourceEntity(StatChangeData)
Gets the source entity from the event.
protected override Entity GetSourceEntity(StatChangeData @event)
Parameters
eventStatChangeDataThe event containing the source entity.
Returns
- Entity
The source entity.
GetTargetEntity(StatChangeData)
protected override Entity GetTargetEntity(StatChangeData @event)
Parameters
eventStatChangeData
Returns
- Entity
OnAnyTarget(Entity, Entity, StatChangeData, bool)
Called for any target entity, regardless of type.
protected override void OnAnyTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
OnBossTarget(Entity, Entity, StatChangeData, bool)
Called for boss target entities.
protected override bool OnBossTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
Returns
- bool
Returns true if the event was handled, otherwise false.
OnGatherableTarget(Entity, Entity, StatChangeData, bool)
Called for gatherable target entities.
protected override bool OnGatherableTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
Returns
- bool
Returns true if the event was handled, otherwise false.
OnMinionTarget(Entity, Entity, StatChangeData, bool)
Called for minion target entities.
protected override bool OnMinionTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
Returns
- bool
Returns true if the event was handled, otherwise false.
OnPlayerTarget(Entity, Entity, StatChangeData, bool)
Called for player target entities.
protected override bool OnPlayerTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
Returns
- bool
Returns true if the event was handled, otherwise false.
OnUnitTarget(Entity, Entity, StatChangeData, bool)
Called for unit target entities.
protected override bool OnUnitTarget(Entity sourceEntity, Entity targetEntity, StatChangeData @event, bool isPost)
Parameters
sourceEntityEntityThe source entity that initiated the event.
targetEntityEntityThe target entity that the event is being processed for.
eventStatChangeDataThe event being processed.
isPostboolIndicates whether this is a post-processing event.
Returns
- bool
Returns true if the event was handled, otherwise false.
RegisterAnyEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for any entity type and stat change reason.
public void RegisterAnyEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.
RegisterBossEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for boss entities and a specific stat change reason.
public void RegisterBossEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.
RegisterGatherableEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for gatherable entities and a specific stat change reason.
public void RegisterGatherableEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.
RegisterMinionEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for minion entities and a specific stat change reason.
public void RegisterMinionEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.
RegisterPlayerEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for player entities and a specific stat change reason.
public void RegisterPlayerEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.
RegisterUnitEvent(StatType, StatChangeReason, Func<Entity, Entity, StatChangeData, StatChangedEvent>)
Registers an event factory for unit entities and a specific stat change reason.
public void RegisterUnitEvent(StatType type, StatChangeReason reason, Func<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent> factory)
Parameters
typeStatTypeThe type of stat that is changing.
reasonStatChangeReasonThe reason for the stat change.
factoryFunc<Entity, Entity, StatChangeData, EventBridge.StatChangedEvent>The factory function that creates the event.