Skip to content

fixes #5817

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

Merged
merged 2 commits into from
Apr 12, 2025
Merged

fixes #5817

merged 2 commits into from
Apr 12, 2025

Conversation

mrbuds
Copy link
Contributor

@mrbuds mrbuds commented Apr 11, 2025

No description provided.

@mrbuds
Copy link
Contributor Author

mrbuds commented Apr 11, 2025

Example aura for the states:Replace function:

!WA:2!9vvWUTXnquj7dPyBrHIAGbkqoSqaTWn1WhYHCiabiALxz7czj3vRTtakGm3LC1Y4vKeKCTLDrpeFkN9NGUvGEsFccO98cH(f4pb3FGoKRKCAQriGejNHZmVzMh5wTD9r1X1XFyZj0yoRppxgtEAL5OCDkx2tOPCMYzkc)UCLMGpanET73qzRjVSxsIIO371J7(NVUsLQtrSyWYd5uMoQLF3q)G5XCEgMFbR)fub50zl36JhssLOyBmErGsJKANOekJQsD8GjTZ1AjD4qIu91FVCXY)YtFPGefdqGp6wvEe5Cct3ppjHoE6Gwn7hoOFyZGWaR8O9iOmDQxo4Tirg6sICLnhkjGnb9p0VtNRvcsw2(yLtXJhx1njNzH1MaO0e1wUwd(bhxyqtk35(Qx524WonFRFqze93zWb9oE)U72WvNsy2dBgL(4LhjWW8MnASL7VUs3YbYfC2ioVXw)pvrgvjGQvA(TsGqYuKhcmaw21pCqR9A2Dx)DEyWeqGIr8Nfnz8SpcnlJjd7a)cyOreLtqCkj(SINmTSBmW0zMAJqUnzlRZkXp(GLj3heVtWKiOzgcUsUNFNdBFuNBYzlA(oIhB4lNtcl3Faht(Jk3bCnIKHYogykqx73Vvi5dLeLQKp)SNwzTBuKSelRS4rqiuiDUeqy6eGneqgAOGpBJIAZHTrO4Zgk55m8h2quxtgRhOsraJ9nLC9QIV1k0(xcxocbhyXcpgNrUzL6zOx6(DOFHfbtrIAFKVAXZ4YFQA1QRFBP0LWZR5rH9eFJviClKdoLgFcfdK4MW27kJkDmbBf((5Lx4E7cSnZQ3CbLMCjKQsUPDecc962RR)daD0IffBxutcPVr3e7bITyCDyCZcdyArT2s6vU)Cocd1pKBy4)PeTegZTYUGlXNirIRpzXIs0DovrJYiNoFLxTD7Ehf2z)U(ZktObct1ygieOiE9cd7DW9NVp9kYjlY8ptxjAvQfLsOdt1V3lJJWhhPrzaXCJGr5zAQZD5kYaclgA5apIItdIZqk1gfDD8G3fIlxaH0SqudoDZfpbAFrm9tfrzPtKwoLjV8mpS(8CkE6UzxTROVYxG7E3zeIOPX56aObZtNszLyfSYP44tfpz5ZKME3oufcQy4uVR48rvdqzIu06t084ZlP8FXw)tdkoAaK(kTOoGNwlmhUIarGC60ejCNTV201w)UYsxBJidgJ63kW3VBWfwkvea4e6qhjLzCpbQh3ZeqmAjkFrXx2EgbPm(KWgQtFurTITNJn3Ra12hdaJbFHvxBoNjqfB7ncrzTlO2tx8UIZkYG5V6tLmXyhT8ZpxVSuCQC8Yp3WJUOcmQRE(oKZRF(F)M)9p

@@ -43,30 +43,52 @@ local removeAll = function(states)
return changed
end

local function recurseUpdate(t1, t2)
local skipKeys = {
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't quite understand the point of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It fixes the bug with

function(states, event, updatedTriggerNumber, state)
    if event == "TRIGGER" and state then
        states:Update("", state[""])
    end
end

copying state[""].trigger into states[""].trigger which resulted in WeakAurasOptions replacing the custom trigger view with a copy of the view of an other trigger, cf https://discord.com/channels/172440238717665280/598903823800467496/1360233139452121088

Copy link
Contributor

@emptyrivers emptyrivers left a comment

Choose a reason for hiding this comment

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

the trigger/triggernum thing is a fine temp fix IMO, do you want to rebase/squash before merging?

mrbuds added 2 commits April 12, 2025 22:32
new functions:
states:Replace(key, newState) works like the Update function but set to nil fields missing in the new table
states:Get:(key, field?) returns a state table, or one of it's fields if the parameter "field" is set, returns nil if it doesn't exists

bug fixes:
recurseUpdate should copy content of new tables instead of it's address
don't copy the fields trigger & triggernum into allStates (this needs to be properly addressed)
@emptyrivers emptyrivers merged commit 67f6f8c into WeakAuras:main Apr 12, 2025
3 checks passed
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.

3 participants