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

Add baseline custom event for talent change #4551

Closed
Nikyou opened this issue Jul 26, 2023 · 2 comments
Closed

Add baseline custom event for talent change #4551

Nikyou opened this issue Jul 26, 2023 · 2 comments
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.

Comments

@Nikyou
Copy link

Nikyou commented Jul 26, 2023

Is your feature request related to a problem? Please describe.
If you want to check if someone has changed talents, you need to listen to the event UNIT_SPELLCAST_SUCCEEDED and check for spellId == 384255.

Describe the solution you'd like
(My solutions might not be optimal, feel free to implement them your way) Create an invisible WA with a custom trigger that listens to UNIT_SPELLCAST_SUCCEEDED and checks spellId == 384255, if true execute WeakAuras.ScanEvents("WA_UNIT_CHANGED_TALENTS", unit)

Describe alternatives you've considered
Create or use existing WA frame, make it listen for the UNIT_SPELLCAST_SUCCEEDED event (f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")) and add/update OnEvent method:

f:SetScript("OnEvent", function(__, event, unit, spellId, ...)
  if event == "UNIT_SPELLCAST_SUCCEEDED" and spellId == 384255 then
    WeakAuras.ScanEvents("WA_UNIT_CHANGED_TALENTS", unit)
  end
end)

Additional context
This custom event will make it more convenient to track if someone in your party/raid changes talents. In addition to UNIT_SPELLCAST_SUCCEEDED it is possible to track talent change via CLEU:SPELL_CAST_SUCCESS and send GUID via WeakAuras.ScanEvents("WA_GUID_CHANGED_TALENTS", sourceGUID).

@Nikyou Nikyou added the 🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature. label Jul 26, 2023
@mrbuds
Copy link
Contributor

mrbuds commented Jul 26, 2023

You are asking a solution to something that is not a problem

@mrbuds mrbuds closed this as completed Jul 26, 2023
@mrbuds
Copy link
Contributor

mrbuds commented Jul 26, 2023

Btw if your trigger has to do something on UNIT_SPELLCAST_SUCCEEDED + spellId == 384255, then do it when this event happen, calling WeakAuras.ScanEvents to make an other call of the same function is not good practice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants