Ovale Spell Priority 6.2.0
==========================

Changes from version 6.1.2:
---------------------------

-   Fix bug in how boolean values are typecast into values.

    As part of the typecast, the returned timespan needs to be adjusted to the
    appropriate timespan for a value, which is the universe.

-   Remove features that have been deprecated for more than 6 months.

-   Shaman: Don't use deprecated syntax in the restoration script.

-   Update localized strings from CurseForge app as of 2015-06-23.

-   Fix ast.t test.

-   Remove healer scripts that were generated from SimulationCraft profiles.

    These scripts were not accurate portrayals of raid healing and should not
    be the default scripts.

-   Regenerate scripts based on SimulationCraft profiles from release-620-01.

-   Set the default scripts to the scripts generated from Tier18M profiles.

-   Add more patch 6.2 spells to the class databases.

-   Druid: Rename Incarnation spells to match the SimC names.

-   Re-add local changes to SimulationCraft profiles for better scripts.

    Death Knight:

    - Interrupt with Mind Freeze if glyphed.

    Druid:

    - Don't obsessively refresh Bloodtalons pre-combat.

    Hunter:

    - Interrupt with Counter Shot.

    Mage:

    - Don't obsessively refresh Rune of Power pre-combat.
    - Ensure the Water Elemental is active during combat for frost mages.

    Monk:

    - Raid buff with Legacy of the White Tiger.
    - Interrupt with Spear Hand Strike
    - Use Nimble Brew to break snares and roots.

    Paladin:

    - Ensure Righteous Fury is off pre-combat.

    Priest:

    - Interrupt with Silence.

    Rogue:

    - Add "auto_attack" in the appropriate spots for white attacks.
    - Don't obsessively refresh Slice and Dice pre-combat for subtlety.

    Warlock:

    - Add Life Tap near the head of the APLs to ensure mana is properly
      regenerated. This is needed because Ovale doesn't take into account
      the mana cost of a spell.

    Warrior:

    - Raid buff using Commanding and Battle Shout.
    - Interrupt with Pummel.

-   Import Tier18M profiles from SimulationCraft release 620-01.

    Remove obsoleted Tier17M profiles and also healer profiles that should not
    really be used by Ovale.

-   Support language additions from SimulationCraft 620-01.

-   Warlock: Add Soul Swap to the spell database used in Tier18M profiles.

-   Add Tier-18 set item IDs and bonuses as of 2015-06-22 for patch 6.2.

-   Warrior changes from 6.2 PTR patch notes from 2015-06-02.

    - Tier-17 4-piece set bonus for Arms Warriors has been redesigned. It now
      reduces the cost of Mortal Strike by 5 Rage.

-   Shaman changes from 6.2 PTR patch notes from 2015-06-02.

    - Lava Surge now lasts for 10 seconds (up from 6 seconds).

-   Monk changes from 6.2 PTR patch notes from 2015-06-22.

    - Serenity now lasts 5 seconds for Brewmaster Monks (down from 10 seconds).

-   Mage changes from 6.2 PTR patch notes from 2015-06-02.

    - Tier-17 2-piece set bonus for Fire Mages has been redesigned. It now
      reduces the cooldown of Inferno Blast by 2 seconds.

-   Hunter changes from 6.2 PTR patch notes from 2015-06-02.

    - Add new Tranquilizing Shot and Glyph of Tranquilizing Shot effects.

-   Druid changes from 6.2 PTR patch notes from 2015-06-02.

    - Dream of Cenarius' effect can now be stored for up to 40s (up from 20s)
      for Guardian Druids.

-   Death Knight changes from 6.2 PTR patch notes from 2015-06-02.

    - Breath of Sindragosa now costs 20 Runic Power per second for Blood Death
      Knights.

    - Glyph of Icy Runes has been removed.

-   Add legendary ring item IDs.

-   Add item IDs for the tier 18 class trinkets from Archimonde in HFC.

-   Use Tier 18 Mythic profiles from SimulationCraft.

-   Bump the TOC interface to 60200 for patch 6.2.

-   Import latest release.sh from curseforge-packager project.

-   Reduce verbosity of trace log generated by OvaleBestAction.

