From 89cd28e428292e493248c26b57dabd5cc81a2b1e Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 03:27:46 +0100 Subject: [PATCH 1/9] Design healer buffs out of the box Research on rank IDs, RAID_IN_COMBAT coverage on Forever, HealKit/EllesmereUI/HealBot approaches, and a plan for a generated buff catalogue, rank-proof slots, default heal filter and presets. --- todos/10-design-healer-buffs.md | 144 ++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 todos/10-design-healer-buffs.md diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md new file mode 100644 index 0000000..5d10b58 --- /dev/null +++ b/todos/10-design-healer-buffs.md @@ -0,0 +1,144 @@ +# Design: Healer buffs out of the box + +Status: proposal (research done, nothing implemented). Targets Forever Interface 16001, build 1.60.1.70862. + +## Problem + +A druid healer's Rejuvenation never showed on the tank's ClickGrid cell. Nothing +healer-related is on by default: + +- ClickGrid member `auras.buffs` ships `enabled = false` (filter "My heals over time"). +- The three fixed friendly buff slots ship `enabled = false` with an empty spell ID list. +- A slot matches **exact** aura spell IDs. Rejuvenation has 11 learnable ranks + (774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299). Typing the + ID from a wiki or a tooltip of rank 1 misses every other rank. + +## Findings + +### `RAID_IN_COMBAT` does not cover the ranks players cast + +Our "My heals over time" filter is `HELPFUL|PLAYER|RAID_IN_COMBAT`. That flag +comes from the `SpellAuraVisibility` DB2 (Type 0 = RaidInCombat). On build +1.60.1.70862 it is set on: + +| Spell | Flagged IDs | Learnable ranks (SkillLineAbility) | +|---|---|---| +| Rejuvenation | 417057–417062 … (11, **not** skill-line spells) | 774 … 25299 — **not flagged** | +| Regrowth | 436937 … (9, not skill-line) | 8936 … 9858 — **not flagged** | +| Renew | 425268–425277 (skill-line) | 139 … 25315 — **not flagged** | +| Lifebloom, Wild Growth, Prayer of Mending (401877 …), Temporal Beacon | flagged | — | +| Riptide, Power Word: Shield, Earth Shield | **not flagged** | — | + +So even a user who switches the member buffs on can miss classic-rank HoTs, +and shields never pass. Needs one in-game check of which set a druid's +spellbook casts (see Verification). + +### Both ID sets belong to one family + +`SpellClassOptions` gives the same class set and mask to every rank of a spell, +flagged or not (Rejuvenation: set 7, mask 16; Renew: set 6, mask 64; Regrowth: +set 7, mask 64). `scripts/spell_catalog.py` already groups DoT ranks into +families this way. A heal classifier on the same tables finds (prototype in +`.beluga/scratch/proto/hot_probe.py`): + +- HoTs (`EffectAura` 8 on an ally): Rejuvenation 11, Regrowth 9, Renew 20, + Lifebloom, Riptide 3, Lightwell Renew, Flash of Light HoT. +- Absorbs (`EffectAura` 69): Power Word: Shield 10, Ice Barrier, Fire/Frost Ward, + Shadow Ward. +- Missed by effect rules, need a short hand list: Earth Shield (proc aura), + Prayer of Mending (buff lands under 401877 …), Wild Growth (non-skill-line). + +### How others do it + +- **HealKit** (`examples/HealKit`): one Blizzard `AuraContainer` per corner with + `HELPFUL|PLAYER`, `candidateFilters = { maxDuration = 60, excludeSpellIDs = }`. + Zero config, works in combat, no spell lists. Debuff corner `HARMFUL|PLAYER`, + dispel corner `HARMFUL|RAID`. +- **EllesmereUI** (all rights reserved: ideas only, no code): spell → filter → + indicator. Hand-curated Forever catalogue (`EllesmereUI_BuffPresets.lua`) + lists rank 1 as primary and every other rank as alts. Presets: Defensives, + Raid CDs, Externals, Core Healing Buffs, Offensive CDs, Movement, Utility, + Consumables. Healer starter seed: "Defensives & Utility" centre (any caster), + "Core Healing Buffs" top left and "Lesser" top right (own only). Indicator + kinds: icon, square, health-bar colour, background colour, border, frame alpha. +- **HealBot** (`examples/HealBot`, its `16001` TOC; Forever path behind + `HEALBOT_FOREVER`, "camelot" = Mainline 12.1.5 API): matches HoTs by name + from the 774-set ranks, never the 417057 set. A hint that players cast the + unflagged ranks. +- **Blizzard Forever party frames**: `HELPFUL|RAID` for castable buffs when the + `showCastableBuffs` CVar is on. + +Sources read on their Forever paths: EllesmereUI has no Forever branch; `main` +targets `16001` among retail builds and gates Forever behind `IS_FOREVER` +(`ForeverCatalogue()`, `EllesmereUI_Migration.lua` FvBW starter seed). HealKit +targets `16001` only. Blizzard code from `examples/wow-ui-source-forever`. + +`AuraContainer` candidate filters are spell-ID only (`includeSpellIDs`, +`excludeSpellIDs`, dispel types, `maxDuration`); no name matching. Any preset +must therefore expand to every rank ID. + +## Proposal + +### 1. Generated buff catalogue + +Extend `scripts/spell_catalog.py` to also emit `UnitFrames/Tracking/BuffCatalog.lua` +(generated, never hand-edited) from the same pinned tables plus +`SpellAuraVisibility`: + +``` +ns.BuffCatalog = { + families = { [774] = { name = "Rejuvenation", class = "DRUID", kind = "hot", ids = { 774, …, 417057, … } }, … }, + byId = { [1058] = 774, … }, +} +``` + +Family key = lowest skill-line rank. A short curated table in the script adds +proc buffs (Earth Shield, Prayer of Mending) and the EllesmereUI-style +categories (externals, defensives) by family root only — ranks always come +from the data. + +### 2. Rank-proof slots (fixes the reported bug) + +`Slots.ParseIDs` keeps its validation; resolving a slot expands every entered +ID through `BuffCatalog.byId` to its whole family. Saved data is unchanged, so +existing profiles fix themselves. The slot editor gets a family picker +("Rejuvenation — all ranks") beside the raw ID field. + +### 3. "My heals & shields" that works by default + +- New buff filter choice backed by the catalogue: `HELPFUL|PLAYER` plus + `includeSpellIDs` = the player's class families of kind hot/absorb. Wire + `includeSpellIDs` through `Auras.CandidateFilters` beside `maxDuration`. +- ClickGrid member buffs default `enabled = true` with that choice. Only the + player's own heals pass, so non-healers see nothing. +- Keep `HELPFUL|PLAYER|RAID_IN_COMBAT` as an option, relabelled honestly. + +### 4. Presets and showcases + +Named buff sets the user picks instead of IDs: **My heals & shields**, +**Externals & defensives** (any caster), **Raid buffs**. Each placement gets a +live showcase card fed by sample auras: + +| Placement | Part | Look | +|---|---|---| +| Outside | `Auras` block, side top/bottom | row of icons above the cell | +| Inside | ClickGrid slots | fixed corners, one family per corner | +| Aura bar | `AuraBar` row | strip under the health bar | + +Workbench: a "Healing buffs" page under ClickGrid members with the preset +picker and the three cards. Onboarding: with the Healer preset (or a healing +class) a tile "Show my heals on group frames" plus the placement choice. + +### 5. Shared with DoT tracking + +One generator, two outputs. DoT and buff families use the same family rule, +so a later "my DoTs on target" preset reuses the catalogue API. + +## Verification (in game, needs a druid and a priest) + +1. Cast Rejuvenation on yourself, then + `/dump C_UnitAuras.GetUnitAuras("player", "HELPFUL|PLAYER")` → which spellId + (774-set or 417057-set)? +2. Same with `HELPFUL|PLAYER|RAID_IN_COMBAT` → listed or not? +3. In combat: does a catalogue-backed member group show Rejuvenation, Renew, + Power Word: Shield on another party member? From 317e7f2517630ae0640a0268115a664e5f87cdc7 Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 03:44:14 +0100 Subject: [PATCH 2/9] UNIT-13 Generate buff catalogue from client data spell_catalog.py now also emits Tracking/BuffCatalog.lua: HoT, absorb, proc, external, defensive and raid-buff families with every rank (skill-line and RaidInCombat sets), a byId lookup and the RaidInCombat set. Adds SpellAuraVisibility to the pinned snapshot. --- AGENTS.md | 2 +- DEVELOPMENT.md | 4 +- THIRD_PARTY_NOTICES.md | 2 +- UnitFrames/Tracking/BuffCatalog.lua | 361 ++++ UnitFrames/UnitFrames.toc | 1 + data/forever-spells/manifest.json | 6 + scripts/spell_catalog.py | 117 +- tests/fixtures/dot_source.json | 2010 ++++++++++++++++++--- tests/scripts/spell_catalog_test.py | 52 + tests/spec/tracking/buff_catalog_spec.lua | 73 + todos/10-design-healer-buffs.md | 21 +- 11 files changed, 2429 insertions(+), 220 deletions(-) create mode 100644 UnitFrames/Tracking/BuffCatalog.lua create mode 100644 tests/spec/tracking/buff_catalog_spec.lua diff --git a/AGENTS.md b/AGENTS.md index c5904dc..3fe05cf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ - `UnitFrames/Core/`: namespace/bootstrap, schema, AceDB configuration, theme, media, colours and text formats. Core Lua files receive `local _, ns = ...`; the public `UnitFrames` handle exposes that namespace to companion addons. - `UnitFrames/Tracking/`: data-only DoT damage estimates (tracking ported from DoesItDie, MIT). `DotSpells` reads generated numeric metadata, never descriptions. `ns.DotTracker` runs only while `Acquire`d on the exact catalogue client build, checks player-known spell IDs, keys active DoTs by generated family and learns ticks per rank. It matches `UNIT_COMBAT` on target/focus, fires `DotsChanged(key)` and fills reused lists through `Breakdown`. In combat `UNIT_COMBAT` amounts are secret: those hits match on school and rhythm alone (never drop them, or every DoT looks resisted) and are tallied per spell; on `PLAYER_REGEN_ENABLED` the `C_DamageMeter` per-spell totals, minus the generated `directPoints` upfront hit, become weighted average ticks. Fights with unseen ticks, several combo-point sizes or a dominant upfront hit are not learned. Learned tick sizes and weights live in AceDB `global`. - `tests/proof/atlases.lua` is generated by the library's `.wut/scripts/atlas_catalog.py --scan ... --output tests/proof/atlases.lua` (command in DEVELOPMENT.md) from Wago atlas exports for its pinned Forever build. Regenerate it after adding a `SetAtlas` call, so UI proof draws the atlas. -- `Tracking/DotCatalog.lua` is generated by `python3 -B scripts/spell_catalog.py` from checksum-verified Wago exports cached under ignored `examples/forever-spells//`. Only the manifest (`data/forever-spells/manifest.json`), generated Lua and small native-record fixtures are tracked. It must match the exact Forever UI-source build/commit the wow-ui-testing library pins (`.wut/clientdata/forever.json`) and the TOC interface; `--update` after a `.wut-version` bump that changes the build. `--fetch --check` populates a fresh cache and validates regeneration in CI. Ordinary tests use `--check-pin` and the small fixtures offline. The ignored `catalog.json` audits periodic candidates and exclusions; CI uploads it as an artifact. Channels are excluded. Runtime only accepts player-known spells. Combo builders, finishers, rank families and projectile flags are generated. Agony's uneven shape remains an explicit family-ID exception in `DotSpells`; baseline damage is unmodified client data until ticks are learned. +- `Tracking/DotCatalog.lua` is generated by `python3 -B scripts/spell_catalog.py` from checksum-verified Wago exports cached under ignored `examples/forever-spells//`. Only the manifest (`data/forever-spells/manifest.json`), generated Lua and small native-record fixtures are tracked. It must match the exact Forever UI-source build/commit the wow-ui-testing library pins (`.wut/clientdata/forever.json`) and the TOC interface; `--update` after a `.wut-version` bump that changes the build. `--fetch --check` populates a fresh cache and validates regeneration in CI. Ordinary tests use `--check-pin` and the small fixtures offline. The ignored `catalog.json` audits periodic candidates and exclusions; CI uploads it as an artifact. Channels are excluded. Runtime only accepts player-known spells. Combo builders, finishers, rank families and projectile flags are generated. Agony's uneven shape remains an explicit family-ID exception in `DotSpells`; baseline damage is unmodified client data until ticks are learned. The same script generates `Tracking/BuffCatalog.lua`: heal-over-time (`EffectAura` 8) and absorb (69) families whose skill-line ranks land on someone other than the caster, pet or master, grouped by the DoT family rule (class set, masks, school, aura), keyed by the lowest skill-line rank, with a `byId` lookup and the `SpellAuraVisibility` RaidInCombat set. Proc, external, defensive and raid-buff families come from `BUFF_EXTRAS`, which lists family roots only; ranks always come from the data. - Pending DoT damage: `Components/PendingDamage.lua` is owned by Bar (`spec.pendingDamage`, health rows) like Overheal; the `pendingDamage` frame driver binds `UF_PendingDamage` (Elements.lua), and the health `PostUpdate` (`ufHealthHooks`) gives it the secret scale and current health. - `UnitFrames/Components/`: reusable visual building blocks. Keep them independent of oUF bindings; their configuration and data APIs also serve previews. `UnitFrame` exposes rows and optional parts through `GetRow(key)`/`GetPart(key)` and the `Rows()`/`Parts()` iterators; add a part to `UnitFrame.PARTS` rather than adding per-part getters. Ready-check state lives in the `ReadyCheck` presenter (`GetReadyCheck()`), which also owns its settings schema. - Classes (`Core/Class.lua`): configurable visuals extend `Component`, settings controls extend `Widget`, other stateful helpers extend `Object` (`Class:New(...)` calls `Init(...)`). Stateless calculations stay plain module tables of functions. diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6d64eba..8fa5382 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -59,8 +59,8 @@ our frames (they skip without it; CI syncs it). ## Forever spell catalogue -`scripts/spell_catalog.py` compiles `UnitFrames/Tracking/DotCatalog.lua` from -Blizzard client tables exported by [Wago](https://wago.tools/db2). It uses the +`scripts/spell_catalog.py` compiles `UnitFrames/Tracking/DotCatalog.lua` and +`UnitFrames/Tracking/BuffCatalog.lua` from Blizzard client tables exported by [Wago](https://wago.tools/db2). It uses the exact Forever build and UI-source commit the wow-ui-testing library pins (`.wut/clientdata/forever.json`), and verifies the addon's TOC interface against that build. Interface `16001` alone is insufficient to select spell diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 2e33cd6..3e3fb3d 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -19,7 +19,7 @@ PolyForm license text is reproduced unchanged. | oUF | UnitFrames | MIT; copyright (c) 2006–2026 Trond A Ekseth and (c) 2016–2026 Val Voronov, Adrian L Lange and Rainrider. Full text in `UnitFrames/Libs/oUF/LICENSE.txt`. | | LibEditMode | UnitFrames | Custom upstream license; copyright (c) 2022–2026 Adrian L Lange. Full text in `UnitFrames/Libs/LibEditMode/LICENSE.txt`. | | DoesItDie (ported DoT tracking logic) | UnitFrames (`Tracking/`) | MIT; copyright (c) 2026 Joe Greive. Full text in `UnitFrames/Licenses/DoesItDie-MIT.txt`. | -| Forever spell database exports | Generated metadata in `UnitFrames/Tracking/DotCatalog.lua`; manifest in `data/forever-spells/` and small records in `tests/fixtures/dot_source.json` | Blizzard client data exported by [Wago](https://wago.tools/db2), pinned to the Forever build and source commit in the manifest. Raw CSV snapshots and the full audit are ignored development inputs under `examples/forever-spells/` and are not shipped in addon ZIPs. | +| Forever spell database exports | Generated metadata in `UnitFrames/Tracking/DotCatalog.lua` and `UnitFrames/Tracking/BuffCatalog.lua`; manifest in `data/forever-spells/` and small records in `tests/fixtures/dot_source.json` | Blizzard client data exported by [Wago](https://wago.tools/db2), pinned to the Forever build and source commit in the manifest. Raw CSV snapshots and the full audit are ignored development inputs under `examples/forever-spells/` and are not shipped in addon ZIPs. | | Roboto Condensed Light, Regular, Medium and Bold | UnitFrames_Media | SIL Open Font License 1.1; copyright 2011 The Roboto Project Authors. Full text in `UnitFrames_Media/Fonts/RobotoCondensed-OFL.txt`; notices also appear in the font metadata. | Ace3's license allows embedding but prohibits standalone redistribution diff --git a/UnitFrames/Tracking/BuffCatalog.lua b/UnitFrames/Tracking/BuffCatalog.lua new file mode 100644 index 0000000..c073f72 --- /dev/null +++ b/UnitFrames/Tracking/BuffCatalog.lua @@ -0,0 +1,361 @@ +local _, ns = ... + +ns.BuffCatalog = { + build = "1.60.1.70862", + interface = 16001, + uiCommit = "9dc84f0d3bbae1768ac3405b3716000bd93eda06", + families = { + [17] = { name = "Power Word: Shield", class = "PRIEST", kind = "absorb", ids = { 17, 592, 600, 3747, 6065, 6066, 10898, 10899, 10900, 10901, 27607, 27779, 1236154 } }, + [139] = { name = "Renew", class = "PRIEST", kind = "hot", ids = { 139, 6074, 6075, 6076, 6077, 6078, 10927, 10928, 10929, 25315, 27606, 425268, 425269, 425270, 425271, 425272, 425273, 425274, 425275, 425276, 425277, 1236151 } }, + [467] = { name = "Thorns", class = "DRUID", kind = "raid", ids = { 467, 782, 1075, 8914, 9756, 9910, 16877, 21335, 21337, 22128, 22696, 25640, 25777, 1236308 } }, + [498] = { name = "Divine Protection", class = "PALADIN", kind = "defensive", ids = { 498, 5573 } }, + [642] = { name = "Divine Shield", class = "PALADIN", kind = "defensive", ids = { 642, 1020 } }, + [774] = { name = "Rejuvenation", class = "DRUID", kind = "hot", ids = { 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 417057, 417058, 417059, 417060, 417061, 417062, 417063, 417064, 417065, 417066, 417068 } }, + [871] = { name = "Shield Wall", class = "WARRIOR", kind = "defensive", ids = { 871, 15062, 29061, 1277424 } }, + [976] = { name = "Shadow Protection", class = "PRIEST", kind = "raid", ids = { 976, 10957, 10958 } }, + [1022] = { name = "Blessing of Protection", class = "PALADIN", kind = "external", ids = { 1022, 5599, 10278, 23415, 25282, 442948 } }, + [1044] = { name = "Blessing of Freedom", class = "PALADIN", kind = "external", ids = { 1044 } }, + [1126] = { name = "Mark of the Wild", class = "DRUID", kind = "raid", ids = { 1126, 5232, 5234, 6756, 8907, 9884, 9885, 364163, 1291335, 1310503 } }, + [1243] = { name = "Power Word: Fortitude", class = "PRIEST", kind = "raid", ids = { 1243, 1244, 1245, 2791, 10937, 10938 } }, + [1459] = { name = "Arcane Intellect", class = "MAGE", kind = "raid", ids = { 1459, 1460, 1461, 10156, 10157, 364161 } }, + [5242] = { name = "Battle Shout", class = "WARRIOR", kind = "raid", ids = { 5242, 6192, 6673, 11549, 11550, 11551, 25289, 27578 } }, + [5277] = { name = "Evasion", class = "ROGUE", kind = "defensive", ids = { 5277, 15087, 16321, 21878 } }, + [6346] = { name = "Fear Ward", class = "PRIEST", kind = "external", ids = { 6346 } }, + [6940] = { name = "Blessing of Sacrifice", class = "PALADIN", kind = "external", ids = { 6940, 20729 } }, + [7001] = { name = "Lightwell Renew", class = "PRIEST", kind = "hot", ids = { 7001 } }, + [8936] = { name = "Regrowth", class = "DRUID", kind = "hot", ids = { 8936, 8938, 8939, 8940, 8941, 9750, 9856, 9857, 9858, 436937, 436938, 436939, 436940, 436942, 436943, 436944, 436945, 436946 } }, + [10060] = { name = "Power Infusion", class = "PRIEST", kind = "external", ids = { 10060 } }, + [11958] = { name = "Ice Block", class = "MAGE", kind = "defensive", ids = { 11958, 27619 } }, + [14752] = { name = "Divine Spirit", class = "PRIEST", kind = "raid", ids = { 14752, 14818, 14819, 27841 } }, + [19263] = { name = "Deterrence", class = "HUNTER", kind = "defensive", ids = { 19263 } }, + [19506] = { name = "Trueshot Aura", class = "HUNTER", kind = "raid", ids = { 19506, 20905, 20906, 1299346, 1299348 } }, + [19740] = { name = "Blessing of Might", class = "PALADIN", kind = "raid", ids = { 19740, 19834, 19835, 19836, 19837, 19838, 25291, 1286253 } }, + [19742] = { name = "Blessing of Wisdom", class = "PALADIN", kind = "raid", ids = { 19742, 19850, 19852, 19853, 19854, 25290 } }, + [20217] = { name = "Blessing of Kings", class = "PALADIN", kind = "raid", ids = { 20217 } }, + [21562] = { name = "Prayer of Fortitude", class = "PRIEST", kind = "raid", ids = { 21562, 21564, 23947, 23948, 450086 } }, + [21849] = { name = "Gift of the Wild", class = "DRUID", kind = "raid", ids = { 21849, 21850, 24752 } }, + [22812] = { name = "Barkskin", class = "DRUID", kind = "defensive", ids = { 22812, 428713, 460673 } }, + [22842] = { name = "Frenzied Regeneration", class = "DRUID", kind = "defensive", ids = { 22842, 428708 } }, + [23028] = { name = "Arcane Brilliance", class = "MAGE", kind = "raid", ids = { 16327, 16876, 23028 } }, + [25782] = { name = "Greater Blessing of Might", class = "PALADIN", kind = "raid", ids = { 25782, 25916 } }, + [25894] = { name = "Greater Blessing of Wisdom", class = "PALADIN", kind = "raid", ids = { 25894, 25918 } }, + [25898] = { name = "Greater Blessing of Kings", class = "PALADIN", kind = "raid", ids = { 25898 } }, + [27681] = { name = "Prayer of Spirit", class = "PRIEST", kind = "raid", ids = { 27681, 1286257 } }, + [27683] = { name = "Prayer of Shadow Protection", class = "PRIEST", kind = "raid", ids = { 27683 } }, + [29166] = { name = "Innervate", class = "DRUID", kind = "external", ids = { 29166, 456195 } }, + [400735] = { name = "Temporal Beacon", class = "MAGE", kind = "hot", ids = { 400735 } }, + [401417] = { name = "Regeneration", class = "MAGE", kind = "hot", ids = { 401417 } }, + [401859] = { name = "Prayer of Mending", class = "PRIEST", kind = "proc", ids = { 401859, 401877, 1240826, 1240827, 1240848, 1240849 } }, + [402004] = { name = "Pain Suppression", class = "PRIEST", kind = "external", ids = { 402004 } }, + [408120] = { name = "Wild Growth", class = "DRUID", kind = "hot", ids = { 408120, 1238214, 1238215 } }, + [408124] = { name = "Lifebloom", class = "DRUID", kind = "hot", ids = { 408124 } }, + [408514] = { name = "Earth Shield", class = "SHAMAN", kind = "proc", ids = { 974, 408514 } }, + [408521] = { name = "Riptide", class = "SHAMAN", kind = "hot", ids = { 408521, 1239242, 1239243 } }, + [408696] = { name = "Spirit of the Alpha", class = "SHAMAN", kind = "absorb", ids = { 408696 } }, + [412019] = { name = "Sacred Shield", class = "PALADIN", kind = "proc", ids = { 412018, 412019 } }, + [412020] = { name = "Flash of Light", class = "PALADIN", kind = "hot", ids = { 412020 } }, + [412510] = { name = "Mass Regeneration", class = "MAGE", kind = "hot", ids = { 412510 } }, + [425294] = { name = "Dispersion", class = "PRIEST", kind = "defensive", ids = { 425294 } }, + }, + byId = { + [17] = 17, + [592] = 17, + [600] = 17, + [3747] = 17, + [6065] = 17, + [6066] = 17, + [10898] = 17, + [10899] = 17, + [10900] = 17, + [10901] = 17, + [27607] = 17, + [27779] = 17, + [1236154] = 17, + [139] = 139, + [6074] = 139, + [6075] = 139, + [6076] = 139, + [6077] = 139, + [6078] = 139, + [10927] = 139, + [10928] = 139, + [10929] = 139, + [25315] = 139, + [27606] = 139, + [425268] = 139, + [425269] = 139, + [425270] = 139, + [425271] = 139, + [425272] = 139, + [425273] = 139, + [425274] = 139, + [425275] = 139, + [425276] = 139, + [425277] = 139, + [1236151] = 139, + [467] = 467, + [782] = 467, + [1075] = 467, + [8914] = 467, + [9756] = 467, + [9910] = 467, + [16877] = 467, + [21335] = 467, + [21337] = 467, + [22128] = 467, + [22696] = 467, + [25640] = 467, + [25777] = 467, + [1236308] = 467, + [498] = 498, + [5573] = 498, + [642] = 642, + [1020] = 642, + [774] = 774, + [1058] = 774, + [1430] = 774, + [2090] = 774, + [2091] = 774, + [3627] = 774, + [8910] = 774, + [9839] = 774, + [9840] = 774, + [9841] = 774, + [25299] = 774, + [417057] = 774, + [417058] = 774, + [417059] = 774, + [417060] = 774, + [417061] = 774, + [417062] = 774, + [417063] = 774, + [417064] = 774, + [417065] = 774, + [417066] = 774, + [417068] = 774, + [871] = 871, + [15062] = 871, + [29061] = 871, + [1277424] = 871, + [976] = 976, + [10957] = 976, + [10958] = 976, + [1022] = 1022, + [5599] = 1022, + [10278] = 1022, + [23415] = 1022, + [25282] = 1022, + [442948] = 1022, + [1044] = 1044, + [1126] = 1126, + [5232] = 1126, + [5234] = 1126, + [6756] = 1126, + [8907] = 1126, + [9884] = 1126, + [9885] = 1126, + [364163] = 1126, + [1291335] = 1126, + [1310503] = 1126, + [1243] = 1243, + [1244] = 1243, + [1245] = 1243, + [2791] = 1243, + [10937] = 1243, + [10938] = 1243, + [1459] = 1459, + [1460] = 1459, + [1461] = 1459, + [10156] = 1459, + [10157] = 1459, + [364161] = 1459, + [5242] = 5242, + [6192] = 5242, + [6673] = 5242, + [11549] = 5242, + [11550] = 5242, + [11551] = 5242, + [25289] = 5242, + [27578] = 5242, + [5277] = 5277, + [15087] = 5277, + [16321] = 5277, + [21878] = 5277, + [6346] = 6346, + [6940] = 6940, + [20729] = 6940, + [7001] = 7001, + [8936] = 8936, + [8938] = 8936, + [8939] = 8936, + [8940] = 8936, + [8941] = 8936, + [9750] = 8936, + [9856] = 8936, + [9857] = 8936, + [9858] = 8936, + [436937] = 8936, + [436938] = 8936, + [436939] = 8936, + [436940] = 8936, + [436942] = 8936, + [436943] = 8936, + [436944] = 8936, + [436945] = 8936, + [436946] = 8936, + [10060] = 10060, + [11958] = 11958, + [27619] = 11958, + [14752] = 14752, + [14818] = 14752, + [14819] = 14752, + [27841] = 14752, + [19263] = 19263, + [19506] = 19506, + [20905] = 19506, + [20906] = 19506, + [1299346] = 19506, + [1299348] = 19506, + [19740] = 19740, + [19834] = 19740, + [19835] = 19740, + [19836] = 19740, + [19837] = 19740, + [19838] = 19740, + [25291] = 19740, + [1286253] = 19740, + [19742] = 19742, + [19850] = 19742, + [19852] = 19742, + [19853] = 19742, + [19854] = 19742, + [25290] = 19742, + [20217] = 20217, + [21562] = 21562, + [21564] = 21562, + [23947] = 21562, + [23948] = 21562, + [450086] = 21562, + [21849] = 21849, + [21850] = 21849, + [24752] = 21849, + [22812] = 22812, + [428713] = 22812, + [460673] = 22812, + [22842] = 22842, + [428708] = 22842, + [16327] = 23028, + [16876] = 23028, + [23028] = 23028, + [25782] = 25782, + [25916] = 25782, + [25894] = 25894, + [25918] = 25894, + [25898] = 25898, + [27681] = 27681, + [1286257] = 27681, + [27683] = 27683, + [29166] = 29166, + [456195] = 29166, + [400735] = 400735, + [401417] = 401417, + [401859] = 401859, + [401877] = 401859, + [1240826] = 401859, + [1240827] = 401859, + [1240848] = 401859, + [1240849] = 401859, + [402004] = 402004, + [408120] = 408120, + [1238214] = 408120, + [1238215] = 408120, + [408124] = 408124, + [974] = 408514, + [408514] = 408514, + [408521] = 408521, + [1239242] = 408521, + [1239243] = 408521, + [408696] = 408696, + [412018] = 412019, + [412019] = 412019, + [412020] = 412020, + [412510] = 412510, + [425294] = 425294, + }, + raidInCombat = { + [976] = true, + [1126] = true, + [1243] = true, + [1244] = true, + [1245] = true, + [1459] = true, + [1460] = true, + [1461] = true, + [2791] = true, + [5232] = true, + [5234] = true, + [6756] = true, + [8907] = true, + [9884] = true, + [9885] = true, + [10156] = true, + [10157] = true, + [10937] = true, + [10938] = true, + [10957] = true, + [10958] = true, + [14752] = true, + [14818] = true, + [14819] = true, + [21562] = true, + [21564] = true, + [21849] = true, + [21850] = true, + [23028] = true, + [27681] = true, + [27683] = true, + [27841] = true, + [364161] = true, + [364163] = true, + [400735] = true, + [401877] = true, + [408120] = true, + [408124] = true, + [417057] = true, + [417058] = true, + [417059] = true, + [417060] = true, + [417061] = true, + [417062] = true, + [417063] = true, + [417064] = true, + [417065] = true, + [417066] = true, + [417068] = true, + [425268] = true, + [425269] = true, + [425270] = true, + [425271] = true, + [425272] = true, + [425273] = true, + [425274] = true, + [425275] = true, + [425276] = true, + [425277] = true, + [436937] = true, + [436938] = true, + [436939] = true, + [436940] = true, + [436942] = true, + [436943] = true, + [436944] = true, + [436945] = true, + [436946] = true, + [450086] = true, + [1238214] = true, + [1238215] = true, + [1240848] = true, + [1240849] = true, + [1286257] = true, + }, +} diff --git a/UnitFrames/UnitFrames.toc b/UnitFrames/UnitFrames.toc index 34df189..1ec706e 100644 --- a/UnitFrames/UnitFrames.toc +++ b/UnitFrames/UnitFrames.toc @@ -39,6 +39,7 @@ Core\PerfSuite.lua Core\PerfEdits.lua Core\Profiles.lua +Tracking\BuffCatalog.lua Tracking\DotCatalog.lua Tracking\DotSpells.lua Tracking\DotTracker.lua diff --git a/data/forever-spells/manifest.json b/data/forever-spells/manifest.json index 3bf504e..6f992cc 100644 --- a/data/forever-spells/manifest.json +++ b/data/forever-spells/manifest.json @@ -9,6 +9,12 @@ "sha256": "13ef58a08253125e3e9dca642a39bc480187987e90cfbe5c8be30e1ab3c8be0a", "url": "https://wago.tools/db2/SkillLineAbility/csv?build=1.60.1.70862&locale=enUS" }, + "SpellAuraVisibility": { + "filename": "SpellAuraVisibility.1.60.1.70862.csv", + "rows": 186, + "sha256": "5f29e07ad621fd137fc86ccc673eb065a6e0d1cc2e074db96e65556b198edaf9", + "url": "https://wago.tools/db2/SpellAuraVisibility/csv?build=1.60.1.70862&locale=enUS" + }, "SpellClassOptions": { "filename": "SpellClassOptions.1.60.1.70862.csv", "rows": 6118, diff --git a/scripts/spell_catalog.py b/scripts/spell_catalog.py index c44a058..2efce9b 100644 --- a/scripts/spell_catalog.py +++ b/scripts/spell_catalog.py @@ -17,7 +17,20 @@ DATA = ROOT / "data/forever-spells" CACHE = ROOT / "examples/forever-spells" OUTPUT = ROOT / "UnitFrames/Tracking/DotCatalog.lua" +BUFF_OUTPUT = ROOT / "UnitFrames/Tracking/BuffCatalog.lua" FIXTURE = ROOT / "tests/fixtures/dot_source.json" +CLASS_MASKS = {1: "WARRIOR", 2: "PALADIN", 4: "HUNTER", 8: "ROGUE", 16: "PRIEST", 64: "SHAMAN", 128: "MAGE", 256: "WARLOCK", 1024: "DRUID"} +CLASS_SETS = {3: "MAGE", 4: "WARRIOR", 5: "WARLOCK", 6: "PRIEST", 7: "DRUID", 8: "ROGUE", 9: "HUNTER", 10: "PALADIN", 11: "SHAMAN"} +BUFF_AURAS = {8: "hot", 69: "absorb"} +SELF_TARGETS = {1, 5, 27} +BUFF_EXTRAS = { + "hot": ((408120,), (400735,), (401417,)), + "proc": ((408514,), (401859, 401877), (412019, 412018)), + "external": ((1022,), (6940,), (1044,), (10060,), (29166,), (6346,), (402004,)), + "defensive": ((642,), (498,), (871,), (22812,), (5277,), (11958,), (22842,), (19263,), (425294,)), + "raid": ((1243,), (21562,), (1459,), (23028,), (1126,), (21849,), (14752,), (27681,), (976,), (27683,), + (19740,), (19742,), (20217,), (25782,), (25894,), (25898,), (467,), (6673,), (19506,)), +} TABLES = { "SpellEffect": {"ID", "SpellID", "DifficultyID", "Effect", "EffectAura", "EffectAuraPeriod", "EffectBasePointsF", "EffectTriggerSpell", "ImplicitTarget_0", "ImplicitTarget_1", "EffectPointsPerResource", "EffectBonusCoefficient", "BonusCoefficientFromAP", "EffectRealPointsPerLevel", "EffectMiscValue_0"}, "SpellMisc": {"ID", "SpellID", "DifficultyID", "Attributes_0", "Attributes_1", "DurationIndex", "SchoolMask", "Speed", "LaunchDelay"}, @@ -27,6 +40,7 @@ "SpellName": {"ID", "Name_lang"}, "SpellClassOptions": {"ID", "SpellID", "SpellClassSet", "SpellClassMask_0", "SpellClassMask_1", "SpellClassMask_2", "SpellClassMask_3"}, "SpellPower": {"ID", "SpellID", "PowerType", "ManaCost", "OptionalCost"}, + "SpellAuraVisibility": {"ID", "SpellID", "Type", "Flags"}, } @@ -141,7 +155,9 @@ def write_cache(pin, compressed): def fixture_data(tables, pin): - spells = {589, 2944, 14914, 15407, 755, 10, 172, 6222, 980, 1014, 1082, 2098, 1079, 1943, 1978, 139} + spells = {589, 2944, 14914, 15407, 755, 10, 172, 6222, 980, 1014, 1082, 2098, 1079, 1943, 1978, 139, + 774, 1058, 25299, 417057, 417068, 27813, 425268, 17, 10901, 8936, 436937, 408120, 408124, 408521, + 408514, 974, 401859, 401877, 543, 7812, 10060, 14752} selected = {} for name, rows in tables.items(): if name == "SpellDuration": @@ -262,6 +278,87 @@ def compile_catalog(tables, pin): return {**pin, "included": included, "excluded": excluded, "builders": builders, "finishers": finishers} +def compile_buffs(tables, pin, extras=BUFF_EXTRAS): + misc = default_rows(tables["SpellMisc"], "SpellID") + names = {int(row["ID"]): row["Name_lang"] for row in tables["SpellName"]} + classes = default_rows(tables["SpellClassOptions"], "SpellID") + abilities = defaultdict(list) + for row in tables["SkillLineAbility"]: + abilities[int(row["Spell"])].append(row) + effects = defaultdict(list) + for row in tables["SpellEffect"]: + if int(row["DifficultyID"]) == 0: + effects[int(row["SpellID"])].append(row) + groups, keys, kinds = defaultdict(list), {}, {} + for spell_id, rows in sorted(effects.items()): + info = misc.get(spell_id) + if not info or int(info["Attributes_0"]) & 0x40: + continue + auras = [row for row in sorted(rows, key=lambda row: int(row["ID"])) if int(row["Effect"]) == 6] + healing = [row for row in auras if int(row["EffectAura"]) in BUFF_AURAS and int(row["ImplicitTarget_0"]) not in SELF_TARGETS] + primary = healing or auras + aura = int(primary[0]["EffectAura"]) if primary else 0 + row = classes.get(spell_id, {}) + masks = tuple(int(row.get(f"SpellClassMask_{index}", 0)) for index in range(4)) + key = (int(row.get("SpellClassSet", 0)), *masks, int(info["SchoolMask"]), aura) if any(masks) else (spell_id,) + keys[spell_id] = key + groups[key].append(spell_id) + if healing and spell_id in abilities: + kinds[key] = BUFF_AURAS[aura] + + def owner(members): + mask = 0 + for spell_id in members: + for ability in abilities[spell_id]: + mask |= int(ability["ClassMask"]) + found = {token for bit, token in CLASS_MASKS.items() if mask & bit} + if not found: + found = {CLASS_SETS[int(classes[spell_id]["SpellClassSet"])] for spell_id in members + if spell_id in classes and int(classes[spell_id]["SpellClassSet"]) in CLASS_SETS} + return found.pop() if len(found) == 1 else None + + chosen = {(key,): kind for key, kind in kinds.items() if owner(groups[key])} + for kind, entries in extras.items(): + for roots in entries: + missing = [root for root in roots if root not in keys] + if missing: + raise ValueError(f"curated buff roots {missing} are missing from the client data; review BUFF_EXTRAS") + family = tuple(dict.fromkeys(keys[root] for root in roots)) + for key in family: + for existing in [existing for existing in chosen if key in existing]: + del chosen[existing] + chosen[family] = kind + families, by_id = {}, {} + for family, kind in chosen.items(): + members = sorted({spell_id for key in family for spell_id in groups[key]}) + skill = [spell_id for spell_id in members if spell_id in abilities] + root = min(skill or members) + cls = owner(members) + if not cls: + raise ValueError(f"buff family {root} has no single owning class; review BUFF_EXTRAS") + families[root] = {"name": names.get(root, ""), "class": cls, "kind": kind, "ids": members} + for spell_id in members: + if spell_id in by_id: + raise ValueError(f"spell {spell_id} belongs to buff families {by_id[spell_id]} and {root}") + by_id[spell_id] = root + flagged = {int(row["SpellID"]) for row in tables["SpellAuraVisibility"] if int(row["Type"]) == 0} + return {**pin, "families": dict(sorted(families.items())), "raidInCombat": sorted(flagged & set(by_id))} + + +def lua_buffs(report): + lines = ["local _, ns = ...", "", "ns.BuffCatalog = {", f'\tbuild = "{report["build"]}",', + f'\tinterface = {report["interface"]},', f'\tuiCommit = "{report["uiCommit"]}",', "\tfamilies = {"] + for root, family in report["families"].items(): + lines.append(f'\t\t[{root}] = {{ name = {json.dumps(family["name"], ensure_ascii=False)}, class = "{family["class"]}", ' + f'kind = "{family["kind"]}", ids = {{ ' + ", ".join(map(str, family["ids"])) + " } },") + lines.extend(["\t},", "\tbyId = {"]) + for root, family in report["families"].items(): + lines.extend(f"\t\t[{spell_id}] = {root}," for spell_id in family["ids"]) + lines.extend(["\t},", "\traidInCombat = {"]) + lines.extend(f"\t\t[{spell_id}] = true," for spell_id in report["raidInCombat"]) + return "\n".join(lines + ["\t},", "}", ""]) + + def lua_catalog(report): lines = ["local _, ns = ...", "", "ns.DotCatalog = {", f'\tbuild = "{report["build"]}",', f'\tinterface = {report["interface"]},', f'\tuiCommit = "{report["uiCommit"]}",', "\tspells = {"] @@ -307,11 +404,12 @@ def main(): else: manifest = read_manifest(pin) if args.check_pin: - output = OUTPUT.read_text() - for key, value in pin.items(): - expected = f'{key} = "{value}"' if isinstance(value, str) else f"{key} = {value}" - if expected not in output: - raise ValueError(f"generated catalogue {key} does not match the source pin") + for path in (OUTPUT, BUFF_OUTPUT): + output = path.read_text() + for key, value in pin.items(): + expected = f'{key} = "{value}"' if isinstance(value, str) else f"{key} = {value}" + if expected not in output: + raise ValueError(f"generated {path.name} {key} does not match the source pin") fixture = json.loads(FIXTURE.read_text()) if any(fixture[key] != value for key, value in pin.items()): raise ValueError("spell fixtures do not match the source pin") @@ -326,8 +424,9 @@ def main(): tables, manifest = read_snapshot(pin) validate_evidence(tables) report = compile_catalog(tables, pin) + buffs = compile_buffs(tables, pin) audit = CACHE / pin["build"] / "catalog.json" - artifacts = {OUTPUT: lua_catalog(report), FIXTURE: canonical(fixture_data(tables, pin))} + artifacts = {OUTPUT: lua_catalog(report), BUFF_OUTPUT: lua_buffs(buffs), FIXTURE: canonical(fixture_data(tables, pin))} if args.check: for path, expected in artifacts.items(): if not path.exists() or path.read_text() != expected: @@ -339,8 +438,8 @@ def main(): (DATA / "manifest.json").write_text(canonical(manifest)) for path, content in artifacts.items(): path.write_text(content) - audit.write_text(canonical(report)) - print(f'Forever {pin["build"]}: {len(report["included"])} DoT ranks, {len(report["excluded"])} exclusions') + audit.write_text(canonical({**report, "buffs": buffs["families"]})) + print(f'Forever {pin["build"]}: {len(report["included"])} DoT ranks, {len(report["excluded"])} exclusions, {len(buffs["families"])} buff families') if __name__ == "__main__": diff --git a/tests/fixtures/dot_source.json b/tests/fixtures/dot_source.json index 4e2e743..9e9bd4b 100644 --- a/tests/fixtures/dot_source.json +++ b/tests/fixtures/dot_source.json @@ -15,6 +15,12 @@ "Spell": "589", "SupercedesSpell": "0" }, + { + "ClassMask": "128", + "ID": "2976", + "Spell": "543", + "SupercedesSpell": "0" + }, { "ClassMask": "128", "ID": "3592", @@ -45,12 +51,36 @@ "Spell": "980", "SupercedesSpell": "0" }, + { + "ClassMask": "0", + "ID": "4380", + "Spell": "7812", + "SupercedesSpell": "0" + }, { "ClassMask": "1024", "ID": "5129", "Spell": "1079", "SupercedesSpell": "0" }, + { + "ClassMask": "1024", + "ID": "6278", + "Spell": "774", + "SupercedesSpell": "0" + }, + { + "ClassMask": "1024", + "ID": "6279", + "Spell": "1058", + "SupercedesSpell": "0" + }, + { + "ClassMask": "1024", + "ID": "6296", + "Spell": "8936", + "SupercedesSpell": "0" + }, { "ClassMask": "256", "ID": "6401", @@ -63,6 +93,24 @@ "Spell": "1978", "SupercedesSpell": "0" }, + { + "ClassMask": "16", + "ID": "7928", + "Spell": "17", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "7929", + "Spell": "10901", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "7956", + "Spell": "14752", + "SupercedesSpell": "0" + }, { "ClassMask": "16", "ID": "8275", @@ -98,9 +146,164 @@ "ID": "10628", "Spell": "1014", "SupercedesSpell": "0" + }, + { + "ClassMask": "1024", + "ID": "13236", + "Spell": "25299", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "13831", + "Spell": "10060", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "13833", + "Spell": "27813", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "49420", + "Spell": "425268", + "SupercedesSpell": "0" + }, + { + "ClassMask": "1024", + "ID": "49512", + "Spell": "408124", + "SupercedesSpell": "0" + }, + { + "ClassMask": "1024", + "ID": "49515", + "Spell": "408120", + "SupercedesSpell": "0" + }, + { + "ClassMask": "64", + "ID": "49562", + "Spell": "408521", + "SupercedesSpell": "0" + }, + { + "ClassMask": "64", + "ID": "49563", + "Spell": "408514", + "SupercedesSpell": "0" + }, + { + "ClassMask": "16", + "ID": "59288", + "Spell": "401859", + "SupercedesSpell": "0" + } + ], + "SpellAuraVisibility": [ + { + "Flags": "2", + "ID": "4437", + "SpellID": "14752", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5209", + "SpellID": "401877", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5210", + "SpellID": "401877", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5374", + "SpellID": "408124", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5375", + "SpellID": "408124", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5405", + "SpellID": "408120", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5406", + "SpellID": "408120", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5435", + "SpellID": "436937", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5436", + "SpellID": "436937", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5455", + "SpellID": "417057", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5456", + "SpellID": "417057", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5473", + "SpellID": "417068", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5474", + "SpellID": "417068", + "Type": "1" + }, + { + "Flags": "1", + "ID": "5522", + "SpellID": "425268", + "Type": "0" + }, + { + "Flags": "1", + "ID": "5523", + "SpellID": "425268", + "Type": "1" } ], "SpellClassOptions": [ + { + "ID": "43436", + "SpellClassMask_0": "8", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "3", + "SpellID": "543" + }, { "ID": "43438", "SpellClassMask_0": "2", @@ -155,6 +358,15 @@ "SpellClassSet": "9", "SpellID": "1978" }, + { + "ID": "43582", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "774" + }, { "ID": "43583", "SpellClassMask_0": "4096", @@ -182,6 +394,15 @@ "SpellClassSet": "5", "SpellID": "1014" }, + { + "ID": "43641", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "1058" + }, { "ID": "43662", "SpellClassMask_0": "33554432", @@ -227,6 +448,15 @@ "SpellClassSet": "5", "SpellID": "980" }, + { + "ID": "44135", + "SpellClassMask_0": "64", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "8936" + }, { "ID": "44151", "SpellClassMask_0": "1048576", @@ -236,6 +466,51 @@ "SpellClassSet": "6", "SpellID": "14914" }, + { + "ID": "44217", + "SpellClassMask_0": "1", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "17" + }, + { + "ID": "44360", + "SpellClassMask_0": "1", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "10901" + }, + { + "ID": "44362", + "SpellClassMask_0": "-2147483648", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "10060" + }, + { + "ID": "45234", + "SpellClassMask_0": "33554432", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "5", + "SpellID": "7812" + }, + { + "ID": "45288", + "SpellClassMask_0": "-2147483648", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "14752" + }, { "ID": "45484", "SpellClassMask_0": "8388608", @@ -244,6 +519,123 @@ "SpellClassMask_3": "0", "SpellClassSet": "6", "SpellID": "15407" + }, + { + "ID": "47047", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "25299" + }, + { + "ID": "47301", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "27813" + }, + { + "ID": "70398", + "SpellClassMask_0": "0", + "SpellClassMask_1": "32", + "SpellClassMask_2": "1024", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "401859" + }, + { + "ID": "70400", + "SpellClassMask_0": "0", + "SpellClassMask_1": "0", + "SpellClassMask_2": "1024", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "401877" + }, + { + "ID": "71078", + "SpellClassMask_0": "0", + "SpellClassMask_1": "67108864", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "408120" + }, + { + "ID": "71081", + "SpellClassMask_0": "0", + "SpellClassMask_1": "16", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "408124" + }, + { + "ID": "71166", + "SpellClassMask_0": "0", + "SpellClassMask_1": "1024", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "11", + "SpellID": "408514" + }, + { + "ID": "71170", + "SpellClassMask_0": "0", + "SpellClassMask_1": "0", + "SpellClassMask_2": "16", + "SpellClassMask_3": "0", + "SpellClassSet": "11", + "SpellID": "408521" + }, + { + "ID": "72212", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "417057" + }, + { + "ID": "72222", + "SpellClassMask_0": "16", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "417068" + }, + { + "ID": "72777", + "SpellClassMask_0": "64", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "6", + "SpellID": "425268" + }, + { + "ID": "73074", + "SpellClassMask_0": "0", + "SpellClassMask_1": "1024", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "11", + "SpellID": "974" + }, + { + "ID": "74795", + "SpellClassMask_0": "64", + "SpellClassMask_1": "0", + "SpellClassMask_2": "0", + "SpellClassMask_3": "0", + "SpellClassSet": "7", + "SpellID": "436937" } ], "SpellDuration": [ @@ -253,12 +645,24 @@ "ID": "1", "MaxDuration": "10000" }, + { + "Duration": "600000", + "DurationPerResource": "0", + "ID": "6", + "MaxDuration": "600000" + }, { "Duration": "15000", "DurationPerResource": "0", "ID": "8", "MaxDuration": "15000" }, + { + "Duration": "30000", + "DurationPerResource": "0", + "ID": "9", + "MaxDuration": "30000" + }, { "Duration": "3000", "DurationPerResource": "0", @@ -277,18 +681,42 @@ "ID": "31", "MaxDuration": "8000" }, + { + "Duration": "6000", + "DurationPerResource": "0", + "ID": "32", + "MaxDuration": "6000" + }, + { + "Duration": "3600000", + "DurationPerResource": "0", + "ID": "42", + "MaxDuration": "3600000" + }, { "Duration": "18000", "DurationPerResource": "0", "ID": "85", "MaxDuration": "18000" }, + { + "Duration": "21000", + "DurationPerResource": "0", + "ID": "86", + "MaxDuration": "21000" + }, { "Duration": "24000", "DurationPerResource": "0", "ID": "106", "MaxDuration": "24000" }, + { + "Duration": "7000", + "DurationPerResource": "0", + "ID": "165", + "MaxDuration": "7000" + }, { "Duration": "6000", "DurationPerResource": "2000", @@ -301,26 +729,60 @@ "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "3", - "EffectAuraPeriod": "3000", - "EffectBasePointsF": "10", - "EffectBonusCoefficient": "0.20000000298", - "EffectMiscValue_0": "0", + "EffectAura": "69", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "162", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "4", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "678915", - "ImplicitTarget_0": "6", + "ID": "678894", + "ImplicitTarget_0": "1", "ImplicitTarget_1": "0", - "SpellID": "172" + "SpellID": "543" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "8", - "EffectAuraPeriod": "3000", - "EffectBasePointsF": "9", + "EffectAura": "74", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "4", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "678895", + "ImplicitTarget_0": "1", + "ImplicitTarget_1": "0", + "SpellID": "543" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "3", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "10", + "EffectBonusCoefficient": "0.20000000298", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "678915", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "172" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "9", "EffectBonusCoefficient": "0.20000000298", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", @@ -416,6 +878,23 @@ "ImplicitTarget_1": "0", "SpellID": "1978" }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "8", + "EffectBonusCoefficient": "0.20000000298", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "679789", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "774" + }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", @@ -501,6 +980,40 @@ "ImplicitTarget_1": "0", "SpellID": "1014" }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "150", + "EffectBonusCoefficient": "1", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "680168", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "974" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "12", + "EffectBonusCoefficient": "0.20000000298", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "680350", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "1058" + }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", @@ -603,6 +1116,40 @@ "ImplicitTarget_1": "0", "SpellID": "980" }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "10", + "EffectAura": "0", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "87", + "EffectBonusCoefficient": "0.28600001335", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "1.79999995232", + "EffectTriggerSpell": "0", + "ID": "686949", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "8936" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "13", + "EffectBonusCoefficient": "0.07100000232", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "686950", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "8936" + }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", @@ -641,205 +1188,222 @@ "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "3", - "EffectAuraPeriod": "1000", - "EffectBasePointsF": "21", - "EffectBonusCoefficient": "0.16699999571", - "EffectMiscValue_0": "0", + "EffectAura": "69", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "44", + "EffectBonusCoefficient": "0.10000000149", + "EffectMiscValue_0": "127", "EffectPointsPerResource": "0", - "EffectRealPointsPerLevel": "0", + "EffectRealPointsPerLevel": "0.80000001192", "EffectTriggerSpell": "0", - "ID": "693750", - "ImplicitTarget_0": "6", + "ID": "687563", + "ImplicitTarget_0": "57", "ImplicitTarget_1": "0", - "SpellID": "15407" + "SpellID": "17" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "33", + "EffectAura": "69", "EffectAuraPeriod": "0", - "EffectBasePointsF": "-50", - "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "0", + "EffectBasePointsF": "928", + "EffectBonusCoefficient": "0.10000000149", + "EffectMiscValue_0": "127", "EffectPointsPerResource": "0", - "EffectRealPointsPerLevel": "0", + "EffectRealPointsPerLevel": "4.30000019073", "EffectTriggerSpell": "0", - "ID": "693751", - "ImplicitTarget_0": "6", + "ID": "688352", + "ImplicitTarget_0": "57", "ImplicitTarget_1": "0", - "SpellID": "15407" + "SpellID": "10901" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "4", + "EffectAura": "136", "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", - "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "0", + "EffectBasePointsF": "20", + "EffectBonusCoefficient": "1", + "EffectMiscValue_0": "126", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1290990", - "ImplicitTarget_0": "6", + "ID": "688356", + "ImplicitTarget_0": "21", "ImplicitTarget_1": "0", - "SpellID": "1079" + "SpellID": "10060" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", - "Effect": "179", - "EffectAura": "0", + "Effect": "6", + "EffectAura": "79", "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", - "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "41261", + "EffectBasePointsF": "20", + "EffectBonusCoefficient": "1", + "EffectMiscValue_0": "126", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1292631", - "ImplicitTarget_0": "87", - "ImplicitTarget_1": "16", - "SpellID": "10" + "ID": "688357", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "10060" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "226", - "EffectAuraPeriod": "1000", + "EffectAura": "69", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "305", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "127", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "2.29999995232", + "EffectTriggerSpell": "0", + "ID": "692541", + "ImplicitTarget_0": "27", + "ImplicitTarget_1": "0", + "SpellID": "7812" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "1", + "EffectAura": "0", + "EffectAuraPeriod": "0", "EffectBasePointsF": "0", "EffectBonusCoefficient": "0", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1292632", + "ID": "692542", "ImplicitTarget_0": "1", "ImplicitTarget_1": "0", - "SpellID": "10" + "SpellID": "7812" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "4", + "EffectAura": "29", "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", + "EffectBasePointsF": "17", "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "0", + "EffectMiscValue_0": "4", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1294585", - "ImplicitTarget_0": "6", + "ID": "692824", + "ImplicitTarget_0": "21", "ImplicitTarget_1": "0", - "SpellID": "1943" + "SpellID": "14752" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "10", - "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", - "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "127", + "EffectAura": "3", + "EffectAuraPeriod": "1000", + "EffectBasePointsF": "21", + "EffectBonusCoefficient": "0.16699999571", + "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1314623", - "ImplicitTarget_0": "5", + "ID": "693750", + "ImplicitTarget_0": "6", "ImplicitTarget_1": "0", - "SpellID": "755" + "SpellID": "15407" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", - "Effect": "30", - "EffectAura": "0", + "Effect": "6", + "EffectAura": "33", "EffectAuraPeriod": "0", - "EffectBasePointsF": "1", + "EffectBasePointsF": "-50", "EffectBonusCoefficient": "0", - "EffectMiscValue_0": "4", + "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1338554", - "ImplicitTarget_0": "1", + "ID": "693751", + "ImplicitTarget_0": "6", "ImplicitTarget_1": "0", - "SpellID": "1082" + "SpellID": "15407" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "3", - "EffectAuraPeriod": "1000", - "EffectBasePointsF": "5.44999980927", - "EffectBonusCoefficient": "0", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "194", + "EffectBonusCoefficient": "0.20000000298", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1343967", - "ImplicitTarget_0": "1", + "ID": "702232", + "ImplicitTarget_0": "21", "ImplicitTarget_1": "0", - "SpellID": "755" + "SpellID": "25299" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", "Effect": "6", - "EffectAura": "271", - "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", + "EffectAura": "226", + "EffectAuraPeriod": "2000", + "EffectBasePointsF": "1", "EffectBonusCoefficient": "0", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1365366", - "ImplicitTarget_0": "6", + "ID": "704159", + "ImplicitTarget_0": "1", "ImplicitTarget_1": "0", - "SpellID": "980" + "SpellID": "27813" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", - "Effect": "6", - "EffectAura": "271", + "Effect": "3", + "EffectAura": "0", "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", - "EffectBonusCoefficient": "0", + "EffectBasePointsF": "172", + "EffectBonusCoefficient": "0.42899999022", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1365370", - "ImplicitTarget_0": "6", + "ID": "1047961", + "ImplicitTarget_0": "57", "ImplicitTarget_1": "0", - "SpellID": "1014" + "SpellID": "401859" }, { "BonusCoefficientFromAP": "0", "DifficultyID": "0", - "Effect": "6", - "EffectAura": "4", + "Effect": "3", + "EffectAura": "0", "EffectAuraPeriod": "0", - "EffectBasePointsF": "0", + "EffectBasePointsF": "5", "EffectBonusCoefficient": "0", "EffectMiscValue_0": "0", "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1366638", - "ImplicitTarget_0": "6", + "ID": "1047962", + "ImplicitTarget_0": "57", "ImplicitTarget_1": "0", - "SpellID": "980" + "SpellID": "401859" }, { "BonusCoefficientFromAP": "0", @@ -853,267 +1417,1080 @@ "EffectPointsPerResource": "0", "EffectRealPointsPerLevel": "0", "EffectTriggerSpell": "0", - "ID": "1366639", - "ImplicitTarget_0": "6", + "ID": "1047993", + "ImplicitTarget_0": "57", "ImplicitTarget_1": "0", - "SpellID": "1014" - } - ], - "SpellInterrupts": [ - { - "ChannelInterruptFlags_0": "0", - "ChannelInterruptFlags_1": "0", - "DifficultyID": "0", - "ID": "123500", - "SpellID": "172" + "SpellID": "401877" }, { - "ChannelInterruptFlags_0": "0", - "ChannelInterruptFlags_1": "0", + "BonusCoefficientFromAP": "0", "DifficultyID": "0", - "ID": "123512", - "SpellID": "139" + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "1000", + "EffectBasePointsF": "40", + "EffectBonusCoefficient": "0.03299999982", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "1", + "EffectTriggerSpell": "0", + "ID": "1072065", + "ImplicitTarget_0": "132", + "ImplicitTarget_1": "31", + "SpellID": "408120" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "1000", + "EffectBasePointsF": "4", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072071", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408124" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "57", + "EffectBonusCoefficient": "0.27399998903", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072072", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408124" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "28", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072692", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408514" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "149", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "30", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "126", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072693", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408514" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "3", + "EffectAura": "0", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0.21400000155", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "3.70000004768", + "EffectTriggerSpell": "0", + "ID": "1072707", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408521" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "89", + "EffectBonusCoefficient": "0.10000000149", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072708", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408521" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "25", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1072709", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408521" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "5", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1075729", + "ImplicitTarget_0": "132", + "ImplicitTarget_1": "31", + "SpellID": "408120" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "8", + "EffectBonusCoefficient": "0.07999999821", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1088371", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "417057" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "222", + "EffectBonusCoefficient": "0.20000000298", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1088382", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "417068" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "9", + "EffectBonusCoefficient": "0.12649999559", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1102958", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "425268" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "149", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "30", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "126", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1108155", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "974" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "10", + "EffectAura": "0", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "91", + "EffectBonusCoefficient": "0.20000000298", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "1.79999995232", + "EffectTriggerSpell": "0", + "ID": "1128562", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "436937" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "8", + "EffectAuraPeriod": "3000", + "EffectBasePointsF": "14", + "EffectBonusCoefficient": "0.05000000075", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1128563", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "436937" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "1", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1139161", + "ImplicitTarget_0": "21", + "ImplicitTarget_1": "0", + "SpellID": "408514" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1290990", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "1079" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "179", + "EffectAura": "0", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "41261", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1292631", + "ImplicitTarget_0": "87", + "ImplicitTarget_1": "16", + "SpellID": "10" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "226", + "EffectAuraPeriod": "1000", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1292632", + "ImplicitTarget_0": "1", + "ImplicitTarget_1": "0", + "SpellID": "10" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1294585", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "1943" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "10", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "127", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1314623", + "ImplicitTarget_0": "5", + "ImplicitTarget_1": "0", + "SpellID": "755" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "30", + "EffectAura": "0", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "1", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "4", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1338554", + "ImplicitTarget_0": "1", + "ImplicitTarget_1": "0", + "SpellID": "1082" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "3", + "EffectAuraPeriod": "1000", + "EffectBasePointsF": "5.44999980927", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1343967", + "ImplicitTarget_0": "1", + "ImplicitTarget_1": "0", + "SpellID": "755" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "271", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1365366", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "980" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "271", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1365370", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "1014" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1366638", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "980" + }, + { + "BonusCoefficientFromAP": "0", + "DifficultyID": "0", + "Effect": "6", + "EffectAura": "4", + "EffectAuraPeriod": "0", + "EffectBasePointsF": "0", + "EffectBonusCoefficient": "0", + "EffectMiscValue_0": "0", + "EffectPointsPerResource": "0", + "EffectRealPointsPerLevel": "0", + "EffectTriggerSpell": "0", + "ID": "1366639", + "ImplicitTarget_0": "6", + "ImplicitTarget_1": "0", + "SpellID": "1014" + } + ], + "SpellInterrupts": [ + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123485", + "SpellID": "543" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123500", + "SpellID": "172" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123512", + "SpellID": "139" + }, + { + "ChannelInterruptFlags_0": "31756", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123546", + "SpellID": "10" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123583", + "SpellID": "589" + }, + { + "ChannelInterruptFlags_0": "31756", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123799", + "SpellID": "755" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123889", + "SpellID": "774" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "123940", + "SpellID": "1014" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "124037", + "SpellID": "1058" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "124105", + "SpellID": "2944" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "125000", + "SpellID": "6222" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "125546", + "SpellID": "980" }, { - "ChannelInterruptFlags_0": "31756", + "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "123546", - "SpellID": "10" + "ID": "125763", + "SpellID": "8936" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "123583", - "SpellID": "589" + "ID": "125817", + "SpellID": "14914" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "125973", + "SpellID": "17" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "126213", + "SpellID": "10901" }, { "ChannelInterruptFlags_0": "31756", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "123799", - "SpellID": "755" + "ID": "127538", + "SpellID": "15407" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "123940", - "SpellID": "1014" + "ID": "129497", + "SpellID": "25299" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "124105", - "SpellID": "2944" + "ID": "193451", + "SpellID": "401877" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "125000", - "SpellID": "6222" + "ID": "195631", + "SpellID": "408120" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "125546", - "SpellID": "980" + "ID": "195634", + "SpellID": "408124" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "195812", + "SpellID": "408521" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "198483", + "SpellID": "417057" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "198493", + "SpellID": "417068" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "200788", + "SpellID": "425268" + }, + { + "ChannelInterruptFlags_0": "0", + "ChannelInterruptFlags_1": "0", + "DifficultyID": "0", + "ID": "201681", + "SpellID": "974" }, { "ChannelInterruptFlags_0": "0", "ChannelInterruptFlags_1": "0", "DifficultyID": "0", - "ID": "125817", + "ID": "204619", + "SpellID": "436937" + } + ], + "SpellMisc": [ + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "9", + "ID": "314056", + "LaunchDelay": "0", + "SchoolMask": "4", + "Speed": "0", + "SpellID": "543" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "29", + "ID": "314075", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "172" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "8", + "ID": "314090", + "LaunchDelay": "0", + "SchoolMask": "2", + "Speed": "0", + "SpellID": "139" + }, + { + "Attributes_0": "65536", + "Attributes_1": "268435520", + "DifficultyID": "0", + "DurationIndex": "31", + "ID": "314137", + "LaunchDelay": "0", + "SchoolMask": "16", + "Speed": "0", + "SpellID": "10" + }, + { + "Attributes_0": "327680", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "85", + "ID": "314213", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "589" + }, + { + "Attributes_0": "65536", + "Attributes_1": "16388", + "DifficultyID": "0", + "DurationIndex": "1", + "ID": "314579", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "755" + }, + { + "Attributes_0": "65538", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "8", + "ID": "314754", + "LaunchDelay": "0", + "SchoolMask": "8", + "Speed": "40", + "SpellID": "1978" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "29", + "ID": "314827", + "LaunchDelay": "0", + "SchoolMask": "8", + "Speed": "0", + "SpellID": "774" + }, + { + "Attributes_0": "262160", + "Attributes_1": "201327104", + "DifficultyID": "0", + "DurationIndex": "0", + "ID": "314834", + "LaunchDelay": "0", + "SchoolMask": "1", + "Speed": "0", + "SpellID": "1082" + }, + { + "Attributes_0": "327696", + "Attributes_1": "134218240", + "DifficultyID": "0", + "DurationIndex": "0", + "ID": "314949", + "LaunchDelay": "0", + "SchoolMask": "1", + "Speed": "0", + "SpellID": "2098" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "106", + "ID": "314956", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "1014" + }, + { + "Attributes_0": "327680", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "6", + "ID": "315165", + "LaunchDelay": "0", + "SchoolMask": "8", + "Speed": "0", + "SpellID": "974" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "29", + "ID": "315323", + "LaunchDelay": "0", + "SchoolMask": "8", + "Speed": "0", + "SpellID": "1058" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "106", + "ID": "315545", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "2944" + }, + { + "Attributes_0": "327696", + "Attributes_1": "134218240", + "DifficultyID": "0", + "DurationIndex": "553", + "ID": "316047", + "LaunchDelay": "0", + "SchoolMask": "1", + "Speed": "0", + "SpellID": "1943" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "8", + "ID": "318451", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "6222" + }, + { + "Attributes_0": "262160", + "Attributes_1": "134218240", + "DifficultyID": "0", + "DurationIndex": "29", + "ID": "320188", + "LaunchDelay": "0", + "SchoolMask": "1", + "Speed": "0", + "SpellID": "1079" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "106", + "ID": "320479", + "LaunchDelay": "0", + "SchoolMask": "32", + "Speed": "0", + "SpellID": "980" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "86", + "ID": "321073", + "LaunchDelay": "0", + "SchoolMask": "8", + "Speed": "0", + "SpellID": "8936" + }, + { + "Attributes_0": "65536", + "Attributes_1": "0", + "DifficultyID": "0", + "DurationIndex": "1", + "ID": "321204", + "LaunchDelay": "0", + "SchoolMask": "2", + "Speed": "0", "SpellID": "14914" }, { - "ChannelInterruptFlags_0": "31756", - "ChannelInterruptFlags_1": "0", + "Attributes_0": "329728", + "Attributes_1": "0", "DifficultyID": "0", - "ID": "127538", - "SpellID": "15407" - } - ], - "SpellMisc": [ + "DurationIndex": "9", + "ID": "321562", + "LaunchDelay": "0", + "SchoolMask": "2", + "Speed": "0", + "SpellID": "17" + }, { - "Attributes_0": "65536", + "Attributes_0": "327680", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "29", - "ID": "314075", + "DurationIndex": "9", + "ID": "322200", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "2", "Speed": "0", - "SpellID": "172" + "SpellID": "10901" }, { - "Attributes_0": "65536", + "Attributes_0": "327680", "Attributes_1": "0", "DifficultyID": "0", "DurationIndex": "8", - "ID": "314090", + "ID": "322204", "LaunchDelay": "0", "SchoolMask": "2", "Speed": "0", - "SpellID": "139" + "SpellID": "10060" }, { - "Attributes_0": "65536", - "Attributes_1": "268435520", + "Attributes_0": "0", + "Attributes_1": "131072", "DifficultyID": "0", - "DurationIndex": "31", - "ID": "314137", + "DurationIndex": "9", + "ID": "325733", "LaunchDelay": "0", - "SchoolMask": "16", + "SchoolMask": "32", "Speed": "0", - "SpellID": "10" + "SpellID": "7812" }, { - "Attributes_0": "327680", + "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "85", - "ID": "314213", + "DurationIndex": "42", + "ID": "325964", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "2", "Speed": "0", - "SpellID": "589" + "SpellID": "14752" }, { "Attributes_0": "65536", "Attributes_1": "16388", "DifficultyID": "0", - "DurationIndex": "1", - "ID": "314579", + "DurationIndex": "27", + "ID": "326710", "LaunchDelay": "0", "SchoolMask": "32", "Speed": "0", - "SpellID": "755" + "SpellID": "15407" }, { - "Attributes_0": "65538", + "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "8", - "ID": "314754", + "DurationIndex": "29", + "ID": "333475", "LaunchDelay": "0", "SchoolMask": "8", - "Speed": "40", - "SpellID": "1978" + "Speed": "0", + "SpellID": "25299" }, { - "Attributes_0": "262160", - "Attributes_1": "201327104", + "Attributes_0": "65536", + "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "0", - "ID": "314834", + "DurationIndex": "32", + "ID": "335014", "LaunchDelay": "0", - "SchoolMask": "1", + "SchoolMask": "2", "Speed": "0", - "SpellID": "1082" + "SpellID": "27813" }, { - "Attributes_0": "327696", - "Attributes_1": "134218240", + "Attributes_0": "65536", + "Attributes_1": "0", "DifficultyID": "0", "DurationIndex": "0", - "ID": "314949", + "ID": "660764", "LaunchDelay": "0", - "SchoolMask": "1", + "SchoolMask": "2", + "Speed": "40", + "SpellID": "401859" + }, + { + "Attributes_0": "134217728", + "Attributes_1": "1024", + "DifficultyID": "0", + "DurationIndex": "9", + "ID": "660783", + "LaunchDelay": "0", + "SchoolMask": "2", "Speed": "0", - "SpellID": "2098" + "SpellID": "401877" }, { "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "106", - "ID": "314956", + "DurationIndex": "165", + "ID": "698363", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "8", "Speed": "0", - "SpellID": "1014" + "SpellID": "408120" }, { "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "106", - "ID": "315545", + "DurationIndex": "165", + "ID": "698367", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "8", "Speed": "0", - "SpellID": "2944" + "SpellID": "408124" }, { - "Attributes_0": "327696", - "Attributes_1": "134218240", + "Attributes_0": "327680", + "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "553", - "ID": "316047", + "DurationIndex": "6", + "ID": "698753", "LaunchDelay": "0", - "SchoolMask": "1", + "SchoolMask": "8", "Speed": "0", - "SpellID": "1943" + "SpellID": "408514" }, { "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", "DurationIndex": "8", - "ID": "318451", + "ID": "698760", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "8", "Speed": "0", - "SpellID": "6222" + "SpellID": "408521" }, { - "Attributes_0": "262160", - "Attributes_1": "134218240", + "Attributes_0": "65536", + "Attributes_1": "0", "DifficultyID": "0", "DurationIndex": "29", - "ID": "320188", + "ID": "707394", "LaunchDelay": "0", - "SchoolMask": "1", + "SchoolMask": "8", "Speed": "0", - "SpellID": "1079" + "SpellID": "417057" }, { "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "106", - "ID": "320479", + "DurationIndex": "29", + "ID": "707405", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "8", "Speed": "0", - "SpellID": "980" + "SpellID": "417068" }, { "Attributes_0": "65536", "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "1", - "ID": "321204", + "DurationIndex": "8", + "ID": "715751", "LaunchDelay": "0", "SchoolMask": "2", "Speed": "0", - "SpellID": "14914" + "SpellID": "425268" }, { "Attributes_0": "65536", - "Attributes_1": "16388", + "Attributes_1": "0", "DifficultyID": "0", - "DurationIndex": "27", - "ID": "326710", + "DurationIndex": "86", + "ID": "729240", "LaunchDelay": "0", - "SchoolMask": "32", + "SchoolMask": "8", "Speed": "0", - "SpellID": "15407" + "SpellID": "436937" } ], "SpellName": [ @@ -1121,6 +2498,10 @@ "ID": "10", "Name_lang": "Blizzard" }, + { + "ID": "17", + "Name_lang": "Power Word: Shield" + }, { "ID": "139", "Name_lang": "Renew" @@ -1129,6 +2510,10 @@ "ID": "172", "Name_lang": "Corruption" }, + { + "ID": "543", + "Name_lang": "Fire Ward" + }, { "ID": "589", "Name_lang": "Shadow Word: Pain" @@ -1137,6 +2522,14 @@ "ID": "755", "Name_lang": "Health Funnel" }, + { + "ID": "774", + "Name_lang": "Rejuvenation" + }, + { + "ID": "974", + "Name_lang": "Earth Shield" + }, { "ID": "980", "Name_lang": "Bane of Agony" @@ -1145,6 +2538,10 @@ "ID": "1014", "Name_lang": "Bane of Agony" }, + { + "ID": "1058", + "Name_lang": "Rejuvenation" + }, { "ID": "1079", "Name_lang": "Rip" @@ -1173,6 +2570,26 @@ "ID": "6222", "Name_lang": "Corruption" }, + { + "ID": "7812", + "Name_lang": "Sacrifice" + }, + { + "ID": "8936", + "Name_lang": "Regrowth" + }, + { + "ID": "10060", + "Name_lang": "Power Infusion" + }, + { + "ID": "10901", + "Name_lang": "Power Word: Shield" + }, + { + "ID": "14752", + "Name_lang": "Divine Spirit" + }, { "ID": "14914", "Name_lang": "Holy Fire" @@ -1180,9 +2597,64 @@ { "ID": "15407", "Name_lang": "Mind Flay" + }, + { + "ID": "25299", + "Name_lang": "Rejuvenation" + }, + { + "ID": "27813", + "Name_lang": "Blessed Recovery" + }, + { + "ID": "401859", + "Name_lang": "Prayer of Mending" + }, + { + "ID": "401877", + "Name_lang": "Prayer of Mending" + }, + { + "ID": "408120", + "Name_lang": "Wild Growth" + }, + { + "ID": "408124", + "Name_lang": "Lifebloom" + }, + { + "ID": "408514", + "Name_lang": "Earth Shield" + }, + { + "ID": "408521", + "Name_lang": "Riptide" + }, + { + "ID": "417057", + "Name_lang": "Rejuvenation" + }, + { + "ID": "417068", + "Name_lang": "Rejuvenation" + }, + { + "ID": "425268", + "Name_lang": "Renew" + }, + { + "ID": "436937", + "Name_lang": "Regrowth" } ], "SpellPower": [ + { + "ID": "169111", + "ManaCost": "85", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "543" + }, { "ID": "169130", "ManaCost": "35", @@ -1225,6 +2697,13 @@ "PowerType": "0", "SpellID": "1978" }, + { + "ID": "169882", + "ManaCost": "25", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "774" + }, { "ID": "169889", "ManaCost": "45", @@ -1246,6 +2725,20 @@ "PowerType": "0", "SpellID": "1014" }, + { + "ID": "170220", + "ManaCost": "0", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "974" + }, + { + "ID": "170378", + "ManaCost": "40", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "1058" + }, { "ID": "170600", "ManaCost": "215", @@ -1281,6 +2774,13 @@ "PowerType": "0", "SpellID": "980" }, + { + "ID": "176128", + "ManaCost": "70", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "8936" + }, { "ID": "176259", "ManaCost": "85", @@ -1288,6 +2788,34 @@ "PowerType": "0", "SpellID": "14914" }, + { + "ID": "176617", + "ManaCost": "45", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "17" + }, + { + "ID": "177255", + "ManaCost": "500", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "10901" + }, + { + "ID": "177259", + "ManaCost": "0", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "10060" + }, + { + "ID": "181019", + "ManaCost": "285", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "14752" + }, { "ID": "181765", "ManaCost": "45", @@ -1295,6 +2823,76 @@ "PowerType": "0", "SpellID": "15407" }, + { + "ID": "188530", + "ManaCost": "360", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "25299" + }, + { + "ID": "265826", + "ManaCost": "210", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "401859" + }, + { + "ID": "304779", + "ManaCost": "550", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "408120" + }, + { + "ID": "304780", + "ManaCost": "0", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "408124" + }, + { + "ID": "304803", + "ManaCost": "0", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "408514" + }, + { + "ID": "304804", + "ManaCost": "150", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "408521" + }, + { + "ID": "305217", + "ManaCost": "25", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "417057" + }, + { + "ID": "305227", + "ManaCost": "360", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "417068" + }, + { + "ID": "305559", + "ManaCost": "30", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "425268" + }, + { + "ID": "306168", + "ManaCost": "120", + "OptionalCost": "0", + "PowerType": "0", + "SpellID": "436937" + }, { "ID": "310621", "ManaCost": "1", diff --git a/tests/scripts/spell_catalog_test.py b/tests/scripts/spell_catalog_test.py index a9fd68b..56fc809 100644 --- a/tests/scripts/spell_catalog_test.py +++ b/tests/scripts/spell_catalog_test.py @@ -146,5 +146,57 @@ def test_generation_is_independent_of_input_order(self): self.assertEqual(self.report, catalog.compile_catalog(reversed_tables, self.pin)) +class BuffCatalogTests(unittest.TestCase): + extras = {"hot": ((408120,),), "proc": ((408514,), (401859, 401877)), "external": ((10060,),), "raid": ((14752,),)} + + @classmethod + def setUpClass(cls): + cls.pin = catalog.pinned_source() + cls.tables = json.loads(catalog.FIXTURE.read_text())["tables"] + cls.buffs = catalog.compile_buffs(cls.tables, cls.pin, cls.extras) + cls.families = cls.buffs["families"] + cls.by_id = {spell_id: root for root, family in cls.families.items() for spell_id in family["ids"]} + + def test_skill_line_and_raid_flagged_ranks_share_one_family(self): + rejuvenation = self.families[774] + self.assertEqual(("DRUID", "hot"), (rejuvenation["class"], rejuvenation["kind"])) + self.assertTrue({774, 1058, 25299, 417057, 417068} <= set(rejuvenation["ids"])) + self.assertEqual(436937, max(self.families[8936]["ids"])) + self.assertIn(425268, self.families[139]["ids"]) + self.assertIn(417057, self.buffs["raidInCombat"]) + self.assertNotIn(774, self.buffs["raidInCombat"]) + + def test_heals_and_absorbs_are_classified_from_effects(self): + expected = {17: "absorb", 139: "hot", 774: "hot", 8936: "hot", 408124: "hot", 408521: "hot"} + self.assertEqual(expected, {root: self.families[root]["kind"] for root in expected}) + self.assertEqual(17, self.by_id[10901]) + + def test_shared_class_masks_split_by_school_and_aura(self): + self.assertNotIn(27813, self.by_id) + self.assertNotEqual(self.by_id[10060], self.by_id[14752]) + + def test_self_and_pet_absorbs_are_not_heals(self): + self.assertNotIn(543, self.by_id) + self.assertNotIn(7812, self.by_id) + + def test_curated_extras_expand_from_their_roots(self): + self.assertEqual(("hot", [408120]), (self.families[408120]["kind"], self.families[408120]["ids"])) + self.assertEqual([974, 408514], self.families[408514]["ids"]) + self.assertEqual(401859, self.by_id[401877]) + self.assertEqual("proc", self.families[401859]["kind"]) + with self.assertRaisesRegex(ValueError, "curated buff roots"): + catalog.compile_buffs(self.tables, self.pin, {"hot": ((9999999,),)}) + + def test_lua_output_lists_families_and_lookups(self): + output = catalog.lua_buffs(self.buffs) + self.assertIn('[774] = { name = "Rejuvenation", class = "DRUID", kind = "hot", ids = { 774, 1058, 25299, 417057', output) + self.assertIn("[417068] = 774,", output) + self.assertIn("[417057] = true,", output) + + def test_buff_generation_is_independent_of_input_order(self): + reversed_tables = {name: list(reversed(rows)) for name, rows in self.tables.items()} + self.assertEqual(self.buffs, catalog.compile_buffs(reversed_tables, self.pin, self.extras)) + + if __name__ == "__main__": unittest.main() diff --git a/tests/spec/tracking/buff_catalog_spec.lua b/tests/spec/tracking/buff_catalog_spec.lua new file mode 100644 index 0000000..d32579f --- /dev/null +++ b/tests/spec/tracking/buff_catalog_spec.lua @@ -0,0 +1,73 @@ +local Helpers = require("helpers") + +describe("Generated buff catalogue #buffs", function() + local catalog + + before_each(function() + catalog = Helpers.LoadAddon().BuffCatalog + end) + + local function contains(ids, wanted) + for _, id in ipairs(ids) do + if id == wanted then + return true + end + end + return false + end + + it("expands any Rejuvenation rank to both rank sets", function() + local rejuvenation = catalog.families[774] + assert.equals("Rejuvenation", rejuvenation.name) + assert.equals("DRUID", rejuvenation.class) + assert.equals("hot", rejuvenation.kind) + for _, id in ipairs({ 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 417057, 417062, 417068 }) do + assert.is_true(contains(rejuvenation.ids, id), id) + assert.equals(774, catalog.byId[id]) + end + end) + + it("lists the core heals and shields of every healing class", function() + local expected = { + [139] = { "Renew", "PRIEST", "hot" }, + [8936] = { "Regrowth", "DRUID", "hot" }, + [17] = { "Power Word: Shield", "PRIEST", "absorb" }, + [408521] = { "Riptide", "SHAMAN", "hot" }, + [408124] = { "Lifebloom", "DRUID", "hot" }, + [408120] = { "Wild Growth", "DRUID", "hot" }, + [408514] = { "Earth Shield", "SHAMAN", "proc" }, + [401859] = { "Prayer of Mending", "PRIEST", "proc" }, + } + for root, fields in pairs(expected) do + local family = catalog.families[root] + assert.same(fields, { family.name, family.class, family.kind }) + end + assert.equals(139, catalog.byId[25315]) + assert.equals(17, catalog.byId[10901]) + assert.equals(401859, catalog.byId[401877]) + end) + + it("maps every family member back to its root", function() + for root, family in pairs(catalog.families) do + for _, id in ipairs(family.ids) do + assert.equals(root, catalog.byId[id]) + end + end + end) + + it("flags only the raid-in-combat rank set", function() + assert.is_true(catalog.raidInCombat[417057]) + assert.is_nil(catalog.raidInCombat[774]) + assert.is_nil(catalog.raidInCombat[17]) + end) + + it("gives non-healing classes no heal families", function() + local healers = {} + for _, family in pairs(catalog.families) do + if family.kind == "hot" or family.kind == "absorb" or family.kind == "proc" then + healers[family.class] = true + end + end + assert.same({ DRUID = true, MAGE = true, PALADIN = true, PRIEST = true, SHAMAN = true }, healers) + end) +end) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index 5d10b58..d9d1980 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -1,6 +1,6 @@ # Design: Healer buffs out of the box -Status: proposal (research done, nothing implemented). Targets Forever Interface 16001, build 1.60.1.70862. +Status: in progress. §1 (buff catalogue) is implemented (UNIT-13). Targets Forever Interface 16001, build 1.60.1.70862. ## Problem @@ -97,6 +97,25 @@ proc buffs (Earth Shield, Prayer of Mending) and the EllesmereUI-style categories (externals, defensives) by family root only — ranks always come from the data. +As built (`compile_buffs`, 51 families on 1.60.1.70862): + +- Grouping uses the DoT rule exactly: class set, the four masks, school and the + primary aura. School and aura matter: Blessed Recovery shares Rejuvenation's + set 7 / mask 16, and Power Infusion shares Divine Spirit's set and mask. +- A group is a `hot` (aura 8) or `absorb` (aura 69) family only when one of its + **skill-line** ranks lands on someone other than the caster, pet or master + (`ImplicitTarget_0` not 1, 5, 27). This keeps out Ice Barrier, Fire/Frost Ward + (self-only skill ranks, ally-targeted rune variants) and the Voidwalker's + Sacrifice, so Warrior, Rogue, Hunter and Warlock get no heal families. +- Heal families exist for Druid, Priest, Shaman, Paladin and Mage (Season of + Discovery arcane healing: Mass Regeneration, curated Regeneration and + Temporal Beacon). +- `BUFF_EXTRAS` holds roots only. Several roots make one family: Prayer of + Mending is the cast (401859 …) plus the buff (401877 …); Sacred Shield is + 412019 plus its absorb 412018. Kinds: `hot`, `proc`, `external`, `defensive`, + `raid`. A missing root stops generation for review. +- `raidInCombat` lists catalogue IDs with `SpellAuraVisibility` Type 0. + ### 2. Rank-proof slots (fixes the reported bug) `Slots.ParseIDs` keeps its validation; resolving a slot expands every entered From 07c52bee64438f78e5bc6b28587928433f3fab29 Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 03:49:24 +0100 Subject: [PATCH 3/9] UNIT-14 Match every rank in ClickGrid buff slots Slot spell IDs expand through the buff catalogue when building native candidates and drawing samples; saved text stays as typed. Adds BuffSpells (Family, Expand, Roots) and a "Track a spell" family picker that writes the family root ID. --- UnitFrames/Tracking/BuffSpells.lua | 33 ++++++++ UnitFrames/UnitFrames.toc | 1 + UnitFrames_ClickGrid/Auras/Slots.lua | 10 ++- UnitFrames_ClickGrid/Groups/Definitions.lua | 17 +++- .../clickgrid/clickgrid_buff_slots_spec.lua | 81 +++++++++++++++++++ .../spec/clickgrid/clickgrid_refresh_spec.lua | 4 +- tests/spec/clickgrid/clickgrid_spec.lua | 4 +- 7 files changed, 143 insertions(+), 7 deletions(-) create mode 100644 UnitFrames/Tracking/BuffSpells.lua create mode 100644 tests/spec/clickgrid/clickgrid_buff_slots_spec.lua diff --git a/UnitFrames/Tracking/BuffSpells.lua b/UnitFrames/Tracking/BuffSpells.lua new file mode 100644 index 0000000..9ce9353 --- /dev/null +++ b/UnitFrames/Tracking/BuffSpells.lua @@ -0,0 +1,33 @@ +local _, ns = ... +local BuffSpells = {} +ns.BuffSpells = BuffSpells + +function BuffSpells.Family(spellID) + local root = ns.BuffCatalog.byId[spellID] + return root and ns.BuffCatalog.families[root], root +end + +function BuffSpells.Expand(ids) + local expanded = {} + for id in pairs(ids) do + local family = BuffSpells.Family(id) + if family then + for _, member in ipairs(family.ids) do expanded[member] = true end + else + expanded[id] = true + end + end + return expanded +end + +function BuffSpells.Roots() + local families, roots = ns.BuffCatalog.families, {} + for root in pairs(families) do roots[#roots + 1] = root end + table.sort(roots, function(a, b) + local left, right = families[a], families[b] + if left.class ~= right.class then return left.class < right.class end + if left.name ~= right.name then return left.name < right.name end + return a < b + end) + return roots +end diff --git a/UnitFrames/UnitFrames.toc b/UnitFrames/UnitFrames.toc index 1ec706e..f0d4c8d 100644 --- a/UnitFrames/UnitFrames.toc +++ b/UnitFrames/UnitFrames.toc @@ -40,6 +40,7 @@ Core\PerfEdits.lua Core\Profiles.lua Tracking\BuffCatalog.lua +Tracking\BuffSpells.lua Tracking\DotCatalog.lua Tracking\DotSpells.lua Tracking\DotTracker.lua diff --git a/UnitFrames_ClickGrid/Auras/Slots.lua b/UnitFrames_ClickGrid/Auras/Slots.lua index 17f2fab..3d15c80 100644 --- a/UnitFrames_ClickGrid/Auras/Slots.lua +++ b/UnitFrames_ClickGrid/Auras/Slots.lua @@ -16,6 +16,12 @@ function Slots.ParseIDs(text) return ids, count end +function Slots.ResolveIDs(text) + local ids, reason = Slots.ParseIDs(text) + if not ids then return nil, reason end + return UF.BuffSpells.Expand(ids) +end + function Slots:OnCreate(parent) self.frame = CreateFrame("Frame", nil, parent) self.frame:SetAllPoints(parent) @@ -50,7 +56,7 @@ function Slots:OnApply(cfg) for i = 1, 3 do local key, button = "slot" .. i, self.buttons[i] local slot = cfg[key] - local ids, reason = Slots.ParseIDs(slot.spell) + local ids, reason = Slots.ResolveIDs(slot.spell) if not ids then self.errors[#self.errors + 1] = key .. ": " .. reason end self.container:SetAuraSlotFilterString(key, slot.own and "HELPFUL|PLAYER" or "HELPFUL") -- Unlike filter strings, the native candidate setter always rebuilds @@ -127,7 +133,7 @@ function Slots:RenderSamples() self:StyleButton(button) button:ClearAllPoints() button:SetPoint(cfg.anchor, self.frame, cfg.anchor, cfg.offsetX, cfg.offsetY) - local ids = Slots.ParseIDs(cfg.spell) + local ids = Slots.ResolveIDs(cfg.spell) local found for _, aura in ipairs(self.previewData.buffs or {}) do if cfg.enabled and ids and ids[aura.spellId] and (not cfg.own or aura.sourceUnit == "player") then diff --git a/UnitFrames_ClickGrid/Groups/Definitions.lua b/UnitFrames_ClickGrid/Groups/Definitions.lua index 30337c4..5301b09 100644 --- a/UnitFrames_ClickGrid/Groups/Definitions.lua +++ b/UnitFrames_ClickGrid/Groups/Definitions.lua @@ -184,10 +184,25 @@ CG.IndicatorSchema = UF.Schema.Concat( { key = "privateSize", type = "range", label = "Private aura size", min = 10, max = 40, step = 1, default = 18 }, }) +local function FamilyValues() + local values, classes = { { "", "Pick a spell" } }, LOCALIZED_CLASS_NAMES_MALE or {} + for _, root in ipairs(UF.BuffSpells.Roots()) do + local family = UF.BuffCatalog.families[root] + values[#values + 1] = { root, family.name .. ": all ranks (" .. (classes[family.class] or family.class) .. ")" } + end + return values +end + local slotSchema = { { key = "enabled", type = "toggle", label = "Enabled", default = false }, { key = "spell", type = "text", label = "Friendly buff spell IDs", default = "", - tooltip = "Comma-separated numeric aura spell IDs. Exact slots are only for friendly buffs." }, + tooltip = "Comma-separated numeric aura spell IDs. Any rank of a known spell matches all its ranks. Exact slots are only for friendly buffs." }, + { key = "family", type = "select", label = "Track a spell", default = "", values = FamilyValues, + tooltip = "Pick a spell to track every rank of it. Replaces the spell IDs above with its first rank's ID.", + onSet = function(group, value) + group.family = nil + if value ~= "" then group.spell = tostring(value) end + end }, { key = "own", type = "toggle", label = "Only buffs cast by me", default = true }, { key = "size", type = "range", label = "Size", min = 10, max = 32, step = 1, default = 14 }, { key = "anchor", type = "select", label = "Position", default = "TOPLEFT", values = { diff --git a/tests/spec/clickgrid/clickgrid_buff_slots_spec.lua b/tests/spec/clickgrid/clickgrid_buff_slots_spec.lua new file mode 100644 index 0000000..ecf18da --- /dev/null +++ b/tests/spec/clickgrid/clickgrid_buff_slots_spec.lua @@ -0,0 +1,81 @@ +local Helpers = require("helpers") + +describe("ClickGrid fixed buff slots match every rank #buffs", function() + local UF, CG, slots + + before_each(function() + UF, CG = Helpers.LoadClickGrid() + slots = CG:GetGridButton(CG.headers.party:GetAttribute("child1").Member).slots + end) + + local function Candidates() + return slots.container.__state.slots.slot1.candidateFilters.includeSpellIDs + end + + it("lists every Rejuvenation rank of both ID sets for a slot set to 774", function() + CG.Config:Set("slots.slot1.spell", "774") + CG.Config:Set("slots.slot1.enabled", true) + for _, id in ipairs({ 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 417057, 417062, 417068 }) do + assert.is_true(Candidates()[id], id) + end + assert.equals("774", CG.Config:Get().slots.slot1.spell) + end) + + it("passes unknown IDs through beside expanded families", function() + CG.Config:Set("slots.slot1.spell", "2061, 139") + CG.Config:Set("slots.slot1.enabled", true) + assert.is_true(Candidates()[2061]) + assert.is_true(Candidates()[25315]) + assert.is_true(Candidates()[425268]) + assert.is_nil(Candidates()[774]) + end) + + it("keeps native candidates when another rank of the same family is typed", function() + CG.Config:Set("slots.slot1.spell", "774") + CG.Config:Set("slots.slot1.enabled", true) + local calls, set = 0, slots.container.SetAuraSlotCandidateFilters + slots.container.SetAuraSlotCandidateFilters = function(...) + calls = calls + 1 + return set(...) + end + CG.Config:Set("slots.slot1.spell", "9841, 417060") + assert.equals(0, calls) + CG.Config:Set("slots.slot1.spell", "139") + assert.equals(1, calls) + end) + + it("shows a druid's rank 10 Rejuvenation on a slot set to rank 1", function() + CG.Config:Set("slots.slot1.spell", "774") + CG.Config:Set("slots.slot1.own", false) + CG.Config:Set("slots.slot1.enabled", true) + assert.is_true(Candidates()[9841]) + local rejuvenation = UF.Util.Copy(UF.Units.SAMPLE.buffs[4]) + rejuvenation.spellId = 9841 + slots:ShowSample({ buffs = { rejuvenation } }) + assert.is_true(slots.samples[1]:IsShown()) + end) + + it("writes a picked family's root ID and stores no picker value", function() + assert.is_true(CG.Config:Set("slots.slot1.spell", "2061")) + assert.is_true(CG.Config:Set("slots.slot1.family", 408521)) + local slot = CG.Config:Get().slots.slot1 + assert.equals("408521", slot.spell) + assert.is_nil(slot.family) + assert.is_true(CG.Config:Set("slots.slot1.family", "")) + assert.equals("408521", CG.Config:Get().slots.slot1.spell) + end) + + it("offers every catalogued family once in the picker, by class then name", function() + local values = UF.Schema.GetValues(UF.Schema.Find(CG.SlotSchema, "slot1.family")) + assert.same({ "", "Pick a spell" }, values[1]) + local seen, count = {}, 0 + for i = 2, #values do + local root = values[i][1] + assert.is_nil(seen[root]) + seen[root], count = true, count + 1 + end + for _ in pairs(UF.BuffCatalog.families) do count = count - 1 end + assert.equals(0, count) + assert.is_true(seen[774]) + end) +end) diff --git a/tests/spec/clickgrid/clickgrid_refresh_spec.lua b/tests/spec/clickgrid/clickgrid_refresh_spec.lua index a428b85..941b852 100644 --- a/tests/spec/clickgrid/clickgrid_refresh_spec.lua +++ b/tests/spec/clickgrid/clickgrid_refresh_spec.lua @@ -68,14 +68,14 @@ describe("ClickGrid targeted refresh", function() end) it("routes slots independently and retains the shared member aura switch", function() - local counters = Observe(function() CG.Config:Set("slots.slot1.spell", "139,774") end) + local counters = Observe(function() CG.Config:Set("slots.slot1.spell", "2050,2061") end) assert.is_nil(counters.rootApply) assert.is_nil(counters.unitBind) assert.is_nil(counters.clickgridPanelLayout) assert.is_nil(counters.clickgridBindingsCompile) local slots = CG:GetGridButton(Cell().Member).slots CG.Config:Set("slots.slot1.enabled", true) - assert.same({ [139] = true, [774] = true }, slots.candidates.slot1) + assert.same({ [2050] = true, [2061] = true }, slots.candidates.slot1) CG.Config:SetStyle("member", "auras.enabled", false) assert.is_false(slots:IsEnabled()) CG.Config:SetStyle("member", "auras.enabled", true) diff --git a/tests/spec/clickgrid/clickgrid_spec.lua b/tests/spec/clickgrid/clickgrid_spec.lua index 380e28e..23426a5 100644 --- a/tests/spec/clickgrid/clickgrid_spec.lua +++ b/tests/spec/clickgrid/clickgrid_spec.lua @@ -458,12 +458,12 @@ describe("ClickGrid companion", function() it("validates fixed friendly-buff IDs and passes them to native slots", function() assert.is_false(CG.Config:Set("slots.slot1.spell", "139, invalid")) assert.is_false(CG.Config:Set("slots.slot1.spell", "1e999")) - CG.Config:Set("slots.slot1.spell", "139,774") + CG.Config:Set("slots.slot1.spell", "2050,2061") CG.Config:Set("slots.slot1.enabled", true) local slots = CG:GetGridButton(CG.headers.party:GetAttribute("child1").Member).slots local native = slots.container.__state.slots.slot1 assert.equals("HELPFUL|PLAYER", native.filter) - assert.same({ [139] = true, [774] = true }, native.candidateFilters.includeSpellIDs) + assert.same({ [2050] = true, [2061] = true }, native.candidateFilters.includeSpellIDs) CG.Config:Set("slots.slot1.enabled", false) assert.same({}, native.candidateFilters.includeSpellIDs) assert.is_nil(UF.Schema.Find(CG.SlotSchema, "slot1.debuff")) From 5615178ec076c466f141361df76a1610fbb58752 Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 03:59:56 +0100 Subject: [PATCH 4/9] UNIT-15 Show my heals & shields on ClickGrid members by default New catalogue-backed buff filter (HELPFUL|PLAYER + the player's class hot/absorb/proc families as includeSpellIDs), compared by value before the native candidate setter. ClickGrid member buffs default on with it and no duration cap; previews count your class's sample heals as yours. RAID_IN_COMBAT choice relabelled. Adds a druid member-cell proof scenario. --- README.md | 2 +- USER_GUIDE.md | 8 +- UnitFrames/Components/Auras.lua | 29 ++++-- UnitFrames/Tracking/BuffSpells.lua | 21 ++++ UnitFrames_ClickGrid/Groups/Definitions.lua | 2 +- UnitFrames_ClickGrid/Preview.lua | 2 + UnitFrames_ClickGrid/README.md | 14 +-- tests/fixtures/schema_snapshot.txt | 90 ++++++++++------- tests/proof/workbench.lua | 8 ++ .../spec/auras/aura_category_filters_spec.lua | 2 +- tests/spec/auras/aura_heal_filter_spec.lua | 99 +++++++++++++++++++ tests/spec/auras/aura_icon_spec.lua | 14 +-- .../clickgrid_category_auras_spec.lua | 5 +- .../clickgrid/clickgrid_indicators_spec.lua | 4 +- .../clickgrid/clickgrid_member_heals_spec.lua | 63 ++++++++++++ todos/10-design-healer-buffs.md | 4 +- 16 files changed, 299 insertions(+), 68 deletions(-) create mode 100644 tests/spec/auras/aura_heal_filter_spec.lua create mode 100644 tests/spec/clickgrid/clickgrid_member_heals_spec.lua diff --git a/README.md b/README.md index e7d12ab..31fc919 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ each change. type colour (**Debuff glow**): a soft halo, or the animated proc flash from Blizzard's action buttons. - Filter buffs and debuffs by crowd control, big or external defensives, - important buffs, or your own heals over time. + important buffs, or your own heals and shields. - Hide Blizzard's own player buff and debuff sections, each on its own toggle. Changes wait until combat ends. - Show crowd control and defensives over the portrait or on a frame edge, with diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 55e6873..d91758c 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -397,9 +397,11 @@ border by type** to use **Icon frame > Border colour** for every icon. their timers; Animated previews cycle them. Samples include stacks, a permanent buff, and all four debuff dispel types, using the saved aura style. -**Which** also offers category filters: **My heals over time** (your own -buffs flagged for raid frames in combat), **Big defensives**, **External -defensives**, **Important** buffs, and **Crowd control** debuffs. +**Which** also offers category filters: **My heals & shields** (your own heals +over time, shields and heal procs, every rank of each spell), **My raid-flagged +buffs** (your own buffs whose spell ID the client flags for raid frames in +combat; shields are not flagged), **Big defensives**, **External defensives**, +**Important** buffs, and **Crowd control** debuffs. ## Crowd control & defensives diff --git a/UnitFrames/Components/Auras.lua b/UnitFrames/Components/Auras.lua index 65afbc9..1095129 100644 --- a/UnitFrames/Components/Auras.lua +++ b/UnitFrames/Components/Auras.lua @@ -30,9 +30,12 @@ Auras.STACK_FIRST = { { "buffs", "Buffs" }, { "debuffs", "Debuffs" }, } +Auras.MY_HEALS = "MY_HEALS" + Auras.BUFF_FILTERS = { { "HELPFUL", "All buffs" }, { "HELPFUL|PLAYER", "Cast by me" }, { "HELPFUL|RAID", "Raid buffs" }, - { "HELPFUL|PLAYER|RAID_IN_COMBAT", "My heals over time" }, + { Auras.MY_HEALS, "My heals & shields" }, + { "HELPFUL|PLAYER|RAID_IN_COMBAT", "My raid-flagged buffs (no shields)" }, { "HELPFUL|BIG_DEFENSIVE", "Big defensives" }, { "HELPFUL|EXTERNAL_DEFENSIVE", "External defensives" }, { "HELPFUL|IMPORTANT", "Important" }, } @@ -50,6 +53,12 @@ Auras.SAMPLE_FILTER_FLAGS = { local CLASSIFIED_FILTERS = { BIG_DEFENSIVE = true, EXTERNAL_DEFENSIVE = true, IMPORTANT = true } local ALL_FILTERS = { buffs = "HELPFUL", debuffs = "HARMFUL" } +local CATALOG_FILTERS = { [Auras.MY_HEALS] = { filter = "HELPFUL|PLAYER", spellIDs = ns.BuffSpells.PlayerHealIDs } } + +function Auras.IncludeSpellIDs(filter) + local catalog = CATALOG_FILTERS[filter] + return catalog and catalog.spellIDs() or nil +end function Auras.FilterSupported(filter) if ns.Caps.auraClassification then return true end @@ -60,6 +69,7 @@ function Auras.FilterSupported(filter) end function Auras.GroupFilter(kind, filter) + if CATALOG_FILTERS[filter] then return CATALOG_FILTERS[filter].filter end return Auras.FilterSupported(filter) and filter or ALL_FILTERS[kind] end @@ -248,7 +258,9 @@ end -- A group's native candidate filters (nil = none). function Auras.CandidateFilters(group) - return group.maxDuration > 0 and { maxDuration = group.maxDuration } or nil + local include = Auras.IncludeSpellIDs(group.filter) + if group.maxDuration <= 0 and not include then return nil end + return { maxDuration = group.maxDuration > 0 and group.maxDuration or nil, includeSpellIDs = include } end -- Native setters that do engine work even for unchanged values: candidate @@ -271,10 +283,10 @@ local function Applied(container, kind) end function Auras.ApplyGroupCandidates(container, kind, group) - local applied = Applied(container, kind) - if applied.maxDuration == group.maxDuration then return end - applied.maxDuration = group.maxDuration - container:SetAuraGroupCandidateFilters(kind, Auras.CandidateFilters(group)) + local applied, candidates = Applied(container, kind), Auras.CandidateFilters(group) + if applied.hasCandidates and ns.Util.Equals(applied.candidates, candidates) then return end + applied.hasCandidates, applied.candidates = true, candidates + container:SetAuraGroupCandidateFilters(kind, candidates) end function Auras.ApplyGroupSort(container, kind, method, direction) @@ -564,7 +576,8 @@ function Auras:ShowSample(values) self:RenderSamples() end -function Auras.MatchesSampleFilter(aura, filter, maxDuration) +function Auras.MatchesSampleFilter(aura, filter, maxDuration, includeSpellIDs) + if includeSpellIDs and not includeSpellIDs[aura.spellId] then return false end for component in filter:gmatch("[^|]+") do if component == "PLAYER" and aura.sourceUnit ~= "player" then return false end local flag = Auras.SAMPLE_FILTER_FLAGS[component] @@ -583,7 +596,7 @@ function Auras:RenderSamples() if cfg.enabled then for _, aura in ipairs(self:GetSampleOrder(kind)) do if #elements >= self:GetSampleLimit(kind) then break end - if Auras.MatchesSampleFilter(aura, Auras.GroupFilter(kind, cfg.filter), cfg.maxDuration) then + if Auras.MatchesSampleFilter(aura, Auras.GroupFilter(kind, cfg.filter), cfg.maxDuration, Auras.IncludeSpellIDs(cfg.filter)) then local index = #elements + 1 local button = container.ufButtons[index] if not button then diff --git a/UnitFrames/Tracking/BuffSpells.lua b/UnitFrames/Tracking/BuffSpells.lua index 9ce9353..a49a3b8 100644 --- a/UnitFrames/Tracking/BuffSpells.lua +++ b/UnitFrames/Tracking/BuffSpells.lua @@ -2,6 +2,9 @@ local _, ns = ... local BuffSpells = {} ns.BuffSpells = BuffSpells +BuffSpells.HEAL_KINDS = { hot = true, absorb = true, proc = true } +local healIDs = {} + function BuffSpells.Family(spellID) local root = ns.BuffCatalog.byId[spellID] return root and ns.BuffCatalog.families[root], root @@ -20,6 +23,24 @@ function BuffSpells.Expand(ids) return expanded end +function BuffSpells.ClassIDs(class, kinds) + local ids = {} + for _, family in pairs(ns.BuffCatalog.families) do + if (class == nil or family.class == class) and kinds[family.kind] then + for _, id in ipairs(family.ids) do ids[id] = true end + end + end + return ids +end + +function BuffSpells.PlayerHealIDs() + local _, class = UnitClass("player") + if issecretvalue(class) then class = nil end + local key = class or "" + healIDs[key] = healIDs[key] or BuffSpells.ClassIDs(class, BuffSpells.HEAL_KINDS) + return healIDs[key] +end + function BuffSpells.Roots() local families, roots = ns.BuffCatalog.families, {} for root in pairs(families) do roots[#roots + 1] = root end diff --git a/UnitFrames_ClickGrid/Groups/Definitions.lua b/UnitFrames_ClickGrid/Groups/Definitions.lua index 5301b09..326b884 100644 --- a/UnitFrames_ClickGrid/Groups/Definitions.lua +++ b/UnitFrames_ClickGrid/Groups/Definitions.lua @@ -19,7 +19,7 @@ local member = UF.Units:Derive("pet", { -- Replaces the pet's aura defaults as a whole. member.auras.defaults = { durationPosition = "CENTER", durationSize = 8, countSize = 8, - buffs = { enabled = false, filter = "HELPFUL|PLAYER|RAID_IN_COMBAT", maxDuration = 120, max = 4, size = 14, position = "top", gap = 1, alignment = "end" }, + buffs = { enabled = true, filter = UF.Components.Auras.MY_HEALS, maxDuration = 0, max = 4, size = 14, position = "top", gap = 1, alignment = "end" }, debuffs = { enabled = false, sort = "unitDebuff", max = 3, size = 16, position = "bottom", gap = 1 }, } CG.definitions = { diff --git a/UnitFrames_ClickGrid/Preview.lua b/UnitFrames_ClickGrid/Preview.lua index a74fe4e..a13a0b7 100644 --- a/UnitFrames_ClickGrid/Preview.lua +++ b/UnitFrames_ClickGrid/Preview.lua @@ -213,8 +213,10 @@ function Preview:Values(index, value) if category then value.categoryAuras[category.key] = UF.Util.Copy(UF.Units.CATEGORY_SAMPLES[category.key]) end -- A few plain examples for the artwork already in UnitFrames; unrelated -- sample icons must not match a fixed slot by a made-up default ID. + local mine = UF.BuffSpells.PlayerHealIDs() for i, aura in ipairs(value.buffs) do aura.spellId = sampleBuffIDs[i] + if mine[aura.spellId] then aura.sourceUnit = "player" end local remaining = UF.Units.SAMPLE.buffs[i].remaining aura.remaining = self.data.source == "animated" and aura.duration > 0 and (remaining - self.time - index) % aura.duration + 1 or remaining diff --git a/UnitFrames_ClickGrid/README.md b/UnitFrames_ClickGrid/README.md index 00d49af..234aa57 100644 --- a/UnitFrames_ClickGrid/README.md +++ b/UnitFrames_ClickGrid/README.md @@ -103,15 +103,17 @@ client after adding it. For local builds and incremental updates, see the combat. With Clique loaded, Clique owns clicks and this addon's binding editor does not control live actions. - Independent native buff/debuff rows, own-cast/dispel filters, timers, - stacks, borders, duration limits and native sorting. Both rows are off by - default, keeping the panel compact (2-pixel gaps); when enabled, the buff row - shows your own heals over time (`HELPFUL|PLAYER|RAID_IN_COMBAT`) up to two - minutes long, not long maintenance buffs. A saved filter choice is kept. + stacks, borders, duration limits and native sorting. The buff row is on by + default with **My heals & shields**: your own heals over time, shields and + heal procs (Earth Shield, Prayer of Mending), every rank, from the generated + buff catalogue. Classes without heals see no buffs there. The debuff row is + off by default. A saved filter choice is kept. - A centre icon for crowd control, big and external defensives (crowd control on top), mouse-transparent so hover and mouseover casts reach the member. - Three configurable fixed friendly-buff slots, each accepting comma-separated - numeric aura spell IDs, own/any caster, position and size. Multiple IDs share - a slot; Blizzard chooses the earliest-expiring matching effect. These are + numeric aura spell IDs, own/any caster, position and size. Any rank of a + catalogued spell matches all its ranks; **Track a spell** picks one by name. + Multiple IDs share a slot; Blizzard chooses the earliest-expiring matching effect. These are buff slots, not arbitrary friendly-debuff encounter rules. - Role, leader/assistant, ready check, dead/ghost, incoming resurrection, summon, phase, optional threat and native private-aura anchors, subject to diff --git a/tests/fixtures/schema_snapshot.txt b/tests/fixtures/schema_snapshot.txt index e3e7bf9..03d3ed1 100644 --- a/tests/fixtures/schema_snapshot.txt +++ b/tests/fixtures/schema_snapshot.txt @@ -1937,7 +1937,7 @@ option sharedSide type="select" label="Buffs and debuffs on one side" default="c option stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -2144,7 +2144,7 @@ option border.inset type="range" label="Background inset" default=3 min=0 max=16 option border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -3434,7 +3434,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -3518,7 +3518,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -6517,7 +6517,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -6601,7 +6601,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -9112,7 +9112,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -9196,7 +9196,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -11741,7 +11741,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -11825,7 +11825,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -14308,7 +14308,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -14392,7 +14392,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -16877,7 +16877,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -16961,7 +16961,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -21576,7 +21576,7 @@ option castbar.colors.success type="color" label="Succeeded" inherit="colors.cas option castbar.background type="color" label="Background" default={0,0,0,0} tooltip=#0297179c option castbar.holdTime type="range" label="Hold after finish (s)" default=0.4 min=0 max=2 step=0.1 option castbar.fadeTime type="range" label="Fade out (s)" default=0.3 min=0 max=2 step=0.1 -option auras type="group" label="Buffs & debuffs" defaults={buffs={alignment="end",enabled=false,filter="HELPFUL|PLAYER|RAID_IN_COMBAT",gap=1,max=4,maxDuration=120,position="top",size=14},countSize=8,debuffs={enabled=false,gap=1,max=3,position="bottom",size=16,sort="unitDebuff"},durationPosition="CENTER",durationSize=8} +option auras type="group" label="Buffs & debuffs" defaults={buffs={alignment="end",enabled=true,filter="MY_HEALS",gap=1,max=4,maxDuration=0,position="top",size=14},countSize=8,debuffs={enabled=false,gap=1,max=3,position="bottom",size=16,sort="unitDebuff"},durationPosition="CENTER",durationSize=8} option auras.enabled type="toggle" label="Enabled" default=true option auras.spacing type="range" label="Icon spacing" default=2 min=0 max=10 step=1 option auras.showDuration type="toggle" label="Show time left" default=true @@ -21612,7 +21612,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -21696,7 +21696,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -21817,14 +21817,14 @@ default auras.border.inset = 1 default auras.border.padding = 2 default auras.border.size = 8 default auras.buffs.alignment = "end" -default auras.buffs.enabled = false -default auras.buffs.filter = "HELPFUL|PLAYER|RAID_IN_COMBAT" +default auras.buffs.enabled = true +default auras.buffs.filter = "MY_HEALS" default auras.buffs.gap = 1 default auras.buffs.growth = "forward" default auras.buffs.height = 20 default auras.buffs.lineSize = 0 default auras.buffs.max = 4 -default auras.buffs.maxDuration = 120 +default auras.buffs.maxDuration = 0 default auras.buffs.offsetX = 0 default auras.buffs.offsetY = 0 default auras.buffs.position = "top" @@ -22546,14 +22546,14 @@ resolved auras.border.inset = 1 resolved auras.border.padding = 2 resolved auras.border.size = 8 resolved auras.buffs.alignment = "end" -resolved auras.buffs.enabled = false -resolved auras.buffs.filter = "HELPFUL|PLAYER|RAID_IN_COMBAT" +resolved auras.buffs.enabled = true +resolved auras.buffs.filter = "MY_HEALS" resolved auras.buffs.gap = 1 resolved auras.buffs.growth = "forward" resolved auras.buffs.height = 20 resolved auras.buffs.lineSize = 0 resolved auras.buffs.max = 4 -resolved auras.buffs.maxDuration = 120 +resolved auras.buffs.maxDuration = 0 resolved auras.buffs.offsetX = 0 resolved auras.buffs.offsetY = 0 resolved auras.buffs.position = "top" @@ -23286,11 +23286,11 @@ definition auraBar.collapsible = true definition auraBar.defaults = {} definition auras.clickThrough = true definition auras.defaults.buffs.alignment = "end" -definition auras.defaults.buffs.enabled = false -definition auras.defaults.buffs.filter = "HELPFUL|PLAYER|RAID_IN_COMBAT" +definition auras.defaults.buffs.enabled = true +definition auras.defaults.buffs.filter = "MY_HEALS" definition auras.defaults.buffs.gap = 1 definition auras.defaults.buffs.max = 4 -definition auras.defaults.buffs.maxDuration = 120 +definition auras.defaults.buffs.maxDuration = 0 definition auras.defaults.buffs.position = "top" definition auras.defaults.buffs.size = 14 definition auras.defaults.countSize = 8 @@ -24105,7 +24105,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -24189,7 +24189,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -26616,7 +26616,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -26700,7 +26700,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#5dbbd1fb +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -28464,7 +28464,8 @@ option indicators.privateSize type="range" label="Private aura size" default=18 option slots type="group" label="Fixed friendly buff slots" option slots.slot1 type="group" label="Friendly buff slot 1" defaults={offsetX=0} option slots.slot1.enabled type="toggle" label="Enabled" default=false -option slots.slot1.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slots.slot1.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slots.slot1.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slots.slot1.own type="toggle" label="Only buffs cast by me" default=true option slots.slot1.size type="range" label="Size" default=14 min=10 max=32 step=1 option slots.slot1.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28472,7 +28473,8 @@ option slots.slot1.offsetX type="range" label="Offset X" default=0 min=-100 max= option slots.slot1.offsetY type="range" label="Offset Y" default=0 min=-100 max=100 step=1 option slots.slot2 type="group" label="Friendly buff slot 2" defaults={offsetX=16} option slots.slot2.enabled type="toggle" label="Enabled" default=false -option slots.slot2.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slots.slot2.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slots.slot2.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slots.slot2.own type="toggle" label="Only buffs cast by me" default=true option slots.slot2.size type="range" label="Size" default=14 min=10 max=32 step=1 option slots.slot2.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28480,7 +28482,8 @@ option slots.slot2.offsetX type="range" label="Offset X" default=0 min=-100 max= option slots.slot2.offsetY type="range" label="Offset Y" default=0 min=-100 max=100 step=1 option slots.slot3 type="group" label="Friendly buff slot 3" defaults={offsetX=32} option slots.slot3.enabled type="toggle" label="Enabled" default=false -option slots.slot3.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slots.slot3.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slots.slot3.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slots.slot3.own type="toggle" label="Only buffs cast by me" default=true option slots.slot3.size type="range" label="Size" default=14 min=10 max=32 step=1 option slots.slot3.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28576,6 +28579,7 @@ default panel.tanks = false default panel.targetGap = 4 default slots.slot1.anchor = "TOPLEFT" default slots.slot1.enabled = false +default slots.slot1.family = "" default slots.slot1.offsetX = 0 default slots.slot1.offsetY = 0 default slots.slot1.own = true @@ -28583,6 +28587,7 @@ default slots.slot1.size = 14 default slots.slot1.spell = "" default slots.slot2.anchor = "TOPLEFT" default slots.slot2.enabled = false +default slots.slot2.family = "" default slots.slot2.offsetX = 16 default slots.slot2.offsetY = 0 default slots.slot2.own = true @@ -28590,6 +28595,7 @@ default slots.slot2.size = 14 default slots.slot2.spell = "" default slots.slot3.anchor = "TOPLEFT" default slots.slot3.enabled = false +default slots.slot3.family = "" default slots.slot3.offsetX = 32 default slots.slot3.offsetY = 0 default slots.slot3.own = true @@ -28710,6 +28716,7 @@ resolved panel.tanks = false resolved panel.targetGap = 4 resolved slots.slot1.anchor = "TOPLEFT" resolved slots.slot1.enabled = false +resolved slots.slot1.family = "" resolved slots.slot1.offsetX = 0 resolved slots.slot1.offsetY = 0 resolved slots.slot1.own = true @@ -28717,6 +28724,7 @@ resolved slots.slot1.size = 14 resolved slots.slot1.spell = "" resolved slots.slot2.anchor = "TOPLEFT" resolved slots.slot2.enabled = false +resolved slots.slot2.family = "" resolved slots.slot2.offsetX = 16 resolved slots.slot2.offsetY = 0 resolved slots.slot2.own = true @@ -28724,6 +28732,7 @@ resolved slots.slot2.size = 14 resolved slots.slot2.spell = "" resolved slots.slot3.anchor = "TOPLEFT" resolved slots.slot3.enabled = false +resolved slots.slot3.family = "" resolved slots.slot3.offsetX = 32 resolved slots.slot3.offsetY = 0 resolved slots.slot3.own = true @@ -28784,7 +28793,8 @@ option border.inset type="range" label="Background inset" default=3 min=0 max=16 option border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option slot1 type="group" label="Friendly buff slot 1" defaults={offsetX=0} option slot1.enabled type="toggle" label="Enabled" default=false -option slot1.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slot1.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slot1.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slot1.own type="toggle" label="Only buffs cast by me" default=true option slot1.size type="range" label="Size" default=14 min=10 max=32 step=1 option slot1.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28792,7 +28802,8 @@ option slot1.offsetX type="range" label="Offset X" default=0 min=-100 max=100 st option slot1.offsetY type="range" label="Offset Y" default=0 min=-100 max=100 step=1 option slot2 type="group" label="Friendly buff slot 2" defaults={offsetX=16} option slot2.enabled type="toggle" label="Enabled" default=false -option slot2.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slot2.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slot2.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slot2.own type="toggle" label="Only buffs cast by me" default=true option slot2.size type="range" label="Size" default=14 min=10 max=32 step=1 option slot2.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28800,7 +28811,8 @@ option slot2.offsetX type="range" label="Offset X" default=0 min=-100 max=100 st option slot2.offsetY type="range" label="Offset Y" default=0 min=-100 max=100 step=1 option slot3 type="group" label="Friendly buff slot 3" defaults={offsetX=32} option slot3.enabled type="toggle" label="Enabled" default=false -option slot3.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#0681f54e +option slot3.spell type="text" label="Friendly buff spell IDs" default="" tooltip=#9ee82380 +option slot3.family type="select" label="Track a spell" default="" values=#a2c826ce tooltip=#ebd0a18e option slot3.own type="toggle" label="Only buffs cast by me" default=true option slot3.size type="range" label="Size" default=14 min=10 max=32 step=1 option slot3.anchor type="select" label="Position" default="TOPLEFT" values=#a082508f @@ -28831,6 +28843,7 @@ default showCount = true default showDuration = true default slot1.anchor = "TOPLEFT" default slot1.enabled = false +default slot1.family = "" default slot1.offsetX = 0 default slot1.offsetY = 0 default slot1.own = true @@ -28838,6 +28851,7 @@ default slot1.size = 14 default slot1.spell = "" default slot2.anchor = "TOPLEFT" default slot2.enabled = false +default slot2.family = "" default slot2.offsetX = 16 default slot2.offsetY = 0 default slot2.own = true @@ -28845,6 +28859,7 @@ default slot2.size = 14 default slot2.spell = "" default slot3.anchor = "TOPLEFT" default slot3.enabled = false +default slot3.family = "" default slot3.offsetX = 32 default slot3.offsetY = 0 default slot3.own = true @@ -28879,6 +28894,7 @@ resolved showCount = true resolved showDuration = true resolved slot1.anchor = "TOPLEFT" resolved slot1.enabled = false +resolved slot1.family = "" resolved slot1.offsetX = 0 resolved slot1.offsetY = 0 resolved slot1.own = true @@ -28886,6 +28902,7 @@ resolved slot1.size = 14 resolved slot1.spell = "" resolved slot2.anchor = "TOPLEFT" resolved slot2.enabled = false +resolved slot2.family = "" resolved slot2.offsetX = 16 resolved slot2.offsetY = 0 resolved slot2.own = true @@ -28893,6 +28910,7 @@ resolved slot2.size = 14 resolved slot2.spell = "" resolved slot3.anchor = "TOPLEFT" resolved slot3.enabled = false +resolved slot3.family = "" resolved slot3.offsetX = 32 resolved slot3.offsetY = 0 resolved slot3.own = true diff --git a/tests/proof/workbench.lua b/tests/proof/workbench.lua index c42d115..39dc6db 100644 --- a/tests/proof/workbench.lua +++ b/tests/proof/workbench.lua @@ -16,8 +16,16 @@ local function ClickGridPreview(entry) end end +local function DruidMemberHeals() + local _, _, workbench = Helpers.LoadClickGrid(true) + UnitClass = function() return "Druid", "DRUID", 11 end + workbench:Open("clickgrid.panel") + return workbench.handle.cells[1].frame +end + return { { name = "workbench-player", build = UnitPreview("unit.player") }, { name = "workbench-target", build = UnitPreview("unit.target") }, { name = "clickgrid-panel", build = ClickGridPreview("clickgrid.panel") }, + { name = "clickgrid-member-heals", build = DruidMemberHeals }, } diff --git a/tests/spec/auras/aura_category_filters_spec.lua b/tests/spec/auras/aura_category_filters_spec.lua index efa9b50..34505dc 100644 --- a/tests/spec/auras/aura_category_filters_spec.lua +++ b/tests/spec/auras/aura_category_filters_spec.lua @@ -18,7 +18,7 @@ describe("Category aura filters", function() local known = Mock.API.Snapshot().lua.auraFilters for _, list in ipairs({ Auras.BUFF_FILTERS, Auras.DEBUFF_FILTERS }) do for filter in pairs(Values(list)) do - for component in filter:gmatch("[^|]+") do + for component in Auras.GroupFilter("buffs", filter):gmatch("[^|]+") do assert.is_true(known[component] == true, filter) end end diff --git a/tests/spec/auras/aura_heal_filter_spec.lua b/tests/spec/auras/aura_heal_filter_spec.lua new file mode 100644 index 0000000..2540991 --- /dev/null +++ b/tests/spec/auras/aura_heal_filter_spec.lua @@ -0,0 +1,99 @@ +local Helpers = require("helpers") + +describe("My heals & shields buff filter #buffs", function() + local ns, Auras + + before_each(function() + ns = Helpers.LoadAddon(true, true) + Auras = ns.Components.Auras + end) + + local function PlayAs(class) + UnitClass = function() return class, class, 1 end + end + + local function Count(set) + local count = 0 + for _ in pairs(set) do count = count + 1 end + return count + end + + it("passes the player's own heal, shield and proc families as native include IDs", function() + PlayAs("DRUID") + local filters = Auras.CandidateFilters({ filter = Auras.MY_HEALS, maxDuration = 0 }) + assert.is_nil(filters.maxDuration) + for _, id in ipairs({ 774, 25299, 417057, 9858, 436937, 408124, 408120 }) do + assert.is_true(filters.includeSpellIDs[id], id) + end + assert.is_nil(filters.includeSpellIDs[139]) + assert.equals("HELPFUL|PLAYER", Auras.GroupFilter("buffs", Auras.MY_HEALS)) + PlayAs("PRIEST") + local priest = Auras.CandidateFilters({ filter = Auras.MY_HEALS, maxDuration = 60 }).includeSpellIDs + assert.is_true(priest[17] and priest[139] and priest[401877]) + PlayAs("SHAMAN") + assert.is_true(Auras.IncludeSpellIDs(Auras.MY_HEALS)[974]) + end) + + it("gives non-healing classes an empty include list, so nothing passes", function() + for _, class in ipairs({ "WARRIOR", "ROGUE", "HUNTER", "WARLOCK" }) do + PlayAs(class) + assert.equals(0, Count(Auras.CandidateFilters({ filter = Auras.MY_HEALS, maxDuration = 0 }).includeSpellIDs), class) + end + end) + + it("falls back to every class's heals while the player's class is opaque", function() + UnitClass = function() return Helpers.Mock.Secret("Druid"), Helpers.Mock.Secret("DRUID"), 11 end + local ids = Auras.IncludeSpellIDs(Auras.MY_HEALS) + assert.is_true(ids[774] and ids[17] and ids[408521]) + end) + + it("keeps plain filters free of include IDs", function() + assert.is_nil(Auras.CandidateFilters({ filter = "HELPFUL|PLAYER", maxDuration = 0 })) + assert.same({ maxDuration = 30 }, Auras.CandidateFilters({ filter = "HELPFUL|PLAYER|RAID_IN_COMBAT", maxDuration = 30 })) + end) + + it("applies include IDs only when they change, like maxDuration", function() + PlayAs("DRUID") + local calls, count = {}, 0 + local container = { SetAuraGroupCandidateFilters = function(_, _, filters) + count = count + 1 + calls[count] = filters + end } + local group = { filter = "HELPFUL|PLAYER", maxDuration = 0 } + Auras.ApplyGroupCandidates(container, "buffs", group) + Auras.ApplyGroupCandidates(container, "buffs", group) + assert.equals(1, count) + assert.is_nil(calls[1]) + group.filter = Auras.MY_HEALS + Auras.ApplyGroupCandidates(container, "buffs", group) + Auras.ApplyGroupCandidates(container, "buffs", { filter = Auras.MY_HEALS, maxDuration = 0 }) + assert.equals(2, count) + assert.is_true(calls[2].includeSpellIDs[774]) + group.maxDuration = 45 + Auras.ApplyGroupCandidates(container, "buffs", group) + assert.equals(3, count) + assert.same(45, calls[3].maxDuration) + PlayAs("PRIEST") + Auras.ApplyGroupCandidates(container, "buffs", group) + assert.equals(4, count) + assert.is_true(calls[4].includeSpellIDs[17]) + end) + + it("matches samples only when their spell is in the include list", function() + PlayAs("DRUID") + local include = Auras.IncludeSpellIDs(Auras.MY_HEALS) + local rejuvenation = { spellId = 9841, sourceUnit = "player", duration = 12 } + local renew = { spellId = 139, sourceUnit = "player", duration = 15 } + assert.is_true(Auras.MatchesSampleFilter(rejuvenation, "HELPFUL|PLAYER", 0, include)) + assert.is_false(Auras.MatchesSampleFilter(renew, "HELPFUL|PLAYER", 0, include)) + assert.is_false(Auras.MatchesSampleFilter({ spellId = 774, sourceUnit = "party1", duration = 12 }, "HELPFUL|PLAYER", 0, include)) + assert.is_true(Auras.MatchesSampleFilter(renew, "HELPFUL|PLAYER", 0)) + end) + + it("keeps the raid-in-combat choice with a label that says what it covers", function() + local labels = {} + for _, entry in ipairs(Auras.BUFF_FILTERS) do labels[entry[1]] = entry[2] end + assert.equals("My heals & shields", labels[Auras.MY_HEALS]) + assert.equals("My raid-flagged buffs (no shields)", labels["HELPFUL|PLAYER|RAID_IN_COMBAT"]) + end) +end) diff --git a/tests/spec/auras/aura_icon_spec.lua b/tests/spec/auras/aura_icon_spec.lua index bf17b93..5dfb7ff 100644 --- a/tests/spec/auras/aura_icon_spec.lua +++ b/tests/spec/auras/aura_icon_spec.lua @@ -3,7 +3,7 @@ local Helpers = require("helpers") describe("Shared aura artwork", function() it("rebuilds fixed-slot candidates only when the effective spell set changes", function() local UF, CG = Helpers.LoadClickGrid() - local slots = CG.Slots:New(UIParent, { slot1 = { enabled = true, spell = "139,774" } }) + local slots = CG.Slots:New(UIParent, { slot1 = { enabled = true, spell = "2050,2061" } }) local calls = 0 local setter = slots.container.SetAuraSlotCandidateFilters slots.container.SetAuraSlotCandidateFilters = function(...) @@ -11,17 +11,17 @@ describe("Shared aura artwork", function() return setter(...) end slots:Apply(UF.Util.Copy(slots.config)) - slots:Apply({ font = "Morpheus", slot1 = { enabled = true, spell = "774 139 139", own = false } }) + slots:Apply({ font = "Morpheus", slot1 = { enabled = true, spell = "2061 2050 2050", own = false } }) assert.equals(0, calls, "style, ownership and equivalent text do not rebuild candidates") - slots:Apply({ slot1 = { enabled = true, spell = "774" } }) + slots:Apply({ slot1 = { enabled = true, spell = "2061" } }) assert.equals(1, calls) - assert.same({ [774] = true }, slots.container.__state.slots.slot1.candidateFilters.includeSpellIDs) - slots:Apply({ slot1 = { enabled = false, spell = "774" } }) + assert.same({ [2061] = true }, slots.container.__state.slots.slot1.candidateFilters.includeSpellIDs) + slots:Apply({ slot1 = { enabled = false, spell = "2061" } }) assert.equals(2, calls) assert.same({}, slots.container.__state.slots.slot1.candidateFilters.includeSpellIDs) - slots:Apply({ slot1 = { enabled = false, spell = "139" } }) + slots:Apply({ slot1 = { enabled = false, spell = "2050" } }) assert.equals(2, calls, "disabled slots retain an empty set") - slots:Apply({ slot1 = { enabled = true, spell = "139" } }) + slots:Apply({ slot1 = { enabled = true, spell = "2050" } }) assert.equals(3, calls) slots:Apply({ slot1 = { enabled = true, spell = "invalid" } }) assert.equals(4, calls) diff --git a/tests/spec/clickgrid/clickgrid_category_auras_spec.lua b/tests/spec/clickgrid/clickgrid_category_auras_spec.lua index c3803df..be78684 100644 --- a/tests/spec/clickgrid/clickgrid_category_auras_spec.lua +++ b/tests/spec/clickgrid/clickgrid_category_auras_spec.lua @@ -36,9 +36,10 @@ describe("ClickGrid crowd control & defensives", function() assert.same({ "CENTER", Member(), "CENTER", 0, 0 }, private:GetAnchor("CENTER")) end) - it("defaults member buffs to my heals over time and keeps an explicit filter", function() + it("defaults member buffs to my heals and shields and keeps an explicit filter", function() local buffs = Member().uf:GetPart("auras"):GetContainer("buffs") - assert.equals("HELPFUL|PLAYER|RAID_IN_COMBAT", buffs.__state.groups.buffs.filter) + assert.equals("HELPFUL|PLAYER", buffs.__state.groups.buffs.filter) + assert.equals(UF.Components.Auras.MY_HEALS, CG.Config.styles.member:Resolved().auras.buffs.filter) CG.Config:SetStyle("member", "auras.buffs.filter", "HELPFUL|PLAYER") assert.equals("HELPFUL|PLAYER", buffs.__state.groups.buffs.filter) assert.equals("HELPFUL|PLAYER", CG.Config:GetStyle("member").auras.buffs.filter) diff --git a/tests/spec/clickgrid/clickgrid_indicators_spec.lua b/tests/spec/clickgrid/clickgrid_indicators_spec.lua index 366a47c..9f5cca5 100644 --- a/tests/spec/clickgrid/clickgrid_indicators_spec.lua +++ b/tests/spec/clickgrid/clickgrid_indicators_spec.lua @@ -85,9 +85,9 @@ describe("ClickGrid status indicators", function() assert.is_nil(member.UF_Experience) assert.equals(member.uf:GetRow("health"):GetBar():GetStatusBar(), member.Health) assert.equals(Enum.UnitDamageAbsorbClampMode.MaximumHealth, member.Health.damageAbsorbClampMode) - assert.equals(120, member.uf:GetPart("auras").resolved.buffs.maxDuration) + assert.equals(0, member.uf:GetPart("auras").resolved.buffs.maxDuration) assert.equals("unitDebuff", member.uf:GetPart("auras").resolved.debuffs.sort) - assert.is_false(member.uf:GetPart("auras").resolved.buffs.enabled) + assert.is_true(member.uf:GetPart("auras").resolved.buffs.enabled) assert.is_false(member.uf:GetPart("auras").resolved.debuffs.enabled) assert.is_true(member.uf:GetPart("auras").resolved.enabled, "fixed slots keep their shared aura switch") assert.equals(1, CG.Config:Resolved().panel.spacingX) diff --git a/tests/spec/clickgrid/clickgrid_member_heals_spec.lua b/tests/spec/clickgrid/clickgrid_member_heals_spec.lua new file mode 100644 index 0000000..b4ccf2a --- /dev/null +++ b/tests/spec/clickgrid/clickgrid_member_heals_spec.lua @@ -0,0 +1,63 @@ +local Helpers = require("helpers") + +describe("ClickGrid member heals by default #buffs", function() + local UF, CG + + local function Native() + local member = CG.headers.party:GetAttribute("child1").Member + return member.uf:GetPart("auras"):GetContainer("buffs").__state.groups.buffs + end + + local function SampleIcons(auras) + local icons = {} + for _, button in ipairs(auras.previewContainers.buffs.ufButtons) do + if button:IsShown() then icons[#icons + 1] = button.ufIcon:GetTexture():match("([^\\]+)$") end + end + return icons + end + + it("enables member buffs with My heals & shields on a fresh profile", function() + UF, CG = Helpers.LoadClickGrid() + UnitClass = function() return "Warrior", "WARRIOR", 1 end + CG:Refresh() + local buffs = CG.Config.styles.member:Resolved().auras.buffs + assert.is_true(buffs.enabled) + assert.equals(UF.Components.Auras.MY_HEALS, buffs.filter) + assert.equals(0, buffs.maxDuration) + assert.is_true(Native().enabled) + assert.equals("HELPFUL|PLAYER", Native().filter) + assert.same({}, Native().candidateFilters.includeSpellIDs) + end) + + it("keeps an explicit member buff choice on update", function() + UF, CG = Helpers.LoadClickGrid(false, { member = { auras = { buffs = { + enabled = false, filter = "HELPFUL|PLAYER|RAID_IN_COMBAT" } } } }) + local buffs = CG.Config.styles.member:Resolved().auras.buffs + assert.is_false(buffs.enabled) + assert.equals("HELPFUL|PLAYER|RAID_IN_COMBAT", buffs.filter) + assert.is_nil(Native().candidateFilters) + end) + + it("passes a druid's Rejuvenation ranks of both ID sets to member cells", function() + UF, CG = Helpers.LoadClickGrid() + UnitClass = function() return "Druid", "DRUID", 11 end + CG:Refresh() + local include = Native().candidateFilters.includeSpellIDs + for _, id in ipairs({ 774, 9841, 25299, 417057, 8936, 408124 }) do assert.is_true(include[id], id) end + assert.is_nil(include[17]) + end) + + it("previews the player's own class heals on member cells", function() + local wb + UF, CG, wb = Helpers.LoadClickGrid(true) + UnitClass = function() return "Druid", "DRUID", 11 end + wb:Open("clickgrid.panel") + assert.same({ "Spell_Nature_Rejuvenation" }, SampleIcons(wb.handle.cells[1].member:GetPart("auras"))) + UnitClass = function() return "Priest", "PRIEST", 5 end + wb:UpdateData() + assert.same({ "Spell_Holy_Renew", "Spell_Holy_PowerWordShield" }, SampleIcons(wb.handle.cells[1].member:GetPart("auras"))) + UnitClass = function() return "Warrior", "WARRIOR", 1 end + wb:UpdateData() + assert.same({}, SampleIcons(wb.handle.cells[1].member:GetPart("auras"))) + end) +end) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index d9d1980..656091b 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -1,6 +1,8 @@ # Design: Healer buffs out of the box -Status: in progress. §1 (buff catalogue) is implemented (UNIT-13). Targets Forever Interface 16001, build 1.60.1.70862. +Status: in progress. §1 buff catalogue (UNIT-13), §2 rank-proof slots (UNIT-14) and §3 "My heals & shields" +on by default (UNIT-15) are implemented; §4 presets/showcases and the Verification below (UNIT-17) are open. +Targets Forever Interface 16001, build 1.60.1.70862. ## Problem From bdac749a59e128c4b38ec3bc4091a8d0fbecdf8e Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 04:02:57 +0100 Subject: [PATCH 5/9] UNIT-13 Settle rank IDs from source in design doc Replaces the in-game verification with a source check of HealKit, HealBot, EllesmereUI, LibHealComm and the Forever UI. --- todos/10-design-healer-buffs.md | 56 +++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index 656091b..39b17f4 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -1,7 +1,7 @@ # Design: Healer buffs out of the box Status: in progress. §1 buff catalogue (UNIT-13), §2 rank-proof slots (UNIT-14) and §3 "My heals & shields" -on by default (UNIT-15) are implemented; §4 presets/showcases and the Verification below (UNIT-17) are open. +on by default (UNIT-15) are implemented; §4 presets/showcases are open. The rank-ID question (UNIT-17) is settled from source below. Targets Forever Interface 16001, build 1.60.1.70862. ## Problem @@ -155,11 +155,49 @@ class) a tile "Show my heals on group frames" plus the placement choice. One generator, two outputs. DoT and buff families use the same family rule, so a later "my DoTs on target" preset reuses the catalogue API. -## Verification (in game, needs a druid and a priest) - -1. Cast Rejuvenation on yourself, then - `/dump C_UnitAuras.GetUnitAuras("player", "HELPFUL|PLAYER")` → which spellId - (774-set or 417057-set)? -2. Same with `HELPFUL|PLAYER|RAID_IN_COMBAT` → listed or not? -3. In combat: does a catalogue-backed member group show Rejuvenation, Renew, - Power Word: Shield on another party member? +## Source check: which rank IDs do players cast? (UNIT-17) + +Settled from source instead of an in-game `/dump`. Client data (build +1.60.1.70862, `BuffCatalog.lua`): + +| Spell | Skill-line ranks (spellbook) | Second set | RaidInCombat flag | +|---|---|---|---| +| Rejuvenation | 774 … 25299 | 417057 … 417068, **not** skill-line | second set only | +| Regrowth | 8936 … 9858 | 436937 … 436946, **not** skill-line | second set only | +| Renew | 139 … 25315 | 425268 … 425277, **also** skill-line | second set only | +| Power Word: Shield | 17 … 10901 | none | never | + +What each source uses: + +| Source | Rejuvenation | Regrowth | Renew | PW:S | +|---|---|---|---|---| +| HealKit (`Frames.lua`) | no IDs: `HELPFUL\|PLAYER` + `maxDuration` | same | same | spellbook IDs (excluded from its HoT corner) | +| HealBot, Forever path (`HEALBOT_FOREVER`) | 774 **and** by name | 8936 and by name | 139 and by name | 17 | +| EllesmereUI `ForeverCatalogue()` | 774 set only | 8936 set only | **both** sets | skill-line set | +| LibHealComm-4.0 (`examples/ZPerl`, l. 94) | both: 417057… are ranks 1–11 next to 774… | both (436937…) | both (425268…) | — | +| Blizzard Forever UI (`wow-ui-source-forever` 9dc84f0) | no hard-coded IDs | — | — | — | + +Notes: + +- HealKit reads the Power Word: Shield IDs from the spellbook and excludes + them by aura spell ID, so on Forever the shield aura carries the spellbook + (skill-line) ID. +- HealBot watches the skill-line ID and, by default, the spell name, so it + matches either set and proves neither. +- EllesmereUI, curated for Forever, lists 425268… for Renew ("the class's + second set of ranks") but leaves out 417057… and 436937…. That suggests the + spellbook's Rejuvenation and Regrowth land under the skill-line IDs. +- LibHealComm maps both sets to the same rank numbers and doesn't say which + one gets cast. +- Blizzard's Forever UI never filters on `RAID_IN_COMBAT` itself. AuraUtil + documents it as "combine with Player & Helpful to return self-cast HoTs" and + `ShouldDisplayBuff` reads `C_Spell.GetVisibilityInfo`. Party frames use + `HELPFUL|RAID` when `showCastableBuffs` is on. + +Conclusion: the spellbook casts the skill-line ranks. `HELPFUL|PLAYER|RAID_IN_COMBAT` +then shows Renew only for its 425268 ranks, and most likely never shows the +Rejuvenation or Regrowth ranks players learn. It never shows Power Word: Shield. +Its honest label is "raid-flagged buffs: not all ranks, no shields". The +catalogue keeps both sets per family, so "My heals & shields" and the slots +match either way and nothing else changes. If an in-game `/dump` later shows +417057-set auras, only the relabel wording changes. From acd85790c83f9c6eeee31a5d5ec4eccd0d316fad Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 04:02:57 +0100 Subject: [PATCH 6/9] UNIT-15 Relabel raid-flagged buff filter from source check --- USER_GUIDE.md | 2 +- UnitFrames/Components/Auras.lua | 2 +- tests/fixtures/schema_snapshot.txt | 40 +++++++++++----------- tests/spec/auras/aura_heal_filter_spec.lua | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index d91758c..70e52e2 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -400,7 +400,7 @@ permanent buff, and all four debuff dispel types, using the saved aura style. **Which** also offers category filters: **My heals & shields** (your own heals over time, shields and heal procs, every rank of each spell), **My raid-flagged buffs** (your own buffs whose spell ID the client flags for raid frames in -combat; shields are not flagged), **Big defensives**, **External defensives**, +combat; it misses some ranks of Rejuvenation, Regrowth and Renew and every shield), **Big defensives**, **External defensives**, **Important** buffs, and **Crowd control** debuffs. ## Crowd control & defensives diff --git a/UnitFrames/Components/Auras.lua b/UnitFrames/Components/Auras.lua index 1095129..5e19619 100644 --- a/UnitFrames/Components/Auras.lua +++ b/UnitFrames/Components/Auras.lua @@ -35,7 +35,7 @@ Auras.MY_HEALS = "MY_HEALS" Auras.BUFF_FILTERS = { { "HELPFUL", "All buffs" }, { "HELPFUL|PLAYER", "Cast by me" }, { "HELPFUL|RAID", "Raid buffs" }, { Auras.MY_HEALS, "My heals & shields" }, - { "HELPFUL|PLAYER|RAID_IN_COMBAT", "My raid-flagged buffs (no shields)" }, + { "HELPFUL|PLAYER|RAID_IN_COMBAT", "My raid-flagged buffs (not all ranks, no shields)" }, { "HELPFUL|BIG_DEFENSIVE", "Big defensives" }, { "HELPFUL|EXTERNAL_DEFENSIVE", "External defensives" }, { "HELPFUL|IMPORTANT", "Important" }, } diff --git a/tests/fixtures/schema_snapshot.txt b/tests/fixtures/schema_snapshot.txt index 03d3ed1..c367be1 100644 --- a/tests/fixtures/schema_snapshot.txt +++ b/tests/fixtures/schema_snapshot.txt @@ -1937,7 +1937,7 @@ option sharedSide type="select" label="Buffs and debuffs on one side" default="c option stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -2144,7 +2144,7 @@ option border.inset type="range" label="Background inset" default=3 min=0 max=16 option border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -3434,7 +3434,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -3518,7 +3518,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -6517,7 +6517,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -6601,7 +6601,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -9112,7 +9112,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -9196,7 +9196,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -11741,7 +11741,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -11825,7 +11825,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -14308,7 +14308,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -14392,7 +14392,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -16877,7 +16877,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -16961,7 +16961,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -21612,7 +21612,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -21696,7 +21696,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -24105,7 +24105,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -24189,7 +24189,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -26616,7 +26616,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -26700,7 +26700,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#87e593d9 +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 diff --git a/tests/spec/auras/aura_heal_filter_spec.lua b/tests/spec/auras/aura_heal_filter_spec.lua index 2540991..18468b3 100644 --- a/tests/spec/auras/aura_heal_filter_spec.lua +++ b/tests/spec/auras/aura_heal_filter_spec.lua @@ -94,6 +94,6 @@ describe("My heals & shields buff filter #buffs", function() local labels = {} for _, entry in ipairs(Auras.BUFF_FILTERS) do labels[entry[1]] = entry[2] end assert.equals("My heals & shields", labels[Auras.MY_HEALS]) - assert.equals("My raid-flagged buffs (no shields)", labels["HELPFUL|PLAYER|RAID_IN_COMBAT"]) + assert.equals("My raid-flagged buffs (not all ranks, no shields)", labels["HELPFUL|PLAYER|RAID_IN_COMBAT"]) end) end) From cbca51523b0dbf14fc7ba112426a16023e58b338 Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 04:17:59 +0100 Subject: [PATCH 7/9] UNIT-16 Buff presets and Healing buffs Workbench page Named catalogue buff sets (My heals & shields, Externals & defensives, Raid buffs) as filter choices and ClickGrid presets that resolve to filter + every rank ID. A Healing buffs page applies a set to outside, inside corner slots or the aura bar, with sample-fed showcase cards for all three. Adds proof scenarios per placement. --- USER_GUIDE.md | 3 +- UnitFrames/Components/Auras.lua | 9 +- UnitFrames/Tracking/BuffSpells.lua | 29 ++- UnitFrames_ClickGrid/Auras/Presets.lua | 193 ++++++++++++++++++ UnitFrames_ClickGrid/Auras/Showcase.lua | 103 ++++++++++ .../Integration/Workbench.lua | 50 +++++ UnitFrames_ClickGrid/README.md | 5 + UnitFrames_ClickGrid/UnitFrames_ClickGrid.toc | 2 + tests/fixtures/schema_snapshot.txt | 40 ++-- tests/proof/workbench.lua | 12 ++ .../clickgrid/clickgrid_buff_presets_spec.lua | 168 +++++++++++++++ todos/10-design-healer-buffs.md | 2 +- 12 files changed, 586 insertions(+), 30 deletions(-) create mode 100644 UnitFrames_ClickGrid/Auras/Presets.lua create mode 100644 UnitFrames_ClickGrid/Auras/Showcase.lua create mode 100644 tests/spec/clickgrid/clickgrid_buff_presets_spec.lua diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 70e52e2..76cc551 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -400,7 +400,8 @@ permanent buff, and all four debuff dispel types, using the saved aura style. **Which** also offers category filters: **My heals & shields** (your own heals over time, shields and heal procs, every rank of each spell), **My raid-flagged buffs** (your own buffs whose spell ID the client flags for raid frames in -combat; it misses some ranks of Rejuvenation, Regrowth and Renew and every shield), **Big defensives**, **External defensives**, +combat; it misses some ranks of Rejuvenation, Regrowth and Renew and every shield), **Externals & defensives** +(anyone's, every rank), **Raid buffs of every class** (every rank), **Big defensives**, **External defensives**, **Important** buffs, and **Crowd control** debuffs. ## Crowd control & defensives diff --git a/UnitFrames/Components/Auras.lua b/UnitFrames/Components/Auras.lua index 5e19619..0fd766b 100644 --- a/UnitFrames/Components/Auras.lua +++ b/UnitFrames/Components/Auras.lua @@ -30,11 +30,13 @@ Auras.STACK_FIRST = { { "buffs", "Buffs" }, { "debuffs", "Debuffs" }, } -Auras.MY_HEALS = "MY_HEALS" +Auras.MY_HEALS, Auras.EXTERNALS, Auras.RAID_BUFFS = "MY_HEALS", "EXTERNALS", "RAID_BUFFS" Auras.BUFF_FILTERS = { { "HELPFUL", "All buffs" }, { "HELPFUL|PLAYER", "Cast by me" }, { "HELPFUL|RAID", "Raid buffs" }, { Auras.MY_HEALS, "My heals & shields" }, + { Auras.EXTERNALS, "Externals & defensives (anyone's, all ranks)" }, + { Auras.RAID_BUFFS, "Raid buffs of every class (all ranks)" }, { "HELPFUL|PLAYER|RAID_IN_COMBAT", "My raid-flagged buffs (not all ranks, no shields)" }, { "HELPFUL|BIG_DEFENSIVE", "Big defensives" }, { "HELPFUL|EXTERNAL_DEFENSIVE", "External defensives" }, { "HELPFUL|IMPORTANT", "Important" }, @@ -53,7 +55,10 @@ Auras.SAMPLE_FILTER_FLAGS = { local CLASSIFIED_FILTERS = { BIG_DEFENSIVE = true, EXTERNAL_DEFENSIVE = true, IMPORTANT = true } local ALL_FILTERS = { buffs = "HELPFUL", debuffs = "HARMFUL" } -local CATALOG_FILTERS = { [Auras.MY_HEALS] = { filter = "HELPFUL|PLAYER", spellIDs = ns.BuffSpells.PlayerHealIDs } } +local CATALOG_FILTERS = {} +for name, set in pairs(ns.BuffSpells.SETS) do + CATALOG_FILTERS[name] = { filter = set.filter, spellIDs = function() return ns.BuffSpells.SetIDs(name) end } +end function Auras.IncludeSpellIDs(filter) local catalog = CATALOG_FILTERS[filter] diff --git a/UnitFrames/Tracking/BuffSpells.lua b/UnitFrames/Tracking/BuffSpells.lua index a49a3b8..f344877 100644 --- a/UnitFrames/Tracking/BuffSpells.lua +++ b/UnitFrames/Tracking/BuffSpells.lua @@ -3,7 +3,14 @@ local BuffSpells = {} ns.BuffSpells = BuffSpells BuffSpells.HEAL_KINDS = { hot = true, absorb = true, proc = true } -local healIDs = {} +-- Named sets of catalogue families. Own sets keep to the player's class and +-- their own casts; the others match any caster. +BuffSpells.SETS = { + MY_HEALS = { kinds = BuffSpells.HEAL_KINDS, own = true, filter = "HELPFUL|PLAYER" }, + EXTERNALS = { kinds = { external = true, defensive = true }, filter = "HELPFUL" }, + RAID_BUFFS = { kinds = { raid = true }, filter = "HELPFUL" }, +} +local setIDs = {} function BuffSpells.Family(spellID) local root = ns.BuffCatalog.byId[spellID] @@ -33,12 +40,22 @@ function BuffSpells.ClassIDs(class, kinds) return ids end -function BuffSpells.PlayerHealIDs() +function BuffSpells.PlayerClass() local _, class = UnitClass("player") - if issecretvalue(class) then class = nil end - local key = class or "" - healIDs[key] = healIDs[key] or BuffSpells.ClassIDs(class, BuffSpells.HEAL_KINDS) - return healIDs[key] + if issecretvalue(class) then return nil end + return class +end + +function BuffSpells.SetIDs(name) + local set = BuffSpells.SETS[name] + local class = set.own and BuffSpells.PlayerClass() or nil + local key = name .. ":" .. (class or "") + setIDs[key] = setIDs[key] or BuffSpells.ClassIDs(class, set.kinds) + return setIDs[key] +end + +function BuffSpells.PlayerHealIDs() + return BuffSpells.SetIDs("MY_HEALS") end function BuffSpells.Roots() diff --git a/UnitFrames_ClickGrid/Auras/Presets.lua b/UnitFrames_ClickGrid/Auras/Presets.lua new file mode 100644 index 0000000..718b4d8 --- /dev/null +++ b/UnitFrames_ClickGrid/Auras/Presets.lua @@ -0,0 +1,193 @@ +local _, CG = ... +local UF = CG.UF +local Auras, BuffSpells, Util = UF.Components.Auras, UF.BuffSpells, UF.Util +local Presets = {} +CG.BuffPresets = Presets + +-- Named buff sets for ClickGrid members, built from catalogue family kinds +-- (BuffSpells.SETS): users pick a set and a placement, never spell IDs. +Presets.LIST = { + { id = "heals", label = "My heals & shields", filter = Auras.MY_HEALS }, + { id = "externals", label = "Externals & defensives", filter = Auras.EXTERNALS }, + { id = "raid", label = "Raid buffs", filter = Auras.RAID_BUFFS }, +} +Presets.PLACEMENTS = { + { "outside", "Outside: icons along the cell" }, + { "inside", "Inside: one spell per corner" }, + { "bar", "Aura bar under health" }, +} +Presets.SIDES = { { "top", "Top" }, { "bottom", "Bottom" } } +Presets.DEFAULT = { preset = "heals", placement = "outside", side = "top" } +-- Bottom left keeps clear of the member's level and class text. +Presets.CORNERS = { "TOPLEFT", "TOPRIGHT", "BOTTOMRIGHT" } + +local byId, byFilter = {}, {} +for _, preset in ipairs(Presets.LIST) do byId[preset.id], byFilter[preset.filter] = preset, preset end + +function Presets.Get(id) + return byId[id] +end + +function Presets.Values() + local values = {} + for i, preset in ipairs(Presets.LIST) do values[i] = { preset.id, preset.label } end + return values +end + +local function Set(id) + return BuffSpells.SETS[byId[id].filter] +end + +-- The set's families, the class's own first, then by rank count (core +-- spells have the most ranks) and name. Own sets keep to the class; an +-- unknown class keeps every class, like BuffSpells.SetIDs. +function Presets.Families(id, class) + local set, families, roots = Set(id), UF.BuffCatalog.families, {} + for root, family in pairs(families) do + if set.kinds[family.kind] and (not set.own or class == nil or family.class == class) then roots[#roots + 1] = root end + end + table.sort(roots, function(a, b) + local left, right = families[a], families[b] + local leftOwn, rightOwn = left.class == class, right.class == class + if leftOwn ~= rightOwn then return leftOwn end + if #left.ids ~= #right.ids then return #left.ids > #right.ids end + if left.name ~= right.name then return left.name < right.name end + return a < b + end) + return roots +end + +-- What a preset means for the player: the native filter string, every rank +-- ID it matches and its families in slot order. +function Presets.Resolve(id) + local preset = byId[id] + return { + filter = Auras.GroupFilter("buffs", preset.filter), + ids = Auras.IncludeSpellIDs(preset.filter), + own = Set(id).own == true, + families = Presets.Families(id, BuffSpells.PlayerClass()), + } +end + +local function SlotPreset(slot) + local id = slot and slot.spell and tonumber(slot.spell:match("%d+") or "") + local family = id and BuffSpells.Family(id) + if not family then return nil end + for _, preset in ipairs(Presets.LIST) do + if Set(preset.id).kinds[family.kind] then return preset end + end +end + +-- Writes a placement into member style overrides. The set shows in one +-- placement: the aura block and the aura bar drop their buffs otherwise. +function Presets.EditStyle(style, resolved, id, placement, side) + local filter = byId[id].filter + local outside, bar = placement == "outside", placement == "bar" + Util.SetPath(style, "auras.buffs.enabled", outside) + if outside then + Util.SetPath(style, "auras.buffs.filter", filter) + Util.SetPath(style, "auras.buffs.position", side or Presets.DEFAULT.side) + end + -- Corner slots share the aura block's on/off state. + if outside or placement == "inside" then Util.SetPath(style, "auras.enabled", true) end + Util.SetPath(style, "auraBar.buffs.enabled", bar) + if bar then + if not resolved.auraBar.enabled then Util.SetPath(style, "auraBar.debuffs.enabled", false) end + Util.SetPath(style, "auraBar.enabled", true) + Util.SetPath(style, "auraBar.buffs.filter", filter) + elseif resolved.auraBar.enabled and not resolved.auraBar.debuffs.enabled then + Util.SetPath(style, "auraBar.enabled", false) + end +end + +-- Writes the corner slots: inside fills one family per corner by its first +-- rank; elsewhere only slots showing this same set are switched off. +function Presets.EditSlots(slots, resolved, id, placement, class) + local roots = Presets.Families(id, class) + for i, anchor in ipairs(Presets.CORNERS) do + local key = "slot" .. i + local root = placement == "inside" and roots[i] + if root then + slots[key] = { enabled = true, spell = tostring(root), own = Set(id).own == true, anchor = anchor, offsetX = 0, offsetY = 0 } + elseif placement == "inside" or SlotPreset(resolved and resolved[key]) == byId[id] then + slots[key] = slots[key] or {} + slots[key].enabled = false + end + end +end + +function Presets.Apply(id, placement, side) + local class = BuffSpells.PlayerClass() + local ok, reason = CG.Config.styles.member:Edit("", function(style, resolved) + Presets.EditStyle(style, resolved, id, placement, side) + end) + if not ok then return false, reason end + return CG.Config.settings:Edit("slots", function(slots, resolved) + Presets.EditSlots(slots, resolved, id, placement, class) + end) +end + +-- The set and placement the saved settings show, or nil for a custom setup. +function Presets.Detect(member, slots) + local bar, auras = member.auraBar, member.auras + if bar.enabled and bar.buffs.enabled and byFilter[bar.buffs.filter] then + return { preset = byFilter[bar.buffs.filter].id, placement = "bar" } + end + if auras.enabled and auras.buffs.enabled and byFilter[auras.buffs.filter] then + local side = auras.buffs.position == "bottom" and "bottom" or "top" + return { preset = byFilter[auras.buffs.filter].id, placement = "outside", side = side } + end + local preset = auras.enabled and slots.slot1.enabled and SlotPreset(slots.slot1) + if preset then return { preset = preset.id, placement = "inside" } end +end + +function Presets.Current() + local found = Presets.Detect(CG.Config.styles.member:Resolved(), CG.Config:Resolved().slots) or {} + return Util.Merge(Util.Copy(Presets.DEFAULT), found) +end + +-- Plain sample art for showcases when the client has no spell texture. +local SAMPLE_ICONS = { + ["Rejuvenation"] = [[Interface\Icons\Spell_Nature_Rejuvenation]], + ["Regrowth"] = [[Interface\Icons\Spell_Nature_ResistNature]], + ["Lifebloom"] = [[Interface\Icons\INV_Misc_Herb_Felblossom]], + ["Wild Growth"] = [[Interface\Icons\Ability_Druid_Flourish]], + ["Renew"] = [[Interface\Icons\Spell_Holy_Renew]], + ["Power Word: Shield"] = [[Interface\Icons\Spell_Holy_PowerWordShield]], + ["Prayer of Mending"] = [[Interface\Icons\Spell_Holy_PrayerOfMendingtga]], + ["Riptide"] = [[Interface\Icons\Spell_Nature_Riptide]], + ["Earth Shield"] = [[Interface\Icons\Spell_Nature_SkinofEarth]], + ["Innervate"] = [[Interface\Icons\Spell_Nature_Lightning]], + ["Barkskin"] = [[Interface\Icons\Spell_Nature_StoneClawTotem]], + ["Blessing of Protection"] = [[Interface\Icons\Spell_Holy_SealOfProtection]], + ["Divine Shield"] = [[Interface\Icons\Spell_Holy_DivineIntervention]], + ["Power Infusion"] = [[Interface\Icons\Spell_Holy_PowerInfusion]], + ["Pain Suppression"] = [[Interface\Icons\Spell_Holy_PainSupression]], + ["Mark of the Wild"] = [[Interface\Icons\Spell_Nature_Regeneration]], + ["Gift of the Wild"] = [[Interface\Icons\Spell_Nature_Regeneration]], + ["Thorns"] = [[Interface\Icons\Spell_Nature_Thorns]], + ["Power Word: Fortitude"] = [[Interface\Icons\Spell_Holy_WordFortitude]], + ["Arcane Intellect"] = [[Interface\Icons\Spell_Holy_MagicalSentry]], + ["Battle Shout"] = [[Interface\Icons\Ability_Warrior_BattleShout]], +} +local UNKNOWN_ICON = [[Interface\Icons\INV_Misc_QuestionMark]] +local SAMPLE_TIMES = { { 15, 9 }, { 21, 14 }, { 7, 3 }, { 30, 22 } } + +local function Icon(root, family) + local texture = C_Spell and C_Spell.GetSpellTexture and C_Spell.GetSpellTexture(root) + return texture or SAMPLE_ICONS[family.name] or UNKNOWN_ICON +end + +-- One plain sample aura per family, keyed by its first rank, as cast by the +-- player for own sets and by a party member otherwise. +function Presets.Samples(id, class) + local own, auras = Set(id).own, {} + for i, root in ipairs(Presets.Families(id, class)) do + local timing = SAMPLE_TIMES[i] + if not timing then break end + local family = UF.BuffCatalog.families[root] + auras[i] = { spellId = root, name = family.name, icon = Icon(root, family), duration = timing[1], remaining = timing[2], + sourceUnit = own and "player" or "party1" } + end + return auras +end diff --git a/UnitFrames_ClickGrid/Auras/Showcase.lua b/UnitFrames_ClickGrid/Auras/Showcase.lua new file mode 100644 index 0000000..e53f35f --- /dev/null +++ b/UnitFrames_ClickGrid/Auras/Showcase.lua @@ -0,0 +1,103 @@ +local _, CG = ... +local UF = CG.UF +local Presets = CG.BuffPresets +local Showcase = UF.Object:Extend("ClickGridBuffShowcase") +CG.BuffShowcase = Showcase + +-- One card per placement, each a sample member cell showing the selected buff +-- set there, on top of the member's own style. Plain samples only, like the +-- panel preview: no live units, no restricted art. +local CARD_WIDTH, CARD_HEIGHT, GAP, PADDING, HEADER_HEIGHT = 170, 136, 8, 8, 36 +local CARDS = { + { placement = "outside", title = "Outside", note = "Icons along the cell's edge" }, + { placement = "inside", title = "Inside", note = "One spell per corner" }, + { placement = "bar", title = "Aura bar", note = "A strip under the health bar" }, +} +local ACTIVE = " |cff4fa3ff(on your frames)|r" +local EMPTY_NOTE = "Your class has no heals or shields to show." + +local function Label(parent, size) + local label = parent:CreateFontString(nil, "OVERLAY") + label:SetFontObject(UF.Media:GetFontObject(UF.Config:GetTheme().font, size)) + label:SetJustifyH("LEFT") + return label +end + +function Showcase:Init(parent) + self.frame = CreateFrame("Frame", nil, parent) + self.frame:SetSize(#CARDS * CARD_WIDTH + (#CARDS - 1) * GAP, CARD_HEIGHT) + self.selection = UF.Util.Copy(Presets.DEFAULT) + self.cards = {} + for index, spec in ipairs(CARDS) do self.cards[index] = self:CreateCard(spec, index) end + self:Apply() +end + +function Showcase:CreateCard(spec, index) + local frame = CreateFrame("Frame", nil, self.frame, "BackdropTemplate") + frame:SetSize(CARD_WIDTH, CARD_HEIGHT) + frame:SetPoint("TOPLEFT", self.frame, "TOPLEFT", (index - 1) * (CARD_WIDTH + GAP), 0) + UF.Skin.ApplyPanel(frame, "button") + local card = { spec = spec, frame = frame, title = Label(frame, 12), note = Label(frame, 10) } + card.title:SetPoint("TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING) + card.note:SetPoint("TOPLEFT", card.title, "BOTTOMLEFT", 0, -2) + for _, label in ipairs({ card.title, card.note }) do + label:SetWidth(CARD_WIDTH - 2 * PADDING) + label:SetWordWrap(false) + end + card.host = CreateFrame("Frame", nil, frame) + card.host:SetPoint("TOPLEFT", frame, "TOPLEFT", PADDING, -HEADER_HEIGHT) + card.host:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -PADDING, PADDING) + card.member = UF.Units:CreateFromDefinition(CG.definitions.member, card.host, CG.Config:GetStyle("member")) + card.member:SetCombatDeferred(true) + card.member:SetThemeManaged(true) + if spec.placement == "inside" then card.slots = card.member:Own(CG.Slots:New(card.member:GetFrame(), {})) end + return card +end + +function Showcase:Values(class) + local values = UF.Util.Copy(UF.Units.SAMPLE) + values.name, values.lastname, values.class, values.className = "Tank", "Example", "WARRIOR", "Warrior" + values.health = values.healthMax * 0.7 + values.buffs = Presets.Samples(self.selection.preset, class) + values.debuffs, values.categoryAuras = {}, {} + values.showCast = false + return values +end + +function Showcase:ApplyCard(card, values, resolved, class, active) + local placement, preset = card.spec.placement, self.selection.preset + local style = UF.Util.Copy(CG.Config:GetStyle("member")) + Presets.EditStyle(style, resolved, preset, placement, self.selection.side) + card.member:Apply(style) + card.member:ClearAllPoints() + card.member:SetPoint("CENTER", card.host, "CENTER", 0, 0) + UF.Units:ShowSample(card.member, values) + if card.slots then + local slots = {} + Presets.EditSlots(slots, nil, preset, "inside", class) + card.slots:Apply(UF.Util.Merge(UF.Util.Copy(card.member:ChildConfig("auras")), slots)) + card.slots:SetEnabled(card.slots.resolved.enabled) + card.slots:ShowSample(values) + end + local isActive = active ~= nil and active.preset == preset and active.placement == placement + card.active = isActive + card.frame:SetBackdropBorderColor(unpack(UF.Skin.colors[isActive and "accent" or "border"])) + card.title:SetText(card.spec.title .. (isActive and ACTIVE or "")) + card.note:SetText(#values.buffs == 0 and EMPTY_NOTE or card.spec.note) +end + +function Showcase:Apply() + if self.released then return end + local class = UF.BuffSpells.PlayerClass() + local resolved = CG.Config.styles.member:Resolved() + local active = Presets.Detect(resolved, CG.Config:Resolved().slots) + local values = self:Values(class) + for _, card in ipairs(self.cards) do self:ApplyCard(card, values, resolved, class, active) end +end + +function Showcase:Release() + if self.released then return end + self.released = true + for _, card in ipairs(self.cards) do card.member:Release() end + self.frame:Hide() +end diff --git a/UnitFrames_ClickGrid/Integration/Workbench.lua b/UnitFrames_ClickGrid/Integration/Workbench.lua index 91de6fc..0273995 100644 --- a/UnitFrames_ClickGrid/Integration/Workbench.lua +++ b/UnitFrames_ClickGrid/Integration/Workbench.lua @@ -68,10 +68,60 @@ function CG:RegisterWorkbench() reset = function() CG.Config.styles[styleKind]:Reset() end, }) end + self:RegisterBuffPresetEntry(wb) self:RegisterBindingEntry(wb) wb:EndRegistration() end +-- Named buff sets instead of spell IDs: the choice is written straight into +-- the member style and the fixed slots; the cards show all three placements. +function CG:RegisterBuffPresetEntry(wb) + local Presets = self.BuffPresets + local selection + local function Current() + selection = selection or Presets.Current() + return selection + end + local schema = { + { key = "preset", type = "select", label = "Buff set", default = Presets.DEFAULT.preset, values = Presets.Values(), + tooltip = "My heals & shields: your own HoTs, shields and heal procs, every rank. Externals & defensives and" + .. " raid buffs: anyone's. Spells come from the buff catalogue, so no spell IDs are needed." }, + { key = "placement", type = "select", label = "Placement", default = Presets.DEFAULT.placement, values = Presets.PLACEMENTS, + tooltip = "Where the set shows on every member. The set leaves the other two places." }, + { key = "side", type = "select", label = "Side", default = Presets.DEFAULT.side, values = Presets.SIDES, + hidden = function(c) return c.placement ~= "outside" end }, + } + wb:Register({ id = "clickgrid.buffs", name = "Healing buffs", category = "Party & raid (ClickGrid)", + autoSize = true, fitToStage = true, size = { 540, 160 }, + scope = "All ClickGrid members: buff set and placement", + refreshOn = { "ClickGridConfigChanged", "ThemeChanged" }, + settingsTargets = function() return { { id = "style", schema = schema } } end, + create = function(stage) + selection = nil + local handle = CG.BuffShowcase:New(stage) + handle.selection = Current() + return handle + end, + styleTarget = function(handle) + return { schema = schema, + get = function(path) return Current()[path] end, + set = function(path, value) + local current = Current() + current[path] = value or Presets.DEFAULT[path] + local ok, reason = Presets.Apply(current.preset, current.placement, current.side) + if not ok then Report(reason) end + handle:Apply() + return ok, reason + end, + resolved = function() return UF.Util.Copy(Current()) end } + end, + reset = function() + selection = UF.Util.Copy(Presets.DEFAULT) + Presets.Apply(selection.preset, selection.placement, selection.side) + end, + }) +end + function CG:RegisterBindingEntry(wb) local B = self.Bindings local editor = { button = 1, modifier = "none" } diff --git a/UnitFrames_ClickGrid/README.md b/UnitFrames_ClickGrid/README.md index 234aa57..2b82163 100644 --- a/UnitFrames_ClickGrid/README.md +++ b/UnitFrames_ClickGrid/README.md @@ -108,6 +108,11 @@ client after adding it. For local builds and incremental updates, see the heal procs (Earth Shield, Prayer of Mending), every rank, from the generated buff catalogue. Classes without heals see no buffs there. The debuff row is off by default. A saved filter choice is kept. +- **Healing buffs** (Workbench): pick a named buff set (**My heals & shields**, + **Externals & defensives**, **Raid buffs**) and where it shows: outside the + cell (top or bottom), inside (one spell per corner, in the fixed slots) or in + the aura bar under health. Live sample cards show all three placements; the + set leaves the other two places when you pick one. - A centre icon for crowd control, big and external defensives (crowd control on top), mouse-transparent so hover and mouseover casts reach the member. - Three configurable fixed friendly-buff slots, each accepting comma-separated diff --git a/UnitFrames_ClickGrid/UnitFrames_ClickGrid.toc b/UnitFrames_ClickGrid/UnitFrames_ClickGrid.toc index 3d8feb2..17f1e73 100644 --- a/UnitFrames_ClickGrid/UnitFrames_ClickGrid.toc +++ b/UnitFrames_ClickGrid/UnitFrames_ClickGrid.toc @@ -14,6 +14,8 @@ Groups\Ordering.lua Core\Config.lua Bindings\Compiler.lua Auras\Slots.lua +Auras\Presets.lua +Auras\Showcase.lua Indicators\Status.lua Groups\Targets.xml Groups\Layout.lua diff --git a/tests/fixtures/schema_snapshot.txt b/tests/fixtures/schema_snapshot.txt index c367be1..8676ae8 100644 --- a/tests/fixtures/schema_snapshot.txt +++ b/tests/fixtures/schema_snapshot.txt @@ -1937,7 +1937,7 @@ option sharedSide type="select" label="Buffs and debuffs on one side" default="c option stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -2144,7 +2144,7 @@ option border.inset type="range" label="Background inset" default=3 min=0 max=16 option border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option buffs type="group" label="Buffs" option buffs.enabled type="toggle" label="Show buffs" default=true -option buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -3434,7 +3434,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -3518,7 +3518,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -6517,7 +6517,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -6601,7 +6601,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -9112,7 +9112,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -9196,7 +9196,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -11741,7 +11741,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -11825,7 +11825,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -14308,7 +14308,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -14392,7 +14392,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -16877,7 +16877,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -16961,7 +16961,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -21612,7 +21612,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -21696,7 +21696,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -24105,7 +24105,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -24189,7 +24189,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 @@ -26616,7 +26616,7 @@ option auras.sharedSide type="select" label="Buffs and debuffs on one side" defa option auras.stackFirst type="select" label="Closest to the frame" default="buffs" values=#ee43518b tooltip=#dc91071c hidden option auras.buffs type="group" label="Buffs" option auras.buffs.enabled type="toggle" label="Show buffs" default=true -option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auras.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auras.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auras.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auras.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e @@ -26700,7 +26700,7 @@ option auraBar.border.inset type="range" label="Background inset" default=3 min= option auraBar.border.padding type="range" label="Content padding" default=3 min=0 max=16 step=1 tooltip=#152e5e50 option auraBar.buffs type="group" label="Buffs" option auraBar.buffs.enabled type="toggle" label="Show buffs" default=true -option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#12742c0e +option auraBar.buffs.filter type="select" label="Which" default="HELPFUL" values=#0c924c5f option auraBar.buffs.max type="range" label="Maximum shown" default=16 min=1 max=40 step=1 option auraBar.buffs.maxDuration type="range" label="Maximum total duration" default=0 min=0 max=7200 step=1 tooltip=#b0f1445f option auraBar.buffs.sort type="select" label="Order" default="expiration" values=#1cce513e hint=#dfe0f3e8 diff --git a/tests/proof/workbench.lua b/tests/proof/workbench.lua index 39dc6db..7a55336 100644 --- a/tests/proof/workbench.lua +++ b/tests/proof/workbench.lua @@ -23,9 +23,21 @@ local function DruidMemberHeals() return workbench.handle.cells[1].frame end +local function BuffShowcase(index) + return function() + local _, _, workbench = Helpers.LoadClickGrid(true) + UnitClass = function() return "Druid", "DRUID", 11 end + workbench:Open("clickgrid.buffs") + return workbench.handle.cards[index].frame + end +end + return { { name = "workbench-player", build = UnitPreview("unit.player") }, { name = "workbench-target", build = UnitPreview("unit.target") }, { name = "clickgrid-panel", build = ClickGridPreview("clickgrid.panel") }, { name = "clickgrid-member-heals", build = DruidMemberHeals }, + { name = "clickgrid-buffs-outside", build = BuffShowcase(1) }, + { name = "clickgrid-buffs-inside", build = BuffShowcase(2) }, + { name = "clickgrid-buffs-bar", build = BuffShowcase(3) }, } diff --git a/tests/spec/clickgrid/clickgrid_buff_presets_spec.lua b/tests/spec/clickgrid/clickgrid_buff_presets_spec.lua new file mode 100644 index 0000000..f7569f3 --- /dev/null +++ b/tests/spec/clickgrid/clickgrid_buff_presets_spec.lua @@ -0,0 +1,168 @@ +local Helpers = require("helpers") + +describe("ClickGrid buff presets #buffs", function() + local UF, CG, wb + + local function As(class, name) + UnitClass = function() return name, class, 1 end + end + + local function Icons(buttons) + local icons = {} + for _, button in ipairs(buttons) do + if button:IsShown() then icons[#icons + 1] = button.ufIcon:GetTexture():match("([^\\]+)$") end + end + return icons + end + + local function CardIcons(card) + local placement = card.spec.placement + if placement == "inside" then return Icons(card.slots.samples) end + local part = card.member:GetPart(placement == "bar" and "auraBar" or "auras") + return Icons(part.previewContainers.buffs.ufButtons) + end + + local function SlotCandidates(index) + local member = CG.headers.party:GetAttribute("child1").Member + local slots = CG:GetGridButton(member).slots + return slots.candidates["slot" .. index] + end + + it("resolves each named set to a filter and every rank from the catalogue", function() + UF, CG = Helpers.LoadClickGrid() + As("DRUID", "Druid") + local heals = CG.BuffPresets.Resolve("heals") + assert.equals("HELPFUL|PLAYER", heals.filter) + assert.is_true(heals.own) + for _, id in ipairs({ 774, 25299, 417057, 8936, 408124 }) do assert.is_true(heals.ids[id], id) end + assert.is_nil(heals.ids[17]) + assert.same({ 774, 8936, 408120, 408124 }, heals.families) + local externals = CG.BuffPresets.Resolve("externals") + assert.equals("HELPFUL", externals.filter) + assert.is_false(externals.own) + for _, id in ipairs({ 1022, 10060, 402004, 29166, 871, 22812 }) do assert.is_true(externals.ids[id], id) end + assert.is_nil(externals.ids[774]) + assert.same({ 22812, 22842, 29166 }, { externals.families[1], externals.families[2], externals.families[3] }) + local raid = CG.BuffPresets.Resolve("raid") + assert.equals("HELPFUL", raid.filter) + for _, id in ipairs({ 1126, 21562, 1459, 5242 }) do assert.is_true(raid.ids[id], id) end + assert.is_nil(raid.ids[1022]) + end) + + it("offers the sets as member buff filters", function() + UF, CG = Helpers.LoadClickGrid() + local option = UF.Schema.Find(CG:StyleSchema("member"), "auras.buffs.filter") + local keys = {} + for _, value in ipairs(option.values()) do keys[value[1]] = true end + for _, preset in ipairs(CG.BuffPresets.LIST) do assert.is_true(keys[preset.filter], preset.id) end + local bar = UF.Schema.Find(CG:StyleSchema("member"), "auraBar.buffs.filter") + local barKeys = {} + for _, value in ipairs(bar.values()) do barKeys[value[1]] = true end + assert.is_true(barKeys[UF.Components.Auras.EXTERNALS]) + end) + + it("detects the default as my heals outside on top", function() + UF, CG = Helpers.LoadClickGrid() + assert.same({ preset = "heals", placement = "outside", side = "top" }, CG.BuffPresets.Current()) + end) + + it("fills one family per corner inside and matches every rank there", function() + UF, CG = Helpers.LoadClickGrid() + As("PRIEST", "Priest") + assert.is_true(CG.BuffPresets.Apply("heals", "inside")) + local member = CG.Config.styles.member:Resolved() + assert.is_false(member.auras.buffs.enabled) + assert.is_true(member.auras.enabled) + local slots = CG.Config:Resolved().slots + local expected = { { "139", "TOPLEFT" }, { "17", "TOPRIGHT" }, { "401859", "BOTTOMRIGHT" } } + for i, want in ipairs(expected) do + local slot = slots["slot" .. i] + assert.is_true(slot.enabled) + assert.equals(want[1], slot.spell) + assert.equals(want[2], slot.anchor) + assert.is_true(slot.own) + assert.equals(0, slot.offsetX) + end + for _, id in ipairs({ 139, 25315, 425268 }) do assert.is_true(SlotCandidates(1)[id], id) end + assert.same({ preset = "heals", placement = "inside", side = "top" }, CG.BuffPresets.Current()) + end) + + it("moves a set between the aura bar and outside without leaving it behind", function() + UF, CG = Helpers.LoadClickGrid() + As("DRUID", "Druid") + assert.is_true(CG.BuffPresets.Apply("heals", "inside")) + assert.is_true(CG.BuffPresets.Apply("externals", "bar")) + local member = CG.Config.styles.member:Resolved() + assert.is_true(member.auraBar.enabled) + assert.is_true(member.auraBar.buffs.enabled) + assert.is_false(member.auraBar.debuffs.enabled) + assert.equals(UF.Components.Auras.EXTERNALS, member.auraBar.buffs.filter) + assert.is_false(member.auras.buffs.enabled) + assert.is_true(CG.Config:Resolved().slots.slot1.enabled, "a different set's slots stay") + assert.same({ preset = "externals", placement = "bar", side = "top" }, CG.BuffPresets.Current()) + + assert.is_true(CG.BuffPresets.Apply("heals", "outside", "bottom")) + member = CG.Config.styles.member:Resolved() + assert.is_false(member.auraBar.enabled) + assert.is_true(member.auras.buffs.enabled) + assert.equals(UF.Components.Auras.MY_HEALS, member.auras.buffs.filter) + assert.equals("bottom", member.auras.buffs.position) + local slots = CG.Config:Resolved().slots + for i = 1, 3 do assert.is_false(slots["slot" .. i].enabled, i) end + assert.equals("774", slots.slot1.spell) + end) + + it("keeps the aura bar's debuffs when the bar was already on", function() + UF, CG = Helpers.LoadClickGrid() + CG.Config:SetStyle("member", "auraBar.enabled", true) + assert.is_true(CG.BuffPresets.Apply("raid", "bar")) + assert.is_true(CG.Config.styles.member:Resolved().auraBar.debuffs.enabled) + assert.is_true(CG.BuffPresets.Apply("raid", "outside")) + assert.is_true(CG.Config.styles.member:Resolved().auraBar.enabled) + assert.is_false(CG.Config.styles.member:Resolved().auraBar.buffs.enabled) + end) + + describe("Healing buffs page", function() + before_each(function() + UF, CG, wb = Helpers.LoadClickGrid(true) + As("DRUID", "Druid") + wb:Open("clickgrid.buffs") + end) + + it("shows the set in all three placements from sample auras", function() + local cards = wb.handle.cards + assert.equals(3, #cards) + local heals = { "Spell_Nature_Rejuvenation", "Spell_Nature_ResistNature", "Ability_Druid_Flourish", "INV_Misc_Herb_Felblossom" } + assert.same(heals, CardIcons(cards[1])) + assert.same({ heals[1], heals[2], heals[3] }, CardIcons(cards[2])) + assert.is_true(#CardIcons(cards[3]) > 0) + assert.is_true(cards[1].active) + assert.is_false(cards[2].active) + assert.equals("BOTTOMRIGHT", select(1, cards[2].slots.samples[3]:GetPoint())) + end) + + it("applies a choice to the saved settings and marks its card", function() + local target = wb.styleTarget + assert.equals("heals", target.get("preset")) + target.set("placement", "bar") + local member = CG.Config.styles.member:Resolved() + assert.is_true(member.auraBar.enabled) + assert.equals(UF.Components.Auras.MY_HEALS, member.auraBar.buffs.filter) + assert.is_true(wb.handle.cards[3].active) + assert.is_false(wb.handle.cards[1].active) + target.set("preset", "raid") + assert.equals(UF.Components.Auras.RAID_BUFFS, CG.Config.styles.member:Resolved().auraBar.buffs.filter) + assert.same({ "Spell_Nature_Thorns", "Spell_Nature_Regeneration" }, + { CardIcons(wb.handle.cards[1])[1], CardIcons(wb.handle.cards[1])[2] }) + end) + + it("tells a class without heals that there is nothing to show", function() + As("WARRIOR", "Warrior") + wb.handle:Apply() + for _, card in ipairs(wb.handle.cards) do + assert.same({}, CardIcons(card)) + assert.is_not_nil(card.note:GetText():find("no heals", 1, true)) + end + end) + end) +end) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index 39b17f4..645b4bd 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -1,7 +1,7 @@ # Design: Healer buffs out of the box Status: in progress. §1 buff catalogue (UNIT-13), §2 rank-proof slots (UNIT-14) and §3 "My heals & shields" -on by default (UNIT-15) are implemented; §4 presets/showcases are open. The rank-ID question (UNIT-17) is settled from source below. +on by default (UNIT-15) are implemented; §4 presets and the Workbench page (UNIT-16) are implemented, the onboarding tile (UNIT-18) is open. The rank-ID question (UNIT-17) is settled from source below. Targets Forever Interface 16001, build 1.60.1.70862. ## Problem From dc3c23ba03cd4fc82faee059ed6ea1bd8222f52e Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 04:22:59 +0100 Subject: [PATCH 8/9] UNIT-18 Onboarding tile: heals on group frames Extras step offers "Heals on group frames" with Outside / Corners / Aura bar when ClickGrid is loaded and the Healer look or a healing class is picked. It writes My heals & shields into the pending style as a full ClickGrid section, only when chosen; off drops only the heals set. Extras can now be conditional and carry a choice. --- USER_GUIDE.md | 5 +- UnitFrames_ClickGrid/Auras/Presets.lua | 31 +++-- UnitFrames_Onboarding/Pending.lua | 19 ++- UnitFrames_Onboarding/Presets.lua | 49 ++++++- UnitFrames_Onboarding/Steps/Extras.lua | 36 +++++- tests/proof/workbench.lua | 12 ++ .../onboarding_group_heals_spec.lua | 121 ++++++++++++++++++ todos/10-design-healer-buffs.md | 2 +- 8 files changed, 254 insertions(+), 21 deletions(-) create mode 100644 tests/spec/onboarding/onboarding_group_heals_spec.lua diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 76cc551..c2f0993 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -18,7 +18,10 @@ started**: turn it off in the AddOns list and nothing of it loads. size, shown on the preview as you click. 3. **Add the extras**: castbars on your player, target and focus frames, experience, combo points, and the standalone timer bars with global - cooldown and swing timer. **Save as a new profile** (on by default) puts + cooldown and swing timer. With ClickGrid loaded, the Healer look or a + druid, priest, paladin or shaman also gets **Heals on group frames**: your + own HoTs and shields on ClickGrid cells, outside the cell, in its corners + or in an aura bar. **Save as a new profile** (on by default) puts the look into a new profile named after it and switches to it; your previous profile is left untouched. Turn it off to replace the style of the current profile instead. Frame positions always stay. diff --git a/UnitFrames_ClickGrid/Auras/Presets.lua b/UnitFrames_ClickGrid/Auras/Presets.lua index 718b4d8..69854d9 100644 --- a/UnitFrames_ClickGrid/Auras/Presets.lua +++ b/UnitFrames_ClickGrid/Auras/Presets.lua @@ -17,6 +17,7 @@ Presets.PLACEMENTS = { { "bar", "Aura bar under health" }, } Presets.SIDES = { { "top", "Top" }, { "bottom", "Bottom" } } +Presets.OFF = "off" Presets.DEFAULT = { preset = "heals", placement = "outside", side = "top" } -- Bottom left keeps clear of the member's level and class text. Presets.CORNERS = { "TOPLEFT", "TOPRIGHT", "BOTTOMRIGHT" } @@ -80,23 +81,27 @@ end -- Writes a placement into member style overrides. The set shows in one -- placement: the aura block and the aura bar drop their buffs otherwise. +-- OFF only drops them where they show this same set. function Presets.EditStyle(style, resolved, id, placement, side) local filter = byId[id].filter - local outside, bar = placement == "outside", placement == "bar" - Util.SetPath(style, "auras.buffs.enabled", outside) - if outside then + local function Leaves(group) return placement ~= Presets.OFF or group.filter == filter end + if placement == "outside" then + Util.SetPath(style, "auras.buffs.enabled", true) Util.SetPath(style, "auras.buffs.filter", filter) Util.SetPath(style, "auras.buffs.position", side or Presets.DEFAULT.side) + elseif Leaves(resolved.auras.buffs) then + Util.SetPath(style, "auras.buffs.enabled", false) end -- Corner slots share the aura block's on/off state. - if outside or placement == "inside" then Util.SetPath(style, "auras.enabled", true) end - Util.SetPath(style, "auraBar.buffs.enabled", bar) - if bar then + if placement == "outside" or placement == "inside" then Util.SetPath(style, "auras.enabled", true) end + if placement == "bar" then if not resolved.auraBar.enabled then Util.SetPath(style, "auraBar.debuffs.enabled", false) end Util.SetPath(style, "auraBar.enabled", true) + Util.SetPath(style, "auraBar.buffs.enabled", true) Util.SetPath(style, "auraBar.buffs.filter", filter) - elseif resolved.auraBar.enabled and not resolved.auraBar.debuffs.enabled then - Util.SetPath(style, "auraBar.enabled", false) + elseif Leaves(resolved.auraBar.buffs) then + Util.SetPath(style, "auraBar.buffs.enabled", false) + if resolved.auraBar.enabled and not resolved.auraBar.debuffs.enabled then Util.SetPath(style, "auraBar.enabled", false) end end end @@ -127,6 +132,16 @@ function Presets.Apply(id, placement, side) end) end +-- A style string's ClickGrid section (Integration/Profiles.lua) with the set +-- placed: it replaces every store, so it carries all of them as saved. +function Presets.StyleSection(id, placement, side) + local data = UF.Profiles.sections.clickgrid.export() + Presets.EditStyle(data.member, CG.Config.styles.member:Resolved(), id, placement, side) + data.settings.slots = data.settings.slots or {} + Presets.EditSlots(data.settings.slots, CG.Config:Resolved().slots, id, placement, BuffSpells.PlayerClass()) + return data +end + -- The set and placement the saved settings show, or nil for a custom setup. function Presets.Detect(member, slots) local bar, auras = member.auraBar, member.auras diff --git a/UnitFrames_Onboarding/Pending.lua b/UnitFrames_Onboarding/Pending.lua index 068d85a..df9e3a4 100644 --- a/UnitFrames_Onboarding/Pending.lua +++ b/UnitFrames_Onboarding/Pending.lua @@ -51,7 +51,7 @@ end function Pending:Reset() self.preset = Presets.byId.default - self.tweaks, self.extras, self.size = {}, {}, "normal" + self.tweaks, self.extras, self.extraChoices, self.size = {}, {}, {}, "normal" self.newProfile = true self.result = nil self:Changed() @@ -76,9 +76,10 @@ function Pending:Style() local value = self.tweaks[tweak.key] if value ~= nil and tweak.write then tweak.write(style, value) end end + -- An extra this look no longer offers keeps its choice but writes nothing. for _, extra in ipairs(Presets.extras) do local value = self.extras[extra.key] - if value ~= nil then extra.write(style, value) end + if value ~= nil and Presets.Available(extra, self) then extra.write(style, value, self:GetExtraChoice(extra.key)) end end Scale(style, Presets.SIZES[self.size]) self.style = style @@ -101,7 +102,7 @@ function Pending:SetTweak(key, value) end function Pending:GetExtra(key) - return Presets.extrasByKey[key].read(self:Resolved()) + return Presets.extrasByKey[key].read(self:Resolved(), self) end function Pending:SetExtra(key, enabled) @@ -109,6 +110,18 @@ function Pending:SetExtra(key, enabled) self:Changed() end +function Pending:GetExtraChoice(key) + local extra = Presets.extrasByKey[key] + if not extra.choices then return nil end + return self.extraChoices[key] or extra.choice(self) +end + +-- Picking a choice also switches its extra on. +function Pending:SetExtraChoice(key, value) + self.extraChoices[key], self.extras[key] = value, true + self:Changed() +end + function Pending:SetNewProfile(enabled) self.newProfile = enabled and true or false end diff --git a/UnitFrames_Onboarding/Presets.lua b/UnitFrames_Onboarding/Presets.lua index 85e40e7..8bd0372 100644 --- a/UnitFrames_Onboarding/Presets.lua +++ b/UnitFrames_Onboarding/Presets.lua @@ -8,8 +8,10 @@ through the same validation as an import. Missing parts mean defaults: every preset replaces the theme, all unit frames and the timers. Tweaks (step 2) and extras (step 3) change a composed copy of a preset: - write(style, value) change the style table - read(resolved) -> value the current choice, from Pending:Resolved() + write(style, value, choice) change the style table + read(resolved, pending) -> value the current choice, from Pending:Resolved() +An extra may also offer `choices` (a placement, read by `choice(pending)`) +and be `available(pending)` only for some looks or classes. ]] local Presets = { byId = {}, tweaksByKey = {}, extrasByKey = {} } ob.Presets = Presets @@ -105,6 +107,43 @@ local function TimerExtra(path, extra) return extra end +-- ClickGrid's buff presets, once ClickGrid has started. +local function GroupBuffs() + local clickGrid = UF.ClickGrid + return clickGrid and clickGrid.started and clickGrid.BuffPresets or nil +end + +local HEALING_CLASSES = { DRUID = true, PRIEST = true, PALADIN = true, SHAMAN = true } + +-- Where ClickGrid shows the player's heals now, or nil. +local function HealsPlacement() + local buffs = GroupBuffs() + if not buffs then return nil end + local config = UF.ClickGrid.Config + local found = buffs.Detect(config.styles.member:Resolved(), config:Resolved().slots) + return found and found.preset == "heals" and found.placement or nil +end + +-- The player's own heals on ClickGrid cells, in one of three placements. It +-- writes a ClickGrid section only when chosen, so ClickGrid stays as it is +-- otherwise; off drops only the heals set. +local groupHeals = { key = "groupHeals", label = "Heals on group frames", area = "player", accent = "group", + hint = "Show my heals on group frames: your own HoTs and shields, every rank, on ClickGrid party and raid cells." + .. " Pick where they sit below.", + choices = { { "outside", "Outside" }, { "inside", "Corners" }, { "bar", "Aura bar" } }, + available = function(pending) + return GroupBuffs() ~= nil and (pending.preset.id == "healer" or HEALING_CLASSES[UF.BuffSpells.PlayerClass() or ""] == true) + end, + write = function(style, enabled, choice) + local buffs = GroupBuffs() + style.clickgrid = buffs.StyleSection("heals", enabled and choice or buffs.OFF) + end, + read = function(_, pending) + if pending.extras.groupHeals ~= nil then return pending.extras.groupHeals end + return HealsPlacement() ~= nil + end, + choice = function() return HealsPlacement() or "outside" end } + -- Step 3 tiles; `area` places them on the screen map (Steps/Extras.lua). Presets.extras = { UnitExtra("player", "castbar.enabled", { key = "playerCast", label = "Player castbar", area = "player", @@ -123,8 +162,14 @@ Presets.extras = { hint = "A thin global cooldown sweep under the timer castbar." }), TimerExtra("mainHand.enabled", { key = "swing", label = "Swing timer", hint = "Main-hand swings, for melee classes." }), + groupHeals, } +-- Extras without `available` are always offered. +function Presets.Available(extra, pending) + return not extra.available or extra.available(pending) +end + for _, preset in ipairs(Presets.list) do Presets.byId[preset.id] = preset end for _, tweak in ipairs(Presets.tweaks) do Presets.tweaksByKey[tweak.key] = tweak end for _, extra in ipairs(Presets.extras) do Presets.extrasByKey[extra.key] = extra end diff --git a/UnitFrames_Onboarding/Steps/Extras.lua b/UnitFrames_Onboarding/Steps/Extras.lua index 0646faf..d5bc3b2 100644 --- a/UnitFrames_Onboarding/Steps/Extras.lua +++ b/UnitFrames_Onboarding/Steps/Extras.lua @@ -16,7 +16,7 @@ local Extras = { } ob.Steps.Extras = Extras -local MAP_HEIGHT, TILE_WIDTH, TILE_HEIGHT, TILE_GAP = 400, 170, 28, 6 +local MAP_HEIGHT, TILE_WIDTH, TILE_HEIGHT, TILE_GAP, CHOICE_HEIGHT = 400, 170, 28, 6, 22 -- Fixed blocks (centre offsets on the map) and where each area's tiles start. local BLOCKS = { @@ -49,17 +49,20 @@ function Extras:Build(page) barsText:SetText("action bars") for _, block in ipairs(BLOCKS) do Block(map, block) end - self.tiles = {} + self.tiles, self.choices = {}, {} local placed = {} for _, extra in ipairs(Presets.extras) do local area = AREAS[extra.area] local index = placed[extra.area] or 0 placed[extra.area] = index + 1 + local accent = extra.accent and COLORS[extra.accent] or nil local tile = ob.Widgets.Chip:New(map, { text = extra.label, width = TILE_WIDTH, height = TILE_HEIGHT, dot = true, - accent = extra.accent and COLORS[extra.accent] or nil, tooltip = extra.hint, + accent = accent, tooltip = extra.hint, onClick = function() Pending:SetExtra(extra.key, not Pending:GetExtra(extra.key)) end }) - tile:SetPoint("CENTER", area[1], area[2] - index * (TILE_HEIGHT + TILE_GAP)) + local y = area[2] - index * (TILE_HEIGHT + TILE_GAP) + tile:SetPoint("CENTER", area[1], y) self.tiles[extra.key] = tile + if extra.choices then self.choices[extra.key] = self:ChoiceRow(map, extra, accent, area[1], y - (TILE_HEIGHT + CHOICE_HEIGHT) / 2 - 4) end end self.newProfile = UF.Widgets.Checkbox:New(page, { label = "Save as a new profile", @@ -71,12 +74,33 @@ function Extras:Build(page) self.profileNote:SetWidth(ob.Shell.PAGE_WIDTH) end +-- Small chips under a tile, one per choice, spanning the tile's width. +function Extras:ChoiceRow(map, extra, accent, x, y) + local chips, count = {}, #extra.choices + local width = (TILE_WIDTH - (count - 1) * 4) / count + for index, choice in ipairs(extra.choices) do + local chip = ob.Widgets.Chip:New(map, { text = choice[2], width = width, height = CHOICE_HEIGHT, size = 10, accent = accent, + onClick = function() Pending:SetExtraChoice(extra.key, choice[1]) end }) + chip:SetPoint("CENTER", x - TILE_WIDTH / 2 + width / 2 + (index - 1) * (width + 4), y) + chip.value = choice[1] + chips[index] = chip + end + return chips +end + function Extras:Refresh() local on, count = 0, 0 for key, tile in pairs(self.tiles) do - local enabled = Pending:GetExtra(key) + local available = Presets.Available(Presets.extrasByKey[key], Pending) + local enabled = available and Pending:GetExtra(key) + tile:SetShown(available) tile:SetSelected(enabled) - count = count + 1 + local choice = Pending:GetExtraChoice(key) + for _, chip in ipairs(self.choices[key] or {}) do + chip:SetShown(available) + chip:SetSelected(enabled and chip.value == choice) + end + if available then count = count + 1 end if enabled then on = on + 1 end end self.map.caption:SetText(("%d OF %d EXTRAS ON"):format(on, count)) diff --git a/tests/proof/workbench.lua b/tests/proof/workbench.lua index 7a55336..98f8338 100644 --- a/tests/proof/workbench.lua +++ b/tests/proof/workbench.lua @@ -32,6 +32,17 @@ local function BuffShowcase(index) end end +local function OnboardingGroupHeals() + local ns = Helpers.LoadClickGrid() + local ob = Helpers.LoadToc("UnitFrames_Onboarding/UnitFrames_Onboarding.toc", "UnitFrames_Onboarding") + UnitClass = function() return "Druid", "DRUID", 11 end + ns.Onboarding:Open() + ob.Pending:SelectPreset("healer") + ns.Onboarding:Next() + ns.Onboarding:Next() + return ob.Steps.Extras.map +end + return { { name = "workbench-player", build = UnitPreview("unit.player") }, { name = "workbench-target", build = UnitPreview("unit.target") }, @@ -40,4 +51,5 @@ return { { name = "clickgrid-buffs-outside", build = BuffShowcase(1) }, { name = "clickgrid-buffs-inside", build = BuffShowcase(2) }, { name = "clickgrid-buffs-bar", build = BuffShowcase(3) }, + { name = "onboarding-group-heals", build = OnboardingGroupHeals }, } diff --git a/tests/spec/onboarding/onboarding_group_heals_spec.lua b/tests/spec/onboarding/onboarding_group_heals_spec.lua new file mode 100644 index 0000000..1d083e8 --- /dev/null +++ b/tests/spec/onboarding/onboarding_group_heals_spec.lua @@ -0,0 +1,121 @@ +local Helpers = require("helpers") + +describe("Getting started heals on group frames #onboarding #buffs", function() + local function As(class) + UnitClass = function() return class, class, 1 end + end + + local function LoadWithClickGrid() + local ns, cg = Helpers.LoadClickGrid() + local ob = Helpers.LoadToc("UnitFrames_Onboarding/UnitFrames_Onboarding.toc", "UnitFrames_Onboarding") + C_AddOns.LoadAddOn = function(name) return name == "UnitFrames_Onboarding" end + ob.Pending:Reset() + return ns, cg, ob + end + + local function Offered(ob) + return ob.Presets.Available(ob.Presets.extrasByKey.groupHeals, ob.Pending) + end + + it("is offered for the Healer look or a healing class, only with ClickGrid loaded", function() + local _, _, ob = Helpers.LoadOnboarding() + As("DRUID") + ob.Pending:Reset() + ob.Pending:SelectPreset("healer") + assert.is_false(Offered(ob)) + + _, _, ob = LoadWithClickGrid() + As("WARRIOR") + assert.is_false(Offered(ob)) + ob.Pending:SelectPreset("healer") + assert.is_true(Offered(ob)) + for _, class in ipairs({ "DRUID", "PRIEST", "PALADIN", "SHAMAN" }) do + As(class) + ob.Pending:SelectPreset("default") + assert.is_true(Offered(ob), class) + end + end) + + it("shows the tile and its placements on the Extras step only when offered", function() + local ns, _, ob = LoadWithClickGrid() + As("WARRIOR") + ns.Onboarding:Open() + ns.Onboarding:Next() + ns.Onboarding:Next() + local extras = ob.Steps.Extras + assert.is_false(extras.tiles.groupHeals:IsShown()) + for _, chip in ipairs(extras.choices.groupHeals) do assert.is_false(chip:IsShown()) end + assert.is_not_nil(extras.map.caption:GetText():find((" OF %d EXTRAS ON"):format(#ob.Presets.extras - 1), 1, true)) + + ns.Onboarding:Jump(1) + ob.Pending:SelectPreset("healer") + ns.Onboarding:Next() + ns.Onboarding:Next() + assert.is_true(extras.tiles.groupHeals:IsShown()) + assert.is_true(extras.tiles.groupHeals.selected, "ClickGrid already shows my heals outside") + assert.is_true(extras.choices.groupHeals[1].selected) + extras.choices.groupHeals[3].frame:RunScript("OnClick") + assert.equals("bar", ob.Pending:GetExtraChoice("groupHeals")) + assert.is_true(extras.choices.groupHeals[3].selected) + assert.is_false(extras.choices.groupHeals[1].selected) + end) + + it("applies My heals & shields in the chosen placement through the pending style", function() + local ns, cg, ob = LoadWithClickGrid() + As("DRUID") + cg.Config:SetStyle("target", "shown", true) + cg.Config:SetStyle("member", "width", 140) + local pending = ob.Pending + pending:SelectPreset("healer") + pending:SetNewProfile(false) + pending:SetExtraChoice("groupHeals", "inside") + local apply, dropped = ns.Profiles:Prepare("style", pending:Style()) + assert.is_not_nil(apply) + assert.same({}, dropped) + assert.is_false(cg.Config:Resolved().slots.slot1.enabled, "nothing is saved before Apply") + + assert.is_true(pending:Apply()) + local slots = cg.Config:Resolved().slots + assert.is_true(slots.slot1.enabled) + assert.equals("774", slots.slot1.spell) + assert.equals("TOPLEFT", slots.slot1.anchor) + assert.is_false(cg.Config.styles.member:Resolved().auras.buffs.enabled) + assert.is_true(cg.Config.styles.target:Resolved().shown, "other ClickGrid settings stay") + assert.equals(140, cg.Config.styles.member:Resolved().width) + end) + + it("drops only the heals set when switched off", function() + local _, cg, ob = LoadWithClickGrid() + As("PRIEST") + local pending = ob.Pending + pending:SetExtra("groupHeals", false) + assert.is_false(pending:GetExtra("groupHeals")) + local member = pending:Style().clickgrid.member + assert.is_false(member.auras.buffs.enabled) + + cg.Config:SetStyle("member", "auras.buffs.filter", "HELPFUL") + pending:Changed() + assert.is_nil(UnitFrames.Util.GetPath(pending:Style().clickgrid.member, "auras.buffs.enabled"), + "a different buff filter is not the heals set") + end) + + it("leaves ClickGrid alone when untouched, after Back to another look, or on cancel", function() + local ns, cg, ob = LoadWithClickGrid() + As("WARRIOR") + local pending = ob.Pending + pending:SelectPreset("healer") + assert.is_nil(pending:Style().clickgrid) + + pending:SetExtraChoice("groupHeals", "bar") + assert.is_not_nil(pending:Style().clickgrid) + pending:SelectPreset("default") + assert.is_nil(pending:Style().clickgrid, "a look that no longer offers it writes nothing") + + ns.Onboarding:Open() + ob.Pending:SelectPreset("healer") + ob.Pending:SetExtraChoice("groupHeals", "bar") + ns.Onboarding:Close() + assert.is_false(cg.Config.styles.member:Resolved().auraBar.enabled) + assert.same({ preset = "heals", placement = "outside", side = "top" }, cg.BuffPresets.Current()) + end) +end) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index 645b4bd..e676687 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -1,7 +1,7 @@ # Design: Healer buffs out of the box Status: in progress. §1 buff catalogue (UNIT-13), §2 rank-proof slots (UNIT-14) and §3 "My heals & shields" -on by default (UNIT-15) are implemented; §4 presets and the Workbench page (UNIT-16) are implemented, the onboarding tile (UNIT-18) is open. The rank-ID question (UNIT-17) is settled from source below. +on by default (UNIT-15) are implemented; §4 presets, the Workbench page (UNIT-16) and the onboarding tile (UNIT-18) are implemented. The rank-ID question (UNIT-17) is settled from source below. Targets Forever Interface 16001, build 1.60.1.70862. ## Problem From bb8d62a85d9cc29241e24af1c78bbac559551acc Mon Sep 17 00:00:00 2001 From: Martin Konstantin Herrmann Date: Wed, 11 Nov 2026 09:57:35 +0100 Subject: [PATCH 9/9] UNIT-23 Record the waived in-game check (UNIT-22) The design doc no longer asks for an in-game check: a Verification section records the user's waiver of 2026-11-11 (UNIT-22, plan decision no-ingame-acceptance), with the source check plus clickgrid_member_heals_spec as coverage. The spec now also checks a priest's include IDs on live cells. --- .../spec/clickgrid/clickgrid_member_heals_spec.lua | 9 +++++++++ todos/10-design-healer-buffs.md | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/spec/clickgrid/clickgrid_member_heals_spec.lua b/tests/spec/clickgrid/clickgrid_member_heals_spec.lua index b4ccf2a..94359ef 100644 --- a/tests/spec/clickgrid/clickgrid_member_heals_spec.lua +++ b/tests/spec/clickgrid/clickgrid_member_heals_spec.lua @@ -47,6 +47,15 @@ describe("ClickGrid member heals by default #buffs", function() assert.is_nil(include[17]) end) + it("passes a priest's Renew ranks and shields to member cells", function() + UF, CG = Helpers.LoadClickGrid() + UnitClass = function() return "Priest", "PRIEST", 5 end + CG:Refresh() + local include = Native().candidateFilters.includeSpellIDs + for _, id in ipairs({ 139, 25315, 425268, 17, 10901, 401859 }) do assert.is_true(include[id], id) end + assert.is_nil(include[774]) + end) + it("previews the player's own class heals on member cells", function() local wb UF, CG, wb = Helpers.LoadClickGrid(true) diff --git a/todos/10-design-healer-buffs.md b/todos/10-design-healer-buffs.md index e676687..8936afe 100644 --- a/todos/10-design-healer-buffs.md +++ b/todos/10-design-healer-buffs.md @@ -32,8 +32,8 @@ comes from the `SpellAuraVisibility` DB2 (Type 0 = RaidInCombat). On build | Riptide, Power Word: Shield, Earth Shield | **not flagged** | — | So even a user who switches the member buffs on can miss classic-rank HoTs, -and shields never pass. Needs one in-game check of which set a druid's -spellbook casts (see Verification). +and shields never pass. Which set a druid's spellbook casts was settled from +source (see the UNIT-17 source check and Verification). ### Both ID sets belong to one family @@ -201,3 +201,13 @@ Its honest label is "raid-flagged buffs: not all ranks, no shields". The catalogue keeps both sets per family, so "My heals & shields" and the slots match either way and nothing else changes. If an in-game `/dump` later shows 417057-set auras, only the relabel wording changes. + +## Verification + +The user waived the in-game run on 2026-11-11 (UNIT-22, plan decision +`no-ingame-acceptance`). Coverage is the source check above (UNIT-17) plus +`tests/spec/clickgrid/clickgrid_member_heals_spec.lua`: with default settings, +ClickGrid member cells pass the druid's (Rejuvenation ranks of both ID sets, +Regrowth, Lifebloom) and the priest's (Renew ranks of both sets, Power Word: +Shield, Prayer of Mending) include IDs to the native buff filter, and the +preview shows each class's own heals.