From 166a0196280788c29be18b66c7c683774f589b36 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 11 May 2014 08:10:49 +0000 Subject: [PATCH] Improve Bandit's Guile tracking in rogue scripts. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1422 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBanditsGuile.lua | 9 +++++++-- scripts/ovale_rogue_spells.lua | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/OvaleBanditsGuile.lua b/OvaleBanditsGuile.lua index 555ea69..6c63a28 100644 --- a/OvaleBanditsGuile.lua +++ b/OvaleBanditsGuile.lua @@ -38,6 +38,7 @@ Ovale.OvaleBanditsGuile = OvaleBanditsGuile -- -- Forward declarations for module dependencies. local OvaleAura = nil +local OvaleSpellBook = nil local API_GetTime = GetTime local API_UnitClass = UnitClass @@ -52,6 +53,8 @@ local self_guid = nil local SHALLOW_INSIGHT = 84745 local MODERATE_INSIGHT = 84746 local DEEP_INSIGHT = 84747 +-- Bandit's Guile spell ID. +local BANDITS_GUILE = 84654 -- Spell IDs for abilities that proc Bandit's Guile. local BANDITS_GUILE_ATTACK = { [ 1752] = "Sinister Strike", @@ -62,7 +65,7 @@ local BANDITS_GUILE_ATTACK = { -- OvaleBanditsGuile.name = "Bandit's Guile" -- Bandit's Guile spell ID from spellbook; re-used as the aura ID of the hidden, stacking buff. -OvaleBanditsGuile.spellId = 84654 +OvaleBanditsGuile.spellId = BANDITS_GUILE OvaleBanditsGuile.start = 0 OvaleBanditsGuile.ending = math.huge OvaleBanditsGuile.duration = 15 @@ -73,6 +76,7 @@ OvaleBanditsGuile.stacks = 0 function OvaleBanditsGuile:OnInitialize() -- Resolve module dependencies. OvaleAura = Ovale.OvaleAura + OvaleSpellBook = Ovale.OvaleSpellBook end function OvaleBanditsGuile:OnEnable() @@ -89,7 +93,8 @@ function OvaleBanditsGuile:OnDisable() end function OvaleBanditsGuile:Ovale_SpecializationChanged(event, specialization, previousSpecialization) - if specialization == "combat" then + -- This misses the corner case of if you're leveling and just acquire the spell. + if specialization == "combat" and OvaleSpellBook:IsKnownSpell(BANDITS_GUILE) then self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self:RegisterMessage("Ovale_AuraAdded") self:RegisterMessage("Ovale_AuraChanged") diff --git a/scripts/ovale_rogue_spells.lua b/scripts/ovale_rogue_spells.lua index b459c4e..e9c5534 100644 --- a/scripts/ovale_rogue_spells.lua +++ b/scripts/ovale_rogue_spells.lua @@ -30,8 +30,9 @@ Define(backstab 53) SpellInfo(backstab buff_combo=shadow_blades_buff if_spell=shadow_blades) SpellInfo(backstab buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4) SpellInfo(backstab buff_energy_less75=stealth_buff if_spell=shadow_focus) -Define(bandits_guile_buff 84654) - SpellInfo(bandits_guile_buff duration=15) +Define(bandits_guile 84654) +Define(bandits_guile_buff 84654) # OvaleBanditsGuile + SpellInfo(bandits_guile_buff duration=15 maxstacks=12) Define(blade_flurry 13877) SpellInfo(blade_flurry cd=10) Define(blade_flurry_buff 13877) @@ -158,6 +159,7 @@ Define(revealing_strike 84617) SpellInfo(revealing_strike buff_combo=shadow_blades_buff if_spell=shadow_blades) SpellInfo(revealing_strike buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4) SpellInfo(revealing_strike buff_energy_less75=stealth_buff if_spell=shadow_focus) + SpellAddBuff(revealing_strike bandits_guile_buff=1 if_spell=bandits_guile) SpellAddTargetDebuff(revealing_strike revealing_strike_debuff=1) Define(revealing_strike_debuff 84617) SpellInfo(revealing_strike_debuff duration=24 tick=3) @@ -195,6 +197,7 @@ Define(sinister_strike 1752) SpellInfo(sinister_strike buff_combo=shadow_blades_buff if_spell=shadow_blades) SpellInfo(sinister_strike buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4) SpellInfo(sinister_strike buff_energy_less75=stealth_buff if_spell=shadow_focus) + SpellAddBuff(sinister_strike bandits_guile_buff=1 if_spell=bandits_guile) Define(sleight_of_hand_buff 145211) SpellInfo(sleight_of_hand_buff duration=10) Define(slice_and_dice 5171) -- 1.7.9.5