-   Allow shift-right-click on the data broker to start a trace log.

-   OvaleTimeSpan now maintains its own table pool for time spans.

    OvaleTimeSpan implements its own simple table pool instead of using
    OvalePool so as to minimize dependencies and to make OvaleTimeSpan a more
    standalone module. This should allow for time spans to be used in more
    situations without having to worry about table ownership and also allows
    for maximal re-use of table memory.

    Remove the table pool for time spans from OvaleBestAction and update
    timespan.t to check the size of the table pool.

-   Shaman: Check for Unleash Life buff in case EoE talent is active.

-   Fix some nil table references.

-   Regenerate scripts based on SimulationCraft profiles from release-612-01.

-   Merge branch 'simulationcraft'.

    Pull in changes from SimulationCraft release-612-01.

-   Import Tier17M profiles from SimulationCraft tag "release-612-01".

-   Add some default values for health and maxHealth, just in case.

-   Short-circuit a search through the queued spellcasts in an edge case.

-   Suppress some debug warnings that are a little too verbose.

-   Teach SimulationCraft translator to check existing state before changing.

    Insert a check using GetState() to verify that the new state set by
    SetState() actually changes the state.  This ensures that a script is not
    spinning at the same SetState() once the state has changed.

-   Remove obsolete OvaleLatency module.

    The way that the OvaleLatency module tried to compute latency had stopped
    working quite a while ago after Blizzard implemented spell queues so that
    a player could queue the next spell before the previous one had finished
    casting.

-   Ovale_SpellFinished only tells "hit" or "miss", not "critical".

-   Move SendMessage() calls closer to the end of functions.

    AceEvent IPC messages aren't handled asynchronously, so sending a message
    means that listener's handlers for that message are invoked at that point.
    Move the SendMessage() call closer to the end of the function to ensure
    that all relevant state is set before listeners' handlers are invoked.

-   Fix some misspelled words.

-   Channelled spells finish when UNIT_SPELLCAST_CHANNEL_STOP is received.

-   Channelled spells seem to always have a line ID of zero in UNIT events.

-   Add the appropriate methods to OvalePaperDoll to save spellcast info.

    Avoid calling OvalePaperDoll:UpdateSnapshot() to save the spellcast
    information explicitly within OvaleFuture.

    Also just save the spellcast information upon successful spellcast.

-   Add Auto Attack as a white attack that should be ignored by OvaleFuture.

-   Rogue: Allow toggling Vanish suggestions for situational usage.

    This is only for assassnation and combat rogues because Vanish is a major
    DPS cooldown for subtlety rogues.

-   Clean-up: remove deprecated functions from OvaleGUID.

-   Create a dummy spellcast for the simulator if no actual spellcast is used.

    Extend the SaveSpellcastInfo() methods in the modules to take an optional
    "state" parameter so that those methods can save state information to the
    spellcast instead.

-   Call the correct method to save spellcast information.

-   Mage: Only enter any part of the burn phase is the checkbox is toggled on.

-   Fix priority so that units that don't receive UNIT_AURA events are lowest.

-   Warlock: Fix aura IDs for Dark Soul: Knowledge and Misery.

    Fix copy and paste error that resulted in incorrect spell IDs for
    "dark_soul_knowledge_buff" and "dark_soul_misery_buff".  The spell IDs for
    the spells are correct, but the auras were using the spell ID for Dark
    Soul: Instability.

    Fix from ticket 583 by @LunaEclipse.

-   Use OvaleHealth instead of ad-hoc code for health and TTD calculations.

-   Add OvaleHealth module to track the health of targets.

    OvaleHealth keeps track of health of mobs by GUID by listening for CLEU
    damage and heal events and has the following methods that mirror the
    Blizzard API:

        UnitHealth(unitId)
        UnitHealthMax(unitId)

    OvaleHealth also has a method to determine the "time to die" of a unit:

        UnitTimeToDie(unitId)

    Move code from OvaleAura that was noted as needing to move to an
    OvaleHealth module.

-   Regenerate scripts based on SimulationCraft profiles from 2015-04-08.

-   Merge branch 'simulationcraft'.

    Pull in changes from SimulationCraft git master from 2015-04-08.

