feat(aura): add DISPELLABLE / !DISPELLABLE aura filter

Modern DISPELLABLE means "can be dispelled/purged/stolen by SOME
mechanism, regardless of whether the player can". Confirmed against the
Turtle/Tortoise server: an aura is dispellable iff its Spell.dbc Dispel
type is Magic(1), Curse(2), Disease(3), or Poison(4) — the server's
DISPEL_ALL_MASK — and vanilla applies no per-aura "undispellable"
attribute, so the dispel type is the whole story.

Data::IsDispellable(spellID) reads the Dispel field (OFF_SPELL_DISPEL_TYPE)
via the existing SpellRecord and checks 1..4 (the type ID directly, not
dispelName != nil, in case SpellDispelType.dbc names Stealth/Invisibility).

Fold the caster and dispel predicates into one Aura::Data::Match struct
that replaces the standalone CasterMode parameter across the Find*/Push*/
Append* surface, applied by a shared MatchesAura(match, isPlayerCast,
spellID). Orthogonal filter dimensions now add a struct field instead of
another parameter. Existing caster behavior is unchanged.

Tokenizer honors DISPELLABLE / !DISPELLABLE; docs updated. Verified
in-game: HARMFUL|DISPELLABLE returns Magic debuffs, HARMFUL|!DISPELLABLE
returns physical debuffs (Rend).
This commit is contained in:
Brues
2026-08-07 01:06:39 -05:00
parent f3b328247c
commit dbe5ab40ee
5 changed files with 138 additions and 75 deletions
+6 -2
View File
@@ -13717,7 +13717,7 @@ end
**Filter tokens.** `filter` uses the modern AuraFilters format: tokens
separated by `|` or spaces, each token optionally negated with a
leading `!`. This build honors two:
leading `!`. This build honors:
- `HELPFUL` / `HARMFUL` — buffs / debuffs. With neither token the
query returns both (the indexed getter defaults to helpful).
@@ -13725,8 +13725,12 @@ leading `!`. This build honors two:
auras the player did not cast. Caster data comes from casts this
session, so an aura present before you saw it cast has no caster and
counts as not-player.
- `DISPELLABLE` / `!DISPELLABLE` — only auras that can be dispelled,
purged, or stolen (dispel type Magic, Curse, Disease, or Poison), or
only auras that cannot. This is "can it be removed at all", not "can
you remove it".
All other AuraFilters tokens (`RAID`, `CANCELABLE`, `DISPELLABLE`,
All other AuraFilters tokens (`RAID`, `CANCELABLE`,
`INCLUDE_NAME_PLATE_ONLY`, `MAW`, and the rest) are accepted and
ignored — vanilla has no data for them. Token matching is whole-token,
so `RAID_PLAYER_DISPELLABLE` is not read as `PLAYER`.