Closed Databean closed 10 years ago
Ah, good catch. AbilityEvent should be an abstract event type for this to work as intended; currently it is not. I'm not sure how I overlooked this issue. I'll have to patch the events and properly separate the two concepts.
https://github.com/GraylinKim/sc2reader/blob/master/sc2reader/engine/engine.py#L197
The series of if statements causes some handlers to be double-added, e.g. using something like handleAbilityEvent will get matched both by the specific if on line 207 and the catch-all if at line 211 at the end, and be added to the handlers list twice. Events passed through the handlers will then get passed to those handlers twice.