Commit Graph

47 Commits

Author SHA1 Message Date
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
NoM0Re cfc26d8c99 Fix incorrect login message, rework LibGroupTalentsWrapper
The login message was triggered incorrectly due to the "Beta" tag in the version string. This has been fixed.

Almost completely removed due to impracticality with the 3.3.5a API.
When RAID_ROSTER_UPDATE or PARTY_MEMBERS_CHANGED fires, data is unavailable for ~1.5 seconds.
If these events fire again within that time, the timer needs to be restarted, leading to excessive code complexity and requiring handling for every edge case.
Instead, we now simply check if the unit has changed when the library fires its callback.
2025-02-19 01:45:04 +01:00
NoM0Re 02fe8164f6 from retail 2025-02-16 20:50:05 +01:00
NoM0Re 5d1ac74d27 Rework LibGroupTalents now also returns function returns additionally, add Spec Role triggers to load/generic/bt2, fix WeakAuras.GetRegion
- **WeakAuras.SpecForUnit(unit)** = Returns: `classFileName..spec`, `Dominant Tree`, `spent1`, `spent2`, `spent3`
- **WeakAuras.GetUnitRole(unit)** = Returns one of: `"melee"`, `"caster"`, `"healer"`, `"tank"`
- **WeakAuras.SpecRolePositionForUnit(unit)** = Returns: `Dominant Tree`, `spent1`, `spent2`, `spent3`
- **WeakAuras.CheckTalentForUnit(unit, talentId)** = Returns: `"Points spent"` in talent or `nil`
- **WeakAuras.CheckGlyphForUnit(unit, glyphId)** = Returns: `true` if the player has the glyph associated with `spellID` or `spellName`, we can only see the glyphs of players running `LibGroupTalents-1.0`
2025-02-11 00:12:30 +01:00
NoM0Re f3a7bb8993 from retail 2025-02-09 14:21:45 +01:00
NoM0Re d3c8a9bf3e Make LibGroupTalents work now, but still requires regressions
Arguments might still shut be shared from the original call for custom auras.
More functions need to be added to prototypes.
Documentation is needed soon.
2025-02-06 21:31:45 +01:00
NoM0Re 8e07a6495c from retail 2025-01-27 03:28:33 +01:00
NoM0Re 1152abe6a5 from retail 2025-01-25 17:45:42 +01:00
NoM0Re bd4cba924f from retail 2025-01-25 16:14:11 +01:00
NoM0Re 3fcb60f399 from retail 2025-01-24 18:12:49 +01:00
NoM0Re 4ed4d4159b from retail 2025-01-23 19:40:40 +01:00
NoM0Re dccd22b610 from retail 2025-01-19 14:27:20 +01:00
NoM0Re 89a247addb from retail 2025-01-17 17:37:35 +01:00
NoM0Re 794d8eef84 from retail 2025-01-11 20:23:49 +01:00
NoM0Re a747346a9d from retail 2025-01-10 16:16:47 +01:00
NoM0Re a5dbbd2640 Clean up WeakAuras table and remove members that no one should touch 2025-01-09 15:14:12 +01:00
NoM0Re 988145737d from retail 2025-01-08 00:24:04 +01:00
NoM0Re 2f96cddc7d readd function WeakAuras.IsCorrectVersion due to ElvUI_AddonSkins requiring it 2025-01-07 21:06:03 +01:00
NoM0Re 7a185106f2 from retail 2025-01-06 19:47:37 +01:00
NoM0Re 8375cfa0a7 from retail 2025-01-06 12:53:01 +01:00
NoM0Re 86e98d6bcf Update general layout of WeakAurasOptions (#8)
* from retail

* (fix) improve pixel snapping by reapplying borders

* update spinbox texture

* add icons, loaded, standby, unloaded behavior from retail

* further use of ported inputbox and cleanup to ported frames

* move templates into WeakAuras and upversion
2025-01-04 19:33:14 +01:00
NoM0Re afa66ff265 add DummyPRDFrame, multiple Prototype Load Functions, Fix queued function in loginQueue, Refactor unit check and awesome detection 2024-12-29 13:28:40 +01:00
NoM0Re 13f734038d Multientry (#7)
* from retail

* from retail

* from retail

* from retail

* from retail

* from retail

* remove new threat functions as they are not well implemented for now
2024-11-27 12:09:02 +01:00
NoM0Re 9bc27cada2 add handling for non awesome_wotlk user 2024-07-01 19:37:29 +02:00
Bunny67 5b388e15f9 version 2022-05-19 22:06:12 +03:00
Bunny67 e7e789686a from retail 2022-05-19 22:04:17 +03:00
Bunny67 5508ecf9a7 3.2.3 2021-05-04 16:49:16 +03:00
Bunny67 e31928069c 3.2.1 2021-03-10 08:12:41 +03:00
Bunny67 0c4ecc60a2 from retail 2021-01-21 00:26:49 +03:00
Bunny67 71792748c4 from retail 2020-12-30 21:41:03 +03:00
Bunny67 e0672fe539 from retail 2020-12-27 05:57:15 +03:00
Bunny67 7cbc40c959 beta 2020-11-15 23:43:10 +03:00
Bunny67 0f4f16b6f0 beta 2020-09-16 23:06:44 +03:00
Bunny67 47e81f3d70 WeakAuras.Mixin 2020-09-16 23:03:25 +03:00
Bunny67 969ef6edf8 beta 2020-09-16 23:03:25 +03:00
Bunny67 9956fb7ede beta 2020-09-16 23:03:25 +03:00
Bunny67 02c047002d beta 2020-09-16 23:03:25 +03:00
Bunny67 c459ad513e version 2020-08-03 19:15:42 +03:00
Bunny67 d5c19a28e5 from retail 2020-07-12 02:03:03 +03:00
Bunny67 6a7003b535 from retail 2020-07-11 00:19:17 +03:00
Bunny67 fdee459c77 2.17.8 2020-07-01 18:05:24 +03:00
Bunny67 7e15296d21 abandon C_Timer 2020-06-29 18:45:14 +03:00
Bunny67 de72394bda from retail 2020-06-09 23:31:40 +03:00
Bunny67 b2cede99f0 change C_Timer 2020-06-03 16:43:25 +03:00
Bunny67 f2e1a0928d init 2020-06-02 23:40:06 +03:00