------------------------------------------------------------------------
r970 | jlam | 2013-07-13 21:04:14 +0000 (Sat, 13 Jul 2013) | 1 line
Changed paths:
   A /tags/5.3.6 (from /trunk:969)

Tagging as 5.3.6 release.
------------------------------------------------------------------------
r969 | jlam | 2013-07-13 20:58:59 +0000 (Sat, 13 Jul 2013) | 10 lines
Changed paths:
   M /trunk/Ovale.lua
   M /trunk/OvaleAura.lua
   M /trunk/OvaleData.lua
   M /trunk/OvaleFuture.lua
   M /trunk/OvaleState.lua

Fix ticket 256 - DebuffAttackPower not updating properly on refresh

Determining whether an aura needs a fresh snapshot requires some state to
be kept.  In this case, we track the most recent spell cast by the player
that preceded the aura being applied.  If that spell is one that doesn't
trigger a new snapshot of the aura, then don't snapshot; but snapshot
otherwise.

Currently doesn't deal with DoTs that are spread by other spells, e.g.,
Inferno Blast and Soul Swap.
------------------------------------------------------------------------
r968 | jlam | 2013-07-13 20:58:52 +0000 (Sat, 13 Jul 2013) | 7 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleFuture.lua
   M /trunk/OvalePaperDoll.lua
   M /trunk/OvaleState.lua

Fix ticket 259 - Snapshots not reliable for macro'ed abilities

Force OvalePaperDoll to update stats prior to a snapshot being taken if
the live stats are requested.

Also remove the explicit copy of damageMultiplier, which is now included
as a baseline player stat.
------------------------------------------------------------------------
r967 | jlam | 2013-07-13 20:58:45 +0000 (Sat, 13 Jul 2013) | 6 lines
Changed paths:
   M /trunk/OvalePaperDoll.lua

Fix ticket 258 - DamageMultiplier experiences delay before updating

UNIT_AURA fires before stat changes take effect, so we cannot hook a
handler to update the damage multiplier onto this event.  Hook into
UNIT_DAMAGE, which fires when a unit's melee damage changes and thus
happens when/after the stat change occurs.
------------------------------------------------------------------------
r966 | jlam | 2013-07-13 20:58:38 +0000 (Sat, 13 Jul 2013) | 6 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Fix ticket 257 - Please add a DebuffComboPoints function

Add a {Buff,Debuff}ComboPoints condition that takes the saved combo point
information from the target aura.

