Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Events Passed to Plugins #160

Closed
Databean opened this issue Oct 22, 2013 · 1 comment
Closed

Duplicate Events Passed to Plugins #160

Databean opened this issue Oct 22, 2013 · 1 comment

Comments

@Databean
Copy link

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.

@GraylinKim
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants