Commit bbefdb8
committed
fix(aura): include the player's pet in the PLAYER filter
Blizzard defines the token as "Include only auras that were cast by the
player, or by the player's pet or vehicle"
(AuraUtil.AuraFilters.Player). There are no vehicles here, so the caster
set is player + pet -- but all three comparisons tested
`casterGuid == PlayerGuid()` and nothing else.
A pet's cast carries the PET's guid in the Aura::Source cache, since
that is who SMSG_SPELL_GO names, so "HARMFUL|PLAYER" silently dropped
every aura the pet applied. `!PLAYER` had the mirror bug: it returned
the pet's auras as though a third party cast them.
Centralize on one IsPlayerOrPetCaster predicate rather than fixing each
site -- IsPlayerCast, GroupIsPlayerCast and CachedMatches had already
grown three separate copies of the comparison, which is how they would
drift again. The pet guid comes from VAR_PET_GUID, a live engine global,
so the predicate stays two compares with no object resolve; it runs per
aura slot. A caster of 0 (cache miss) still matches nothing.
Unrelated and untouched: the `isFromPlayerOrPlayerPet` aura field, which
means "applied by ANY player or a player's pet" and is answered from the
caster's HIGHGUID prefix.
Verified in-game: a Hunter pet's Scorpid Poison now returns from
C_UnitAuras.GetAuraDataByIndex("target", 1, "HARMFUL|PLAYER").1 parent 56d2dbb commit bbefdb8
4 files changed
Lines changed: 50 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18563 | 18563 | | |
18564 | 18564 | | |
18565 | 18565 | | |
18566 | | - | |
18567 | | - | |
18568 | | - | |
18569 | | - | |
18570 | | - | |
18571 | | - | |
| 18566 | + | |
| 18567 | + | |
| 18568 | + | |
| 18569 | + | |
18572 | 18570 | | |
18573 | 18571 | | |
18574 | 18572 | | |
| |||
18671 | 18669 | | |
18672 | 18670 | | |
18673 | 18671 | | |
18674 | | - | |
18675 | | - | |
18676 | | - | |
18677 | | - | |
| 18672 | + | |
| 18673 | + | |
| 18674 | + | |
| 18675 | + | |
18678 | 18676 | | |
18679 | 18677 | | |
18680 | 18678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
364 | 383 | | |
365 | 384 | | |
366 | 385 | | |
367 | 386 | | |
368 | | - | |
369 | | - | |
| 387 | + | |
| 388 | + | |
370 | 389 | | |
371 | 390 | | |
372 | 391 | | |
373 | | - | |
| 392 | + | |
| 393 | + | |
374 | 394 | | |
375 | 395 | | |
376 | 396 | | |
| |||
444 | 464 | | |
445 | 465 | | |
446 | 466 | | |
447 | | - | |
448 | | - | |
449 | | - | |
| 467 | + | |
| 468 | + | |
450 | 469 | | |
451 | 470 | | |
452 | 471 | | |
| |||
847 | 866 | | |
848 | 867 | | |
849 | 868 | | |
850 | | - | |
851 | | - | |
| 869 | + | |
852 | 870 | | |
853 | 871 | | |
854 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
154 | 157 | | |
155 | 158 | | |
156 | | - | |
157 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments