WoWInterface SVN Blessed

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 15 to Rev 16
    Reverse comparison

Rev 15 → Rev 16

trunk/Blessed/Blessed.lua
35,6 → 35,10
enabled = true,
duration = 300,
},
[31842] = { -- Divine Favor
enabled = false,
duration = 20,
},
[54428] = { -- Divine Plea
enabled = true,
duration = 9,
47,6 → 51,10
enabled = true,
duration = 10,
},
[31821] = { -- Aura Mastery
enabled = false,
duration = 6,
},
[84963] = { -- Inquisition
enabled = true,
duration = 12,
67,6 → 75,10
enabled = true,
duration = 15,
},
[105742] = { -- Saint's Vigor
enabled = false,
duration = 15,
},
}
}
local db
162,6 → 174,13
self:RestoreDefaultSpells()
end
 
-- If new spells have been added, add them to our savedvars
for k,v in pairs(defaults.spells) do
if not db.spells[k] then
db.spells[k] = v
end
end
 
-- Force lock on login
if not db.locked then db.locked = true end
 
203,24 → 222,36
 
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, ...)