Commit Graph

9 Commits

Author SHA1 Message Date
NoM0Re a595ef2a4a 5.19.7 2025-04-04 09:55:04 +02:00
NoM0Re 6cdfcac1b1 5.19.6 2025-04-03 21:03:11 +02:00
NoM0Re 3c574cb4a6 5.19.5
No new features this release, just fixes to some minor bugs.
2025-03-14 00:48:30 +01:00
NoM0Re 04233722ee 5.19.4 and fix #20 2025-02-27 07:49:48 +01:00
NoM0Re 7c7869494e 5.19.3
Add methods to the states/allstates table that helps with creating,
updating or remove states in an optimized way

## Advantage of using this function instead of doing a states[key] = {
... }

- If already created, update existing state, and return true if any
value was changed, this can help reduce amount of resources an aura use

- Automatically `return true` when using these functions and any change
was made

## Examples

```Lua
function(states, event, ...)
    if event == "PLAYER_TARGET_CHANGED" then
        if UnitExists("target") then
            -- if state exists it's updated, not replaced
            -- show & changed fields can be skipped
            states:Update("", {
                    name = UnitName("target"),
                    duration = 5,
                    expirationTime = GetTime() + 5,
                    progressType = "timed",
                    autoHide = true
            })
        else
            -- wipe
            states:RemoveAll()
        end
    end
    -- no need to return true
end
```

with clones

```Lua
function(states, event, ...)
    local currentEssence = UnitPower("player", Enum.PowerType.Essence)
    local maxEssence = UnitPowerMax("player", Enum.PowerType.Essence)
    for i = 1, 6 do
        if i > maxEssence then
            states:Remove(i) -- wipe allstates[6]
        else
            local value = currentEssence >= i and 1 or 0
            local newState = {
                progressType = "static",
                value = value,
                total = 1
            }
            states:Update(i, newState)
        end
    end
    -- no need to return true
end
```
2025-02-24 22:10:45 +01:00
NoM0Re ac56d8816a Version Bump to 5.19.2, Introduce Talent Widget in Load, Rework Talent Known Trigger 2025-02-23 01:21:25 +01:00
Bunny67 273a3d30f3 correct model paths 2020-06-22 17:17:32 +03:00
Bunny67 de72394bda from retail 2020-06-09 23:31:40 +03:00
Bunny67 f2e1a0928d init 2020-06-02 23:40:06 +03:00