Also add some default values for various stats.
------------------------------------------------------------------------
r965 | jlam | 2013-07-13 20:58:30 +0000 (Sat, 13 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleCondition.lua

Fix documentation of renamed conditions.
------------------------------------------------------------------------
r964 | jlam | 2013-07-13 20:58:23 +0000 (Sat, 13 Jul 2013) | 4 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Fix ticket 255 - lua error in target.DebuffMeleeCritChance

Add default crit chance in case it's missing from the aura.  Make the
default non-zero in case it's used as a divisor in a calculation.
------------------------------------------------------------------------
r962 | jlam | 2013-07-12 07:44:40 +0000 (Fri, 12 Jul 2013) | 5 lines
Changed paths:
   M /trunk/Ovale.toc
   M /trunk/OvaleEquipement.lua
   M /trunk/OvalePaperDoll.lua

Fix weapon damage calculations.

Calculate the average weapon damage of the currently equipped weapon by
working backwards from the melee damage on the character sheet.  This
avoids problems with damage stats on upgraded weapons.
------------------------------------------------------------------------
r961 | jlam | 2013-07-12 07:44:30 +0000 (Fri, 12 Jul 2013) | 7 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleData.lua
   M /trunk/OvalePaperDoll.lua
   M /trunk/OvaleState.lua

Use Blizzard API to get the damage multiplier.

The damage multiplier numbers aren't accurate from just scanning buffs
because the tooltips aren't accurate.  For example, Savage Roar's tooltip
says 30% increase but it's actually 40% increase, and the Fluidity buff in
the Jin'Rohk encounter says 40% increase but in LFR it's actually 96%
increase.
------------------------------------------------------------------------
r960 | jlam | 2013-07-12 07:44:20 +0000 (Fri, 12 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleFuture.lua

Fix typos in variable name that caused memory leaks in OvaleFuture.
------------------------------------------------------------------------
r959 | jlam | 2013-07-12 07:44:11 +0000 (Fri, 12 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleCondition.lua

Set reasonable defaults for various player stats in case they are missing.
------------------------------------------------------------------------
r958 | jlam | 2013-07-12 07:44:04 +0000 (Fri, 12 Jul 2013) | 5 lines
Changed paths:
   M /trunk/OvaleFrame.lua

Fix ticket 166 - Option to add framestrata please

Set the Ovale frame strata to "MEDIUM", which is the same strata as
UIParent frame.  This should prevent Ovale from slipping behind UI
elements that depict the environment.
------------------------------------------------------------------------
r957 | jlam | 2013-07-12 07:43:55 +0000 (Fri, 12 Jul 2013) | 8 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Fix ticket 254 - InFlightToTarget

The InFlightToTarget script condition was not working due to an old
implementation bug from the MoP merge in 5.0.0 where it was ignoring the
spell ID parameter.

Fix this issue by putting parentheses in the proper places and reordering
for efficiency.
------------------------------------------------------------------------
r956 | jlam | 2013-07-12 07:43:47 +0000 (Fri, 12 Jul 2013) | 5 lines
Changed paths:
   M /trunk/OvaleFuture.lua

Fix ticket 252 - LastSpellSpellPower not working

This was a code logic error: the broken code only updated the information
if the previous information existed, so it never saved any information as
a result.
------------------------------------------------------------------------
r955 | jlam | 2013-07-12 07:43:40 +0000 (Fri, 12 Jul 2013) | 7 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Rename LastSpell<StatName> conditions to Last<StatName>.

This makes the names of those script conditions slightly easier to
remember and use (at least for me) and less awkward to type.

Also make CritChance a direct alias of SpellCritChance since that is how
it's implemented.
------------------------------------------------------------------------
r954 | jlam | 2013-07-12 07:43:34 +0000 (Fri, 12 Jul 2013) | 14 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Fix ticket 253 - Add an upper/lower limit to CritChance functions

Allow for an extra parameter "unlimited=1" that allows for the critical
strike chance returned by the following script conditions to exceed 100:

* BuffMeleeCritChance, DebuffMeleeCritChance
* BuffRangedCritChance, DebuffRangedCritChance
* BuffSpellCritChance, DebuffSpellCritChance
* CritChance, SpellCritChance
* MeleeCritChance
* RangedCritChance
* LastSpellMeleeCritChance
* LastSpellRangedCritChance
* LastSpellCritChance
------------------------------------------------------------------------
r953 | jlam | 2013-07-12 07:43:27 +0000 (Fri, 12 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleCondition.lua

Document additional implied script conditions.
------------------------------------------------------------------------
r952 | jlam | 2013-07-12 07:43:20 +0000 (Fri, 12 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvalePaperDoll.lua

Fix ticket 251 - crit functions don't update with Agi/Int changes.
------------------------------------------------------------------------
r950 | jlam | 2013-07-07 14:08:13 +0000 (Sun, 07 Jul 2013) | 3 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Fix error with LastSpellEstimatedDamage() script condition.

GetLastSpellInfo is part of OvaleFuture.
------------------------------------------------------------------------
r948 | jlam | 2013-07-07 04:43:58 +0000 (Sun, 07 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleData.lua

Fix ticket 249 - Nature's Vigil is a 10% buff instead of 20%.
------------------------------------------------------------------------
r947 | jlam | 2013-07-07 04:43:51 +0000 (Sun, 07 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleSwing.lua

Simplify check for whether player is dual-wielding.
------------------------------------------------------------------------
r946 | jlam | 2013-07-07 04:43:44 +0000 (Sun, 07 Jul 2013) | 7 lines
Changed paths:
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleData.lua

Add WeaponDamage(hand) script condition and use MH/OH damage in formulas.

The Damage() and LastSpellEstimatedDamage() script conditions now include
MH/OH weapon damage in their calculations as simple linear terms:

    bonusmainhand * MH_WEAPON_DAMAGE
    bonusoffhand * OH_WEAPON_DAMAGE
------------------------------------------------------------------------
r945 | jlam | 2013-07-07 04:43:37 +0000 (Sun, 07 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvalePaperDoll.lua

Snapshot weapon damage as a player stat.
------------------------------------------------------------------------
r944 | jlam | 2013-07-07 04:43:29 +0000 (Sun, 07 Jul 2013) | 1 line
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleFuture.lua
   M /trunk/OvalePaperDoll.lua
   M /trunk/OvaleState.lua

Snapshot a DoT's damage multiplier when it is applied or refreshed.
------------------------------------------------------------------------
r943 | jlam | 2013-07-07 04:43:22 +0000 (Sun, 07 Jul 2013) | 21 lines
Changed paths:
   M /trunk/OvaleCondition.lua

Add new script conditions.

The following two conditions allow for inspection of the player's current
stats:

    MeleeCritChance
    RangedCritChance

The following script conditions allow for examining the player's stats at
the time the given DoT was applied on the target.

    DebuffAttackPower
    DebuffSpellpower
    DebuffMeleeCritChance
    DebuffRangedCritChance
    DebuffSpellCritChance
    DebuffSpellHaste
    DebuffMastery

This information can be used to determine whether or not to overwrite an
existing DoT on the target.
------------------------------------------------------------------------
r942 | jlam | 2013-07-07 04:43:15 +0000 (Sun, 07 Jul 2013) | 8 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleState.lua

Adapt GetAura() to store results in a table passed to the method.

This affects the GetAura method in OvaleAura, OvaleState and
OvaleCondition.

This change allows for efficient lookup of any of the properties of the
aura found by GetAura if needed, while preserving the base information in
the return values for GetAura (start, ending, count, gain).
------------------------------------------------------------------------
r941 | jlam | 2013-07-07 04:43:08 +0000 (Sun, 07 Jul 2013) | 33 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleFuture.lua
   M /trunk/OvalePaperDoll.lua
   M /trunk/OvaleState.lua

Snapshot player stats when a spell is cast and when DoTs are applied.

The most recent successfully landed cast of a spell is saved in a table
indexed by target and spell ID, and contains all of the information for
that spellcast, including cast time and also a snapshot of the player
stats.

Player stats are snapshotted both at the start of a cast and when it is
sent to the server so that OvaleState can approximately know the player's
stats at the end an active spellcast.

Player stats are also snapshotted when a DoT is applied or refreshed.

Introduce a new generalized public method OvaleFuture:GetLastSpellInfo()
that returns information about the last successfully landed spell.  Remove
the following superseded methods:

	GetLastAttackPower
	GetLastComboPoints
	GetLastCritChance
	GetLastDamageMultiplier
	GetLastSpellpower

Change the following conditions to take a target since spellcast
information is also tracked by target:

	LastSpellAttackPower
	LastSpellComboPoints
	LastSpellCritChance
	LastSpellDamageMultiplier
	LastSpellEstimatedDamage
	LastSpellMastery
	LastSpellSpellpower
------------------------------------------------------------------------
r940 | jlam | 2013-07-07 04:43:01 +0000 (Sun, 07 Jul 2013) | 5 lines
Changed paths:
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleFuture.lua
   M /trunk/OvalePaperDoll.lua

Add OvalePaperDoll:SnapshotStats() method that snapshots player stats.

Change the internal representation of player stats by storing them in a
table whose members are the stat names, e.g., agility.  The table's
contents are directly copied into the table provided to SnapshotStats(t).
------------------------------------------------------------------------
r939 | jlam | 2013-07-07 04:42:54 +0000 (Sun, 07 Jul 2013) | 12 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleState.lua

Don't cheat and stash an extra "Magic/Disease/etc." aura.

Remove the workaround that stashed an extra aura whose spellId was the
debuff type of the aura.  This was to allow for implicit spell lists named
"Magic", "Poison", "Disease", and "Curse" that could be used where other
spell list names are used.

We now just check all of the auras on the target to see if there is one of
the named debuff type on the target.

As part of the cleanup, rename some "spellId" variable names to "auraID"
to reduce namespace collision.
------------------------------------------------------------------------
r938 | jlam | 2013-07-07 04:42:46 +0000 (Sun, 07 Jul 2013) | 14 lines
Changed paths:
   M /trunk/OvaleAura.lua
   M /trunk/OvaleCondition.lua
   M /trunk/OvaleState.lua

Extend tracking of auras cast by others to track all auras.

The assumption is that it's not possible for one caster to put more than
one aura of a given ID on a target, which should be true.

Change GetMyAuraOnAnyTarget to GetAuraOnAnyTarget, which allows for
specifying whether to check for only "my" auras or auras cast by anyone.
With the associated change to extend aura tracking above, the following
script conditions should provide more accurate answers:

    BuffCount, DebuffCount
    OtherBuffExpires, OtherDebuffExpires
    OtherBuffPresent, OtherDebuffPresent
    OtherBuffRemains, OtherDebuffRemains
------------------------------------------------------------------------
r936 | jlam | 2013-07-05 07:02:49 +0000 (Fri, 05 Jul 2013) | 14 lines
Changed paths:
   M /trunk/OvaleState.lua

Catch up with Eclipse changes in MoP.

- Eclipse energy is added at the end of the spellcast, not when the spell
  lands on its target.

- Similarly, the Eclipse buff state procs shortly after the final
  spellcast is complete, not after the final spell lands on its target.

- Handle spells like Starsurge that add energy in whatever direction we're
  already moving by allowing a new SpellInfo parameter "eclipsedir=1" to
  flag these types of spells.

- Handle Euphoria, which doubles the amount of Eclipse energy generated by
  spells when not in an Eclipse state.
------------------------------------------------------------------------
r935 | jlam | 2013-07-05 07:02:40 +0000 (Fri, 05 Jul 2013) | 6 lines
Changed paths:
   M /trunk/OvaleCompile.lua
   M /trunk/OvaleCondition.lua

Allow SpellInfo to specify a function to compute Damage().

A SpellInfo() declaration can include a "damage=FunctionName" parameter,
where FunctionName is an Ovale script function defined using AddFunction
that is used directly by the Damage() script condition to compute the
estimated damage of a spell.
------------------------------------------------------------------------
r934 | jlam | 2013-07-05 07:02:33 +0000 (Fri, 05 Jul 2013) | 17 lines
Changed paths:
   M /trunk/OvaleCompile.lua

Add list=<name> parameter to SpellInfo to add/create to the spell list.

This is an alternative way to create a spell list via SpellInfo as opposed
to listing them all directly in SpellList, i.e, these are equivalent:

    Define(buff1 12345)
      SpellInfo(buff1 list=trinket_proc_intellect)
    Define(buff2 54321)
      SpellInfo(buff2 list=trinket_proc_intellect)

and

    Define(buff1 12345)
    Define(buff2 54321)
    SpellList(trinket_proc_intellect buff1 buff2)

This makes it easier to incrementally append to a spell list definition.
------------------------------------------------------------------------
