mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
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:
@@ -203,7 +203,7 @@ int BuildList(LocEntry *out, int maxOut) {
|
||||
const uint64_t playerGuid = Unit::Identity::PlayerGuid();
|
||||
for (int i = 1; n < maxOut; ++i) {
|
||||
const int slot = Aura::Data::FindNthSlot(
|
||||
player, i, Aura::Data::Filter::Harmful, Aura::Data::CasterMode::Any);
|
||||
player, i, Aura::Data::Filter::Harmful, Aura::Data::Match{});
|
||||
if (slot < 0)
|
||||
break;
|
||||
const uint32_t spellID = Aura::Data::ReadSpellID(player, slot);
|
||||
|
||||
Reference in New Issue
Block a user