-   Import Tier17M profiles from SimulationCraft git master from 2015-04-08.

-   Change that way that SimulationCraft states are translated into Ovale.

    Ovale now avoids pre-computing the state and just allows the running of
    the script to set the state.

-   Support SimulationCraft's "prev_off_gcd" operand.

    Translate into PreviousOffGCDSpell(), which returns true if the given
    spell matches the most recently cast off-GCD spell.

-   Cache both the most recent GCD and off-GCD spellcasts in OvaleFuture.

-   Save whether a spell triggers the GCD in the spellcast information.

-   Regenerate scripts based on SimulationCraft profiles from 2015-04-07.

-   Mage: Add function to compute damage of Pyroblast.

-   Allow function names to contains numbers when translating from APLs.

-   Warlock: Rename the "grimoire_<pet>" spells to "service_<pet>".

    This change makes the names used in Ovale scripts match the ones used by
    SimulationCraft in its APLs.

-   Remove unnecessary check for a known spell for SpellCooldown() condition.

    The script condition allows for passing a shared cooldown name for a
    collection of spells that share the same cooldown.  The check for a known
    spell ID was breaking this usage.

-   Return correct values for OvaleCooldown:GetSpellCooldown(sharedCd).

    The GetSpellCooldown() method was incorrectly skipping the setting of the
    return values in the case where the method parameter was a shared cooldown
    name.

-   Track the hunter Frenzy buff on the pet instead of the player.

-   Merge branch 'simulationcraft'.

    Pull in changes from SimulationCraft git master from 2015-04-07.

-   Import Tier17M profiles from SimulationCraft git master from 2015-04-07.

-   Re-add support for "tick_dmg" property to SImulationCraft "dot" operands.

-   Silently fix APL bugs: "target.target." --> "target."

-   Re-add support for SimulationCraft properties used by fire mage APLs.

    The following SimulationCraft action and character properties are
    supported once again:

        - crit_damage
        - crit_pct_current
        - hit_damage

    The Ovale script conditions Damage() and CritDamage() have been restored,
    but only allow for script functions to compute the damage.  The built-in
    formulas for calculating damage have been removed since they are simply
    not general enough to handle the few cases where scripts require this
    information.

-   Support SimulationCraft's "<state>_duration" mage operands.

-   Support SimulationCraft's "burn_phase" mage state operand.

-   Support for SimulationCraft's dancing_rune_weapon pet operands.

-   Support for SimulationCraft's "choose_target" mage action.

-   Death Knight: Add spell definitions for Chains of Ice.

-   Shaman: Move Earthquake back to the AoE icon.

    In patch 6.1.2 Earthquake is no longer worth casting in the single-target
    rotation.

-   Only interrupt using Mind Freeze in the APLs if not glyphed.

-   Merge branch 'simulationcraft'.

    Pull in changes from SimulationCraft git master from 2015-04-06.

-   Import Tier17M profiles from SimulationCraft git master from 2015-04-06.

    These are the profiles from the git master preceding the tagging of
    release-612-01.

-   Improve formatting of debugging messages in OvaleFuture.

-   Force a frame refresh if a trace is triggered.

-   Add more debugging to OvaleAura.

-   Hunter: Match aura ID of the Pre-Steady Focus buff in OvaleSteadyFocus.

    Fixes ticket 587 by @LunaEclipse.

-   Add state to OvaleSteadyFocus to properly handle the aura on spellcast.

-   Fix use of default values in state method AddAuraToGUID().

    If start or ending were nil parameters to the method, then the arithmetic
    used within the method to determine the aura's duration would fail due to
    arithmetic on nil values.

-   Rogue: Add subterfuge_buff definition.

    Fixes ticket 580 by @Wiljo.

-   Remove tracking code for most recent spell landed in OvaleFuture.

    This was only used to keep snapshot information for past spellcasts in
    order to query "last" stats, but those conditions and usage have been
    removed from scripts, since snapshots have largely been removed from the
    game except for certain persistent damage multipliers.

-   Adjust to changed API presented by OvaleFuture.

