From 8f0030b50988316e390461b3b0a9c2956d3fcfb2 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sun, 17 Oct 2010 09:12:54 +0000 Subject: [PATCH] added some development commands added targetlifepercentnocd option to SpellInfo for glyph of shadow word death bug fix: glyph commands did not work git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@289 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 2 +- Ovale.lua | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- defaut/Pretre.lua | 4 ++++ 3 files changed, 56 insertions(+), 2 deletions(-) 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