WoWInterface SVN LFGStatusIcon

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 10 to Rev 11
    Reverse comparison

Rev 10 → Rev 11

LFGStatusIcon/core.lua
1,19 → 1,21
-- Thanks to Dridzt for the 5.0.4 update
 
local update, indicator = nil, nil
update = function()
local hasData, leaderNeeds, tankNeeds, healerNeeds, dpsNeeds, _, _, _, _, instanceSubType, _, _, _, _, _, myWait, queuedTime = GetLFGQueueStats()
if instanceSubType == LFG_SUBTYPEID_RAID then
local hasData, leaderNeeds, tankNeeds, healerNeeds, dpsNeeds, _, _, _, _, instanceSubType, _, _, _, _, _, myWait, queuedTime = GetLFGQueueStats(LE_LFG_CATEGORY_LFD)
if instanceSubType == LFG_SUBTYPEID_RAID or instanceSubType == LFG_SUBTYPEID_SCENARIO then
return
end
if not indicator then -- setup indicators
MiniMapLFGFrame.lfgindicators = CreateFrame("Frame", nil, MiniMapLFGFrame)
indicator = MiniMapLFGFrame.lfgindicators
QueueStatusMinimapButton.lfgindicators = CreateFrame("Frame", nil, QueueStatusMinimapButton)
indicator = QueueStatusMinimapButton.lfgindicators
local temp = 180 / math.pi / 5
for i = 1, 5, 1 do
local t = indicator:CreateTexture(nil, "OVERLAY")
t:SetTexture("Interface\\AddOns\\LFGStatusIcon\\indicator.tga")
t:SetWidth(5)
t:SetHeight(5)
t:SetPoint("CENTER", MiniMapLFGFrame, "CENTER", 11 * math.cos((i - 1) * temp - 0.32), 11 * math.sin((i - 1) * temp - 0.32))
t:SetPoint("CENTER", QueueStatusMinimapButton, "CENTER", 11 * math.cos((i - 1) * temp - 0.32), 11 * math.sin((i - 1) * temp - 0.32))
indicator[i] = t
end
end
71,10 → 73,14
end
end
 
hooksecurefunc("LFGSearchStatus_Update", update)
hooksecurefunc("LFG_UpdateFramesIfShown", update)
MiniMapLFGFrame:HookScript("OnShow", update)
if MiniMapLFGFrame:IsShown() then
hooksecurefunc("QueueStatusEntry_SetUpLFG", update)
QueueStatusMinimapButton:HookScript("OnShow", update)
if QueueStatusMinimapButton:IsShown() then
update()
end
 
--[[
MoP changes
MiniMapLFGFrame -> QueueStatusMinimapButton
LFGSearchStatus_Update -> QueueStatusEntry_SetUpLFG
LFG_UpdateFramesIfShown -> 'nothing' (the events end up calling QueueStatusEntry_SetUpLFG)
]]
\ No newline at end of file
LFGStatusIcon/LFGStatusIcon.toc
1,9 → 1,9
## Interface: 40300
## Interface: 50001
## Title: LFGStatusIcon
## Notes: Adds queue status indicators to LFG minimap icon
## Author: TotalPackage
## X-Category: Interface Enhancements
## Version: 4.3.001
## Version: 5.0.001
 
## LoadManagers: AddonLoader
## X-LoadOn-Always: delayed