You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(aura): let a duration rule edit an aura its own trigger creates
Turtle's Bestial Wrath gives the hunter's pet Scent of Blood for 18s, but
C_UnitAuras reported 8s and then dropped the timer entirely while the buff
was still up.
Server-side (tortoise-wow spell_hunter_bestial_wrath) Bestial Wrath neither
applies the aura nor carries its duration on the wire: effect 0 is
TRIGGER_SPELL(Scent of Blood, 52995), and the script then stretches the
holder that trigger just created via SetAuraMaxDuration/SetAuraDuration.
Both are plain field writes, and 1.12's only duration packet is scoped to an
aura-bearer that is a PLAYER, which a pet is not -- so the client never hears
the 18s and keeps the 8s base it computed when the aura landed. Exactly the
class of edit Aura::Source's duration rules exist to mirror; two things had
to change before one could express it.
The affected-aura selector demanded a SpellFamilyFlags overlap, and every
Turtle custom spell carries flags of 0 (308 in the hunter family alone), so
no mask could ever name this aura. It now takes a family-flag overlap and/or
a SpellIconID, at least one of the two -- an icon is shared across a spell's
whole rank ladder, so it stays as rank-proof as a flag, and icon 2245 picks
out exactly the four Scent of Blood records and nothing else. Registrars
reject the mask-0 + icon-0 rule that would match a whole class family, and
RefreshDurationByFamily takes the same invariant so the two entry points
cannot disagree about what they match.
A trigger can also CREATE the aura it edits, which the immediate-apply model
could not see. The trigger's SMSG_SPELL_GO arrives before the triggered
cast's, so editing at trigger time either matches nothing or is overwritten
moments later when the triggered cast stores its own base duration -- the
edit is lost either way. Idempotent ops now ARM the target as well, and the
next matching store re-applies the edit, from the cast path or the
application path, whichever the aura arrives on. Only refresh and set arm:
re-running those lands on the same value, while reduce would shave twice and
remove would kill an aura that was legitimately re-applied, so Conflagrate
behaves exactly as before.
The rule reads Bestial Wrath's own duration from the client's spell data
instead of hardcoding the server's 18s, so a rebalance that patches the DBC
carries over on its own.
Fixesbrues-code/pfUI#50
Copy file name to clipboardExpand all lines: docs/API.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15629,20 +15629,24 @@ trigger lands:
15629
15629
| `triggerFamily` | `SpellFamilyName` of the triggering cast (e.g. `6` priest). |
15630
15630
| `triggerSchool` | School index the trigger must be (`0` physical … `2` fire, `5` shadow, `6` arcane), or `< 0` for any. Matching by family + school covers a whole class of spells at once — every rank, plus server-added ones — rather than a named ability. |
15631
15631
| `affectedFamily` | `SpellFamilyName` of the affected aura (e.g. `5` warlock, `11` shaman, `6` priest). |
15632
-
| `affectedFamilyFlags` | A `SpellFamilyFlags` bitmask; the affected aura matches if it overlaps. Family + flag is rank-proof (covers every rank at once). |
15633
-
| `affectedIcon` | `SpellIconID` the affected aura must have, or `0` to match any. |
15632
+
| `affectedFamilyFlags` | A `SpellFamilyFlags` bitmask; the affected aura matches if it overlaps. Family plus flag is rank-proof, so it covers every rank at once. Pass `0` to select on the icon alone. |
15633
+
| `affectedIcon` | `SpellIconID` the affected aura must have, or `0` to match any. Give this when the aura has no `SpellFamilyFlags`, which is common for a server's custom spells. An icon is shared by a spell's whole rank ladder, so it stays rank-proof. |
15634
15634
| `op` | `"refresh"` (reset to full duration), `"reduce"` (subtract `valueSeconds`, removing the aura if it would go non-positive), `"set"` (to `valueSeconds`), `"remove"`. |
15635
15635
| `valueSeconds` | Amount for `reduce`/`set`; ignored otherwise. |
15636
15636
15637
+
Give at least one of `affectedFamilyFlags` and `affectedIcon`. A rule with
15638
+
neither would match every aura of the class, so it is rejected.
15639
+
15637
15640
The rule only fires for the aura **cast by the same unit** as the trigger
15638
15641
(these mechanics act on the caster's own DoT), and misses are excluded for
15639
15642
free (a missed trigger isn't in the packet's hit list).
15640
15643
15641
15644
Rules keyed to an **exact trigger spellID** (rather than a family + school
15642
15645
category) are registered inside the DLL instead. `!!!ClassicAPI`'s built-in
15643
15646
Turtle mods — Conflagrate shaving 3s off the caster's Immolate, Molten Blast
15644
-
refreshing the caster's Flame Shock — live in `src/turtle/DurationMods.cpp`,
15645
-
and Carnage's roll-gated Rip/Rake refresh in `src/turtle/Carnage.cpp`.
15647
+
refreshing the caster's Flame Shock, and Bestial Wrath stretching the pet's
15648
+
Scent of Blood to its own length — live in `src/turtle/DurationMods.cpp`, and
15649
+
Carnage's roll-gated Rip/Rake refresh in `src/turtle/Carnage.cpp`.
0 commit comments