mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
turtle-wow: update Immolate duration after cast Conflagrate
This commit is contained in:
@@ -61,6 +61,15 @@ function libdebuff:GetDuration(effect, rank)
|
||||
end
|
||||
end
|
||||
|
||||
function libdebuff:UpdateDuration(unit, unitlevel, effect, duration)
|
||||
if not unit or not effect or not duration then return end
|
||||
unitlevel = unitlevel or 0
|
||||
|
||||
if libdebuff.objects[unit] and libdebuff.objects[unit][unitlevel] and libdebuff.objects[unit][unitlevel][effect] then
|
||||
libdebuff.objects[unit][unitlevel][effect].duration = duration
|
||||
end
|
||||
end
|
||||
|
||||
function libdebuff:GetMaxRank(effect)
|
||||
local max = 0
|
||||
for id in pairs(L["debuffs"][effect]) do
|
||||
|
||||
+17
-6
@@ -41,14 +41,13 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
|
||||
WorldMapFrameTitle:Hide()
|
||||
end
|
||||
|
||||
-- refresh paladin judgements on holy strike
|
||||
-- taken from: https://github.com/doorknob6/pfUI-turtle/blob/master/modules/debuffs.lua
|
||||
HookScript(libdebuff, "OnEvent", function()
|
||||
if event == "CHAT_MSG_SPELL_SELF_DAMAGE" then
|
||||
local spell = string.find(string.sub(arg1,6,17), "Holy Strike")
|
||||
|
||||
--arg2 is holy dmg when it hits, nil when it misses
|
||||
if spell and arg2 then
|
||||
-- refresh paladin judgements on holy strike
|
||||
-- taken from: https://github.com/doorknob6/pfUI-turtle/blob/master/modules/debuffs.lua
|
||||
local holystrike = string.find(string.sub(arg1,6,17), "Holy Strike")
|
||||
--arg2 is spell dmg when it hits, nil when it misses
|
||||
if holystrike and arg2 then
|
||||
for seal in L["judgements"] do
|
||||
local name = UnitName("target")
|
||||
local level = UnitLevel("target")
|
||||
@@ -64,6 +63,18 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- refresh Immolate duration after cast Conflagrate
|
||||
local conflagrate = string.find(string.sub(arg1,6,17), "Conflagrate")
|
||||
--arg2 is spell dmg when it hits, nil when it misses
|
||||
if conflagrate and arg2 then
|
||||
local name = UnitName("target")
|
||||
local level = UnitLevel("target")
|
||||
if libdebuff.objects[name][level]["Immolate"] then
|
||||
local duration = libdebuff.objects[name][level]["Immolate"].duration
|
||||
libdebuff:UpdateDuration(name, level, "Immolate", duration - 3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user