Permalink
Browse files

adding known option for IBUFF and IDEBUFF

  • Loading branch information...
ildyria committed Nov 10, 2012
1 parent adcd393 commit d092e040143146a551b6821b6a9b199a4b98e9db
@@ -505,7 +505,7 @@ function iFilger:OnEvent(event, unit)
self.updatetimes[i] = {data = data, name = name, icon = icon, count = count, start = start, duration = duration, spid = spid, triggerwhen = triggerwhen}
found = false
end
- elseif data.filter == "IBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) then
+ elseif data.filter == "IBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) and (not data.known or IsPlayerSpell(data.known)) then
local spn
spn, _, icon = GetSpellInfo(data.spellID)
name = iFilger:UnitBuff(data.unitId, data.spellID, spn, data.absID)
@@ -517,7 +517,7 @@ function iFilger:OnEvent(event, unit)
name = spn
spid = data.spellID
end
- elseif data.filter == "IDEBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) then
+ elseif data.filter == "IDEBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) and (not data.known or IsPlayerSpell(data.known)) then
local spn
spn, _, icon = GetSpellInfo(data.spellID)
name = iFilger:UnitDebuff(data.unitId, data.spellID, spn, data.absID)
View
@@ -519,7 +519,7 @@ function iFilger:OnEvent(event, unit)
self.updatetimes[i] = {data = data, name = name, icon = icon, count = count, start = start, duration = duration, spid = spid, triggerwhen = triggerwhen}
found = false
end
- elseif data.filter == "IBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) then
+ elseif data.filter == "IBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) and (not data.known or IsPlayerSpell(data.known)) then
local spn
spn, _, icon = GetSpellInfo(data.spellID)
name = iFilger:UnitBuff(data.unitId, data.spellID, spn, data.absID)
@@ -531,7 +531,7 @@ function iFilger:OnEvent(event, unit)
name = spn
spid = data.spellID
end
- elseif data.filter == "IDEBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) then
+ elseif data.filter == "IDEBUFF" and (not data.incombat or InCombatLockdown()) and (not data.spec or data.spec == ptt) and (not data.known or IsPlayerSpell(data.known)) then
local spn
spn, _, icon = GetSpellInfo(data.spellID)
name = iFilger:UnitDebuff(data.unitId, data.spellID, spn, data.absID)
@@ -474,7 +474,9 @@ C["Filger_Spells"] = {
setPoint = { "BOTTOM", "iFilgerMageInvertAura", 0, 22 },
-- Rune of Power
- -- { spellID = 116014, unitId = "player", caster = "player", filter = "IBUFF" },
+ { spellID = 116014, unitId = "player", caster = "player", filter = "IBUFF", known = 116011 },
+ -- Invoker's Energy
+ { spellID = 116257, unitId = "player", caster = "player", filter = "IBUFF", known = 114003 },
-- Pyromaniac (fire damage increased by 10%, applyied by bomb)
{ spellID = 132210, unitId = "target", caster = "player", filter = "IDEBUFF", incombat = true, spec = 2 },
-- Frost Bomb
@@ -161,6 +161,10 @@ local help = {
["incombat"] = {
L["H_incombat"], --"Only show while in combat"
},
+ ["known"] = {
+ L["H_known1"], -- "Only show if the SpellID is known by the player."
+ L["H_known2"], -- "|cffff0000/!\\ YOU HAVE TO BE SURE OF THE SPELLID|r"
+ },
["spec"] = {
L["H_spec"], --"Only show while in that spec : (|cffffffff1|r |cffffffff2|r |cffffffff3|r or |cffffffff4|r)"
},
@@ -611,11 +615,12 @@ create_spell_option("unitId","string",75) -- player / target / focus / pet / tar
create_spell_option("caster","string",100) -- player / all
create_spell_option("absID","boolean",125) -- true / false
create_spell_option("incombat","boolean",150) -- true / false
-create_spell_option("spec","number",175) -- 1 2 3 4
-create_spell_option("trigger","string",200) -- BUFF / DEBUFF trigger for ICD
-create_spell_option("duration","number",225) -- duration of ICD
-create_spell_option("timeleft","number",250) -- timeleft
-create_spell_option("icon","string",275) -- icon
+create_spell_option("known","number",175) -- true / false
+create_spell_option("spec","number",200) -- 1 2 3 4
+create_spell_option("trigger","string",225) -- BUFF / DEBUFF trigger for ICD
+create_spell_option("duration","number",250) -- duration of ICD
+create_spell_option("timeleft","number",275) -- timeleft
+create_spell_option("icon","string",300) -- icon
-- /!\ ACD require caster = "all"
spelloptions["action"] = "ADD"
@@ -683,6 +688,7 @@ local function LoadSpell(indicetab,i)
spelloptions["caster"].editbox:SetText(data.caster or "") -- set caster
spelloptions["spec"].editbox:SetText(data.spec or "") -- set spec
spelloptions["trigger"].editbox:SetText(data.trigger or "") -- set trigger
+ spelloptions["known"].editbox:SetText(data.known or "") -- set known
spelloptions["duration"].editbox:SetText(data.duration or "") -- set duration
spelloptions["timeleft"].editbox:SetText(data.timeleft or "") -- set timeleft
if data.absID then -- set absID
@@ -724,6 +730,7 @@ local function LoadSpell(indicetab,i)
spelloptions["unitId"].value = data.unitId -- set unitId
spelloptions["caster"].value = data.caster -- set caster
spelloptions["spec"].value = data.spec -- set spec
+ spelloptions["known"].value = data.known -- set known
spelloptions["trigger"].value = data.trigger -- set trigger
spelloptions["duration"].value = data.duration -- set duration
spelloptions["timeleft"].value = data.timeleft -- set timeleft
@@ -751,6 +758,7 @@ local function SaveSpell()
aura.spec = tonumber(spelloptions["spec"].editbox:GetText())
aura.trigger = tostring(spelloptions["trigger"].editbox:GetText())
aura.duration = tonumber(spelloptions["duration"].editbox:GetText())
+ aura.known = tonumber(spelloptions["known"].editbox:GetText())
aura.timeleft = tonumber(spelloptions["timeleft"].editbox:GetText())
aura.absID = spelloptions["absID"].button:GetChecked() and true or false
aura.incombat = spelloptions["incombat"].button:GetChecked() and true or false
@@ -795,10 +803,18 @@ local function SaveSpell()
aura.timeleft = nil
end
+ if aura.filter ~= "IDEBUFF" and aura.filter ~= "IBUFF" then
+ aura.known = nil
+ end
+
if type(aura.spec) ~= "number" or aura.spec < 1 or aura.spec > 4 then
aura.spec = nil
end
+ if type(aura.known) ~= "number" then
+ aura.known = nil
+ end
+
if type(aura.timeleft) ~= "number" or aura.timeleft < 1 then
aura.timeleft = nil
end
@@ -34,6 +34,7 @@ L["unitId"] = "Unit Id"
L["caster"] = "Caster"
L["absID"] = "Absolute ID"
L["incombat"] = "In combat"
+L["known"] = "Spell known"
L["spec"] = "Spec"
L["trigger"] = "Trigger for ICD"
L["duration"] = "Duration for ICD"
@@ -89,7 +90,9 @@ L["H_unitId6"] = "|cfffffffftargettarget|r"
L["H_unitId7"] = "|cffffffffparty1|r ..."
L["H_unitId8"] = "|cffffffffarena1|r ..."
L["H_caster"] = "|cffffffffplayer|r or |cffffffffall|r - only cast by you or everyone"
-L["H_absID"] = "Only show if the Sepll ID is exactly the same"
+L["H_absID"] = "Only show if the Spell ID is exactly the same"
+L["H_known1"] = "Only show if the SpellID is known by the player."
+L["H_known2"] = "|cffff0000/!\\ YOU HAVE TO BE SURE OF THE SPELLID|r"
L["H_incombat"] = "Only show while in combat"
L["H_spec"] = "Only show while in that spec (|cffffffff1|r |cffffffff2|r |cffffffff3|r or |cffffffff4|r)"
L["H_trigger1"] = "Trigger for ICD :"

0 comments on commit d092e04

Please sign in to comment.