WoWInterface SVN DivinePleaReminder

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

DivinePleaReminder/DivinePleaReminder.lua
1,9 → 1,10
--[[
DivinePleaReminder v1.1, by sigmalmtd
DivinePleaReminder v1.2b, by sigmalmtd
A lightweight AddOn for Protection Paladins. Flashes the Divine Plea button when in combat and the buff is inactive.
]]--
 
DivinePleaReminder = LibStub("AceAddon-3.0"):NewAddon("DivinePleaReminder", "AceEvent-3.0")
local DIVINE_PLEA = GetSpellInfo(54428)
 
function DivinePleaReminder:OnInitialize()
self.buttons = {}
18,6 → 19,8
self:RegisterEvent("UNIT_AURA", "Update")
self:RegisterEvent("PLAYER_REGEN_DISABLED", "Update")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "Update")
self:RegisterEvent("UNIT_ENTERING_VEHICLE", "Update")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "Update")
-- Check all buttons
for slot = 1, 120 do
self:CheckButton(nil, slot)
31,6 → 34,8
self:UnregisterEvent("UNIT_AURA")
self:UnregisterEvent("PLAYER_REGEN_DISABLED")
self:UnregisterEvent("PLAYER_REGEN_ENABLED")
self:UnregisterEvent("UNIT_ENTERING_VEHICLE")
self:UnregisterEvent("UNIT_EXITED_VEHICLE")
-- Hide and free all textures
for idx, slot in pairs(self.buttons) do
UIFrameFlashStop(slot.texture)
46,7 → 51,7
function DivinePleaReminder:CheckButton(eventName, slot)
local slotType, spellId, spellSubType, parent, texture
slotType, spellId, spellSubType = GetActionInfo(slot)
if UnitInVehicle("player") == nil and slotType == "spell" and GetSpellName(spellId, spellSubType) == "Divine Plea" then
if not UnitInVehicle("player") and slotType == "spell" and GetSpellName(spellId, spellSubType) == DIVINE_PLEA then
if self.buttons[slot] then
-- Texture has already been created
self.buttons[slot].enabled = true
94,7 → 99,7
function DivinePleaReminder:Update()
local slot, show
-- Only show the highlight if we're in combat and don't have Divine Plea active
if not UnitAffectingCombat("player") or UnitAura("player", "Divine Plea") then
if not UnitAffectingCombat("player") or UnitAura("player", DIVINE_PLEA) or UnitInVehicle("player") then
show = false
else
show = true
DivinePleaReminder/DivinePleaReminder.toc
2,7 → 2,7
## Title: DivinePleaReminder
## Notes: A lightweight AddOn for Protection Paladins. Flashes the Divine Plea button when in combat and the buff is inactive.
## Author: sigmalmtd
## Version: 1.1
## Version: 1.2b
## X-Category: Paladin
 
embeds.xml
DivinePleaReminder/README.txt
1,5 → 1,5
 
DivinePleaReminder v1.1, by sigmalmtd (Nikolay on Azgalor)
DivinePleaReminder v1.2b, by sigmalmtd (Nikolay on Azgalor)
A lightweight AddOn for Protection Paladins. Flashes the Divine Plea button when in combat and the buff is inactive.
 
==================
37,5 → 37,6
CHANGELOG
==================
 
v1.2 - Localization
v1.1 - Fixed bug with vehicles
v1.0 - Initial Release