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

Optimization for running trigger function less often #5079

Merged
merged 6 commits into from
May 31, 2024

Conversation

mrbuds
Copy link
Contributor

@mrbuds mrbuds commented May 13, 2024

No description provided.

@mrbuds mrbuds force-pushed the optimization branch 4 times, most recently from b49b3df to 9a8dcf3 Compare May 14, 2024 02:55
@mrbuds mrbuds added the 🆕 Feature Preview This is a draft intended to show a preview of an upcoming feature. label May 15, 2024
Copy link

github-actions bot commented May 15, 2024

An experimental build of WeakAuras with the changes in this pull request is available here.
Build Time: Fri May 31 16:11:30 UTC 2024

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orgEvent is unused.

@@ -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);
Copy link
Contributor

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
@InfusOnWoW InfusOnWoW merged commit afe2b82 into WeakAuras:main May 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 Feature Preview This is a draft intended to show a preview of an upcoming feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants