Skip to content

Commit

Permalink
Add ResurrectionIcon indictor
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
nebularg committed Nov 13, 2019
1 parent 90ec7dd commit 31c5f40
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Modules/ResurrectionIcon/ResurrectionIcon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

local PitBull4 = _G.PitBull4
local L = PitBull4.L

local PitBull4_ResurrectionIcon = PitBull4:NewModule("ResurrectionIcon", "AceEvent-3.0")

PitBull4_ResurrectionIcon:SetModuleType("indicator")
PitBull4_ResurrectionIcon:SetName(L["Resurrection icon"])
PitBull4_ResurrectionIcon:SetDescription(L["Show an icon if there is an incoming or pending resurrection."])
PitBull4_ResurrectionIcon:SetDefaults({
attach_to = "root",
location = "in_center",
size = 2,
position = 1,
})

function PitBull4_ResurrectionIcon:OnEnable()
self:RegisterEvent("INCOMING_RESURRECT_CHANGED", "UpdateAll")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateAll")
end


function PitBull4_ResurrectionIcon:GetTexture(frame)
local unit = frame.unit
if not unit or not UnitHasIncomingResurrection(unit) then
return nil
end

return [[Interface\RaidFrame\Raid-Icon-Rez]]
end

function PitBull4_ResurrectionIcon:GetExampleTexture(frame)
return [[Interface\RaidFrame\Raid-Icon-Rez]]
end
6 changes: 6 additions & 0 deletions Modules/ResurrectionIcon/load.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<Script file="ResurrectionIcon.lua"/>

</Ui>
1 change: 1 addition & 0 deletions modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Include file="Modules\ReadyCheckIcon\load.xml"/>
<Include file="Modules\ReputationBar\load.xml"/>
<Include file="Modules\RestIcon\load.xml"/>
<Include file="Modules\ResurrectionIcon\load.xml"/>
<Include file="Modules\Sounds\load.xml"/>
<Include file="Modules\ThreatBar\load.xml"/>
<Include file="Modules\Totems\load.xml"/>
Expand Down

0 comments on commit 31c5f40

Please sign in to comment.