diff --git a/Condition.lua b/Condition.lua
index c48c01e..8c06829 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -529,7 +529,7 @@ Ovale.conditions=
Glyph = function(condition)
local present = false
for i = 1, GetNumGlyphSockets() do
- local enalbled, glypType, glyphSpellID = GetGlyphSocketInfo(i)
+ local enabled, glypType, glyphTooltipIndex, glyphSpellID = GetGlyphSocketInfo(i)
if (glyphSpellID == condition[1]) then
present = true
break
diff --git a/Ovale.lua b/Ovale.lua
index 039ea0f..e92c872 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -333,6 +333,7 @@ local options =
},
debug =
{
+ order = -3,
name = "Debug",
type = "execute",
func = function()
@@ -342,13 +343,46 @@ local options =
},
talent =
{
- name = "Talent",
+ order = -4,
+ name = "List talent id",
type = "execute",
func = function()
for k,v in pairs(Ovale.talentNameToId) do
Ovale:Print(k.."="..v)
end
end
+ },
+ targetbuff =
+ {
+ order = -5,
+ name = "List target buff and debuff spell id",
+ type = "execute",
+ func = function()
+ Ovale:DebugListAura("target", "HELPFUL")
+ Ovale:DebugListAura("target", "HARMFUL")
+ end
+ },
+ buff =
+ {
+ order = -6,
+ name = "List player buff and debuff spell id",
+ type = "execute",
+ func = function()
+ Ovale:DebugListAura("player", "HELPFUL")
+ Ovale:DebugListAura("player", "HARMFUL")
+ end
+ },
+ glyph =
+ {
+ order = -7,
+ name = "List player glyphs",
+ type = "execute",
+ func = function()
+ for i=1,GetNumGlyphs() do
+ local name, level, enabled, texture, spellId = GetGlyphInfo(i)
+ if spellId then Ovale:Print(name..": "..spellId.." ("..tostring(enabled)..")") end
+ end
+ end
}
}
}
@@ -367,6 +401,17 @@ function Ovale:Debug()
self:Print(self:DebugNode(self.masterNodes[1]))
end
+function Ovale:DebugListAura(target, filter)
+ local i = 1
+ while true do
+ local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura(target, i, filter)
+ if not name then
+ break
+ end
+ Ovale:Print(name..": "..spellId)
+ end
+end
+
function Ovale:OnInitialize()
self.AceConfig = LibStub("AceConfig-3.0");
self.AceConfigDialog = LibStub("AceConfigDialog-3.0");
@@ -1118,6 +1163,11 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
cd.duration = 0
end
end
+ if newSpellInfo.targetlifepercentnocd and not nocd then
+ if UnitHealth("target")/UnitHealthMax("target")*100<newSpellInfo.targetlifepercentnocd then
+ cd.duration = 0
+ end
+ end
cd.enable = 1
if newSpellInfo.toggle then
cd.toggled = 1
diff --git a/defaut/Pretre.lua b/defaut/Pretre.lua
index 0782e7b..6850cfb 100644
--- a/defaut/Pretre.lua
+++ b/defaut/Pretre.lua
@@ -45,11 +45,15 @@ Define(MS 73510) # Mind Spike
SpellAddBuff(MS MSEFFECT=12 MM=6)
Define(SWD 32379) # Shadow Word : Death
+ SpellInfo(SWD cd=10)
+ SpellInfo(SWD targetlifepercentnocd=25 glyph=GLYPHSHADOWWORDDEATH)
Define(ARCHANGEL 87151) #Archangel
SpellInfo(ARCHANGEL cd=90)
SpellAddBuff(ARCHANGEL DA=18)
+Define(GLYPHSHADOWWORDDEATH 55682)
+
### end defines ###
ScoreSpells(MB SWP VT DP MF SWD MS)