Fix ticket #196 - DebuffPresent(Magic) wrong with Pally buffs
Fix ticket #196 - DebuffPresent(Magic) wrong with Pally buffs
The problem was caused by the Buff*() and Debuff*() conditions being
aliases for each other that actually just checked every aura on a target,
regardless of whether it was a buff or a debuff, e.g., the following two
conditions returned the same result:
DebuffPresent(Magic)
BuffPresent(Magic)
This made it impossible to do something like the following if the player
had any dispellable raid buffs:
if DebuffPresent(Magic) Spell(cleanse)
Fix this by splitting out the buffs and debuffs per unit into separate
lists in OvaleAura and OvaleState, and teaching all of the methods that
manipulate or reference the aura tables to take an additional ``filter''
argument that can be ``HELPFUL'' (buff), ``HARMFUL'' (debuff) or nil
(either).
Introduce a new condition parameter ``filter''. The ``filter'' parameter
is used to narrow down the auras that Ovale inspects to check a condition.
If specified, its valid values are ``buff'', ``debuff'' or ``any'',
defaulting to ``any''.
The Buff*() and Debuff*() conditions implicitly set the filter to ``buff''
or ``debuff'', respectively.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@802 d5049fe3-3747-40f7-a4b5-f36d6801af5f