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

Added ce_hitevents_healing_crossbow_only #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dalegaard
Copy link
Contributor

When broadcasting, showing all healing events in combattext doesn't look
particularly good. ce_hitevents_healing_crossbow_only stops the combat
text from showing player_healed events, but instead shows all
crossbow_heal events as if they were player_healed events.

Because we are hooking the FireGameEvent method on the
CDamageAccountPanel, we wouldn't normally receive crossbow_heal
events. We utilize our hook on CDamageAccountPanel::ShouldDraw to
catch the first invocation on a given CDamageAccountPanel instance and
subscribe to the event here.

We then add relevant checks and paths in our FireGameEvent hook. When
we encounter a crossbow_heal event, and crossbow-only mode is set, we
create a new player_healed event with matching data and send this to
the original CDamageAccountPanel::FireGameEvent method.

When broadcasting, showing all healing events in combattext doesn't look
particularly good. `ce_hitevents_healing_crossbow_only` stops the combat
text from showing `player_healed` events, but instead shows all
`crossbow_heal` events as if they were `player_healed` events.

Because we are hooking the `FireGameEvent` method on the
CDamageAccountPanel, we wouldn't normally receive `crossbow_heal`
events. We utilize our hook on `CDamageAccountPanel::ShouldDraw` to
catch the first invocation on a given `CDamageAccountPanel` instance and
subscribe to the event here.

We then add relevant checks and paths in our `FireGameEvent` hook. When
we encounter a `crossbow_heal` event, and crossbow-only mode is set, we
create a new `player_healed` event with matching data and send this to
the original `CDamageAccountPanel::FireGameEvent` method.
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

Successfully merging this pull request may close these issues.

1 participant