-   Rewrite OvaleFuture to more accurately track player and pet spellcasts.

    Begin tracking spellcasts from the moment that the spellcast is queued in
    the spell queue (UNIT_SPELLCAST_SENT) through successful spellcast
    (UNIT_SPELLCAST_SUCCEEDED) and a finishing event (CLEU) to note whether
    the spell hit or miss the target.

    Be much more accurate about the target of spellcasts.  When a spell is
    queued, a preliminary target is determined based on the name of the
    target, focus, and mouseover units.  The target of the spellcast is fixed
    up using CLEU events that reveal the GUID of the target of the spellcast.

    Fix the simulator state upon reset to properly set the information for any
    active spellcasts.

    Remove tracing of particular spells in favor of more consistent debugging
    statements to better show the flow of event processing.

-   Simplify code using new module method "GetMethod".

    Instead of explicit checks for self.method over module.method, just use
    "GetMethod" to return the function reference.

-   Add new mirrored method "GetMethod" that returns other mirrored methods.

-   Properly save the time of the snapshot of player's stats.

-   Add "DebugTimestamp" method to auto-add a GetTime() for debugging.

-   Mage: Move Arcane Power to the CD icon so it doesn't hide true short CDs.

-   Improvements to OvaleGUID module.

    - Remove a small memory leak.

    - Rename methods to match the names or to follow the naming pattern of the
      Blizzard API functions.

    - Allow methods to return multiple values if the result is a one to many
      mapping, e.g., GUID to unit IDs.

    - Raise an Ovale_PetChanged event with the GUID of the player's pet.

-   Add additional Lua files needed to properly run Ovale:OnEnable().

-   Don't hide global symbols with a local one of the same name in functions.

    This fixes a long-standing bug in the testing code where Ovale:OnEnable()
    wasn't being run before the OnEnable() methods of the modules.

-   Remove the "Update Interval" option.

    We always lazily update the best action for each icon based on events that
    trigger the need to update.

-   Remove unnecessary module dependency on OvaleGUID.

-   Consistently filter out white attacks from being tracked by OvaleFuture.

-   Use GUIDs instead of unit IDs in Ovale.refreshNeeded table.

    This avoids needing to map some GUIDs to unit IDs.

-   Use Ovale.playerGUID instead of calling UnitGUID() on PLAYER_LOGIN.

-   Use Ovale.playerClass instead of calling UnitClass() in each module.

-   Cache player GUID and class in main addon to be used within modules.

-   Use OvaleSpellBook:IsHarmfulSpell() to check if a spell is "offensive".

-   Pass target's GUID as an additional parameter to GetDamageMultiplier().

    This is needed to correctly check requirements for the given spell when
    cast on the target.

-   Consistently use GUIDs instead of unit IDs where possible in Ovale APIs.

    This avoids a lot of unnecessary translating back and forth between GUIDs
    and unit IDs.

-   Translate SimulationCraft's "enemies" operand.

-   Remove the "wait" statement from the Ovale language.

    It was too difficult to mix the imperative style of processing that "wait"
    used with the time-span comparison style of processing that Ovale uses
    otherwise within a single script.  Remove it to simplify the language.
    The "wait" statement can be replaced with appropriate conditionals (see
    OvaleSimulationCraft module for how it translates "wait").

-   Drop action priorities from the Ovale language.

    Only allow natural ordering of actions within groups instead of letting
    explicit priority settings override the group order.  This makes script
    code easier to understand.

-   Remove unnecessary ResetState() methods from OvaleCooldown and OvaleTotem.

    These modules uses a serial number (age) in each state table to track
    whether the information in the table is up to date, so out-of-date tables
    are implicitly invalidated by checking the table's age against the module's
    age when fetching the table.

-   Warrior: Suggest Charge & Heroic Leap only if the checkbox option is on.

    Allow the "not in melee range" toggle to gate the suggestions for Charge
    and Heroic Leap so they can be turned off manually by the player.  This is
    needed for certain fights where the mob is off the platform, e.g., Kromog,
    and the range-checking tools misbehave.

-   Compute "xor" using one fewer operation.

-   Fireball replaces Frostfire Bolt for fire mages in 6.1.

-   Import Tier17M profiles from SimulationCraft tag "release-610-06".
