-
Notifications
You must be signed in to change notification settings - Fork 1
Description
This is less an issue, but more just documentation of what i am currently doing and what my intentions are.
The way Combatlog Events are currently being parsed and instantiated is... annoying? Idk how to best say it, but the implementation required manually adding the new EventTypeName() call to a very long switch statement. It looked bad, felt bad, and was weird and tedious to work with.
I am moving to a new system based on reflection and attributes.
The parserCore now has a dictionary string->Type which associates event names with a type that represents that event within this project. These classes are "tagged" with the CombatlogEventAttribute.
Upon the first attempt of parsing an event, the ParserCore (renamed class CombatLogParser) will find all such event types within the assembly, and register them in that dictionary.
Data in these event types is then set via an abstract method that takes the combatlog line as an argument.