-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Optimization for running trigger function less often #5079
Conversation
b49b3df
to
9a8dcf3
Compare
An experimental build of WeakAuras with the changes in this pull request is available here. |
WeakAuras/GenericTrigger.lua
Outdated
local separatorPosition = composedEvent:find(":", 1, true) | ||
return separatorPosition == nil and composedEvent or composedEvent:sub(1, separatorPosition - 1) | ||
end | ||
|
||
---@param event string | ||
---@param arg1? any | ||
---@param arg2? any | ||
---@param ... any | ||
function WeakAuras.ScanEvents(event, arg1, arg2, ...) | ||
local orgEvent = event; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orgEvent is unused.
WeakAuras/Prototypes.lua
Outdated
@@ -5665,7 +5695,7 @@ Private.event_prototypes = { | |||
loadFunc = function(trigger) | |||
trigger.itemName = trigger.itemName or 0; | |||
local itemName = type(trigger.itemName) == "number" and trigger.itemName or "[["..trigger.itemName.."]]"; | |||
WeakAuras.WatchItemCooldown(trigger.itemName); | |||
WeakAuras.WatchItemCooldown(itemName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't look correct, the line above potentially adds "[[" around the name.
…iggers: - Spell Activation Overlay - Cooldown Progress (Spell) - Cooldown Ready (Spell) - Charges Changed - Cooldown Progress (Item) - Cooldown Progress (Equipment Slot) - Cooldown Ready (Item) - Action Usable For Spell triggers, a new loadInternalEventFunc function was added to generate internal_events when aura load instead of when it's added This is meants to make sure the internal event use the same spell name as the loadFunc. Otherwise GetSpellInfo could translate spell to a different one if a talent overload the spell and transform it to a new one
No description provided.