-
Notifications
You must be signed in to change notification settings - Fork 2
/
LevelingSummary.lua
40 lines (29 loc) · 1.13 KB
/
LevelingSummary.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local myname, ns = ...
function ns.IsFollowerLeveling(follower)
if not follower.isCollected then return false end
if not follower.isMaxLevel then return true end
if follower.quality < 4 then return true end
end
local list = GarrisonMissionFrame.MissionTab.MissionList
list.MaterialFrame:SetWidth(250)
local butt = CreateFrame("Frame", nil, list)
butt:SetSize(32, 32)
butt:SetPoint("RIGHT", list.MaterialFrame, "LEFT", -15, 0)
local icon = butt:CreateTexture(nil, "BORDER")
icon:SetAllPoints()
icon:SetTexture("Interface\\Icons\\Garr_currencyicon-xp")
icon:SetTexCoord(1/64, 63/64, 1/64, 63/64)
butt:SetScript("OnLeave", GameTooltip_Hide)
butt:SetScript("OnEnter", function(self)
local followers = C_Garrison.GetFollowers(LE_FOLLOWER_TYPE_GARRISON_6_0)
ns.RefreshInProgress(LE_FOLLOWER_TYPE_GARRISON_6_0)
GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT")
GameTooltip:AddLine("Followers currently leveling")
for i,follower in pairs(followers) do
if ns.IsFollowerLeveling(follower) then
local name, status = ns.FollowerToString(follower)
GameTooltip:AddDoubleLine(name, status, nil,nil,nil, 1,1,1)
end
end
GameTooltip:Show()
end)