de.eventhorizongilde.ehfs.milestone
Class AbstractUnitAuraMilestone

java.lang.Object
  extended by de.eventhorizongilde.ehfs.milestone.AbstractMilestone
      extended by de.eventhorizongilde.ehfs.milestone.AbstractFilterMilestone
          extended by de.eventhorizongilde.ehfs.milestone.AbstractUnitAuraMilestone
All Implemented Interfaces:
IMilestone

public abstract class AbstractUnitAuraMilestone
extends AbstractFilterMilestone

A milestone that tracks unit auras.

To use this class it must be instantiated with a unit filter and one or more spell ID(s). Also, either unitAuraApplied(String, int, int) or unitAuraApplied(String, int, int, int) should be overriden to create any annotations.


Constructor Summary
protected AbstractUnitAuraMilestone(AbstractUnitFilter unitFilter, int... spellIds)
          Creates a new unit aura milestone.
 
Method Summary
protected  void eventHappened(String key, CombatEvent event)
          Informs the milestone that an event happened during the fight.
 void fightEnded(long time)
          

Informs the milestone that parsing of a fight has ended.

This implementation does nothing.

protected  void unitAuraApplied(String unitGuid, int startSeconds, int endSeconds)
          Informs the milestone that an aura has been gained by a unit.
protected  void unitAuraApplied(String unitGuid, int spellId, int startSeconds, int endSeconds)
          Informs the milestone that an aura has been gained by a unit.
 
Methods inherited from class de.eventhorizongilde.ehfs.milestone.AbstractFilterMilestone
addFilter, addFilter, eventHappened, removeFilter, removeFilter
 
Methods inherited from class de.eventhorizongilde.ehfs.milestone.AbstractMilestone
addAnnotation, deactivate, getAnnotationGroup, getParseContext, setColorKeyId, setParseContext, toSeconds, toSeconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUnitAuraMilestone

protected AbstractUnitAuraMilestone(AbstractUnitFilter unitFilter,
                                    int... spellIds)

Creates a new unit aura milestone.

The unit filter's event unit must always be EventUnit.DESTINATION since it's always the event's destination that is gaining an aura (or an aura is fading from.)

Parameters:
unitFilter - the unit filter that must match for fight events
spellIds - the spell ID(s) that must match for fight events
Method Detail

eventHappened

protected void eventHappened(String key,
                             CombatEvent event)
Informs the milestone that an event happened during the fight. This method is invoked only if there are any event filters associated with keys. This implementation does nothing, subclasses are expected to override.

Overrides:
eventHappened in class AbstractFilterMilestone
Parameters:
key - the key that a filter has been associated with
event - the fight event
See Also:
AbstractFilterMilestone.addFilter(String, IEventFilter)

unitAuraApplied

protected void unitAuraApplied(String unitGuid,
                               int startSeconds,
                               int endSeconds)
Informs the milestone that an aura has been gained by a unit.

Parameters:
unitGuid - the unit's GUID
startSeconds - the time when the aura was gained
endSeconds - the time when the aura has faded

unitAuraApplied

protected void unitAuraApplied(String unitGuid,
                               int spellId,
                               int startSeconds,
                               int endSeconds)

Informs the milestone that an aura has been gained by a unit.

This method simply invokes unitAuraApplied(String, int, int). Subclasses may override.

Parameters:
unitGuid - the unit's GUID
spellId - the ID of the aura's spell
startSeconds - the time when the aura has been gained
endSeconds - the time when the aura has faded

fightEnded

public void fightEnded(long time)

Informs the milestone that parsing of a fight has ended.

This implementation does nothing. Subclasses may override.

Specified by:
fightEnded in interface IMilestone
Overrides:
fightEnded in class AbstractMilestone


Event Horizon Fight Statistics