|
self:RegisterEvent("CHARACTER_POINTS_CHANGED") |
self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") |
self:RegisterEvent("GLYPH_ADDED") |
end |
|
-- Check talents for updates (Hand of Freedom) |
function Blessed:UpdateDurations() |
if not db.spells[1044] or not db.spells[1044].enabled then return end |
|
-- Hand of Freedom |
local rank, maxRank = select(5, GetTalentInfo(3, 4)) |
if rank == maxRank then |
db.spells[1044].duration = 10 |
else |
db.spells[1044].duration = 6 |
end |
|
-- Divine Favor |
local timer = 20 |
for i=1, NUM_GLYPH_SLOTS do |
local glyph = select(4, GetGlyphSocketInfo(i, nil)) |
if glyph == 54937 then timer = 30 end |
end |
db.spells[31842].duration = timer |
|
self:UnregisterEvent("PLAYER_ALIVE") |
end |
|
-- Perform checks for all these events |
Blessed.CHARACTER_POINTS_CHANGED = Blessed.UpdateDurations |
Blessed.ACTIVE_TALENT_GROUP_CHANGED = Blessed.UpdateDurations |
Blessed.GLYPH_ADDED = Blessed.UpdateDurations |
|
-- Handle stuff, plx |
function Blessed:COMBAT_LOG_EVENT_UNFILTERED(timestamp, combatEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlagsTwo, destGUID, destName, destFlags, destFlagsTwo, spellID, ...) |