Mercurial > wow > buffalo2
comparison Modules/LFGFrame.lua @ 138:6e2f20230190 tip
- 8.1 TOC
- disabled Currency and WorldState modules for lack of use
- BoD progress link buttons for group finder
author | Nenue |
---|---|
date | Fri, 22 Feb 2019 17:34:58 -0500 |
parents | 414e37af1b1b |
children |
comparison
equal
deleted
inserted
replaced
137:dee5dd232bcb | 138:6e2f20230190 |
---|---|
78 local overlaps = { | 78 local overlaps = { |
79 [11781] = 11875, | 79 [11781] = 11875, |
80 [12002] = 12111, | 80 [12002] = 12111, |
81 } | 81 } |
82 local cheevos = { | 82 local cheevos = { |
83 -- Mythic Prog | 83 |
84 { | 84 -- mythic prog |
85 -- Antorus | 85 { |
86 12002, -- argus | 86 13314, -- Mythic: Lady Jaina Proudmoore |
87 12001, -- aggramar | 87 13313, -- Mythic: Stormwall Blockade |
88 12000, -- coven | 88 13312, -- Mythic: Mekkatorque |
89 11999, -- barry | 89 13311, -- Mythic: King Rastakhan |
90 11998, -- kin'garoth | 90 13300, -- Mythic: Conclave of the Chosen |
91 11997, -- imonar | 91 13299, -- Mythic: Opulence |
92 11996, -- eonar | 92 13298, -- Mythic: Jadefire Masters (Alliance Only) |
93 11995, -- portal keeper | 93 13295, -- Mythic: Jadefire Masters (Horde Only) |
94 11994, -- high command | 94 13293, -- Mythic: Grong |
95 11993, -- doggos | 95 13292, -- Mythic: Champion of the Light |
96 11992, -- worldbreaker | 96 |
97 | 97 12533, -- Mythic: Ghuun |
98 -- Tomb of Sargeras | 98 12532, -- Mythic: Mythrax |
99 11781, -- kj | 99 12531, -- Mythic: Zul |
100 11780, -- avatar | 100 12530, -- Mythic: Fetid Devourer |
101 11779, -- maiden | 101 12529, -- |
102 11776, -- mistress | 102 12527, |
103 11778, -- host, | 103 12526, |
104 11777, -- sisters | 104 12524, |
105 11775, -- harjatan, | 105 |
106 11774, -- di, | |
107 11773, -- goroth | |
108 }, | 106 }, |
109 -- Completion | 107 -- Completion BfA |
108 { | |
109 13323, -- Cutting Edge: Lady Jaina Proudmoore, | |
110 13322, -- Ahead of the Curve: Lady Jaina Proudmoore, | |
111 12535, -- Cutting Edge: Ghuun, | |
112 12536, -- Ahead of the Curve: Ghuun, | |
113 | |
114 } | |
115 | |
116 , | |
117 -- Completion Legion | |
110 { | 118 { |
111 12111, -- CE Argus, | 119 12111, -- CE Argus, |
112 12110, -- AotC Argus, | |
113 11875, -- CE KJ | 120 11875, -- CE KJ |
114 11874, -- AotC KJ | |
115 11790 -- Deceiver's Fall, | 121 11790 -- Deceiver's Fall, |
116 | 122 |
117 | 123 |
118 }, | 124 }, |
119 -- Mythic+ | 125 -- Mythic+ |
120 { | 126 { |
121 11162, -- master | 127 13080, -- BfA Keystone Master 1 |
122 11185, -- conqueror | |
123 } | 128 } |
124 } | 129 } |
125 | 130 |
126 local invasion = {} | 131 local invasion = {} |
127 local cheev = {} | 132 local cheev = {} |
158 local numBlocks = 0 | 163 local numBlocks = 0 |
159 if self.AchievementsDirty or forced then | 164 if self.AchievementsDirty or forced then |
160 numBlocks = self:UpdateAchievementLinks(numBlocks) | 165 numBlocks = self:UpdateAchievementLinks(numBlocks) |
161 end | 166 end |
162 | 167 |
163 if self.InvasionsDirty or forced then | |
164 numBlocks = self:UpdateInvasionButtons(numBlocks) | |
165 end | |
166 | 168 |
167 local lastBlock | 169 local lastBlock |
168 local contentsHeight = 0 | 170 local contentsHeight = 0 |
169 for index, block in ipairs(self.blocks) do | 171 for index, block in ipairs(self.blocks) do |
170 if index > numBlocks then | 172 if index > numBlocks then |
196 self.blocks[index] = block | 198 self.blocks[index] = block |
197 end | 199 end |
198 return block | 200 return block |
199 end | 201 end |
200 | 202 |
201 function module:UpdateInvasionButtons(offset) | |
202 print('UpdateInvasionButtons()') | |
203 offset = offset or 0 | |
204 local lastBlock = self.lastAchievement | |
205 | |
206 local contentsHeight = 0 | |
207 local areaPOIs = C_WorldMap.GetAreaPOIForMap(GetCurrentMapAreaID(), 1); | |
208 if areaPOIs then | |
209 | |
210 | |
211 for i, areaPoiID in ipairs(areaPOIs) do | |
212 local poiInfo = C_WorldMap.GetAreaPOIInfo(GetCurrentMapAreaID(), areaPoiID, 1); | |
213 | |
214 offset = offset + 1 | |
215 --print(index) | |
216 local block = self:GetBlock(offset) | |
217 block:SetScript('OnClick', invasion.OnClick) | |
218 block.Label:SetText(poiInfo.description) | |
219 block.Icon:SetAtlas(poiInfo.atlasName) | |
220 block.searchText = poiInfo.description | |
221 block.buttonType = 'group-poi' | |
222 end | |
223 end | |
224 return offset, contentsHeight | |
225 end | |
226 | |
227 function module:UpdateAchievementLinks(offset) | 203 function module:UpdateAchievementLinks(offset) |
228 print('UpdateAchievementLinks()') | 204 print('UpdateAchievementLinks()') |
229 offset = offset or 0 | 205 offset = offset or 0 |
230 local resultID = LFGListFrame.SearchPanel.selectedResult or self.selectedID | 206 local resultID = LFGListFrame.SearchPanel.selectedResult or self.selectedID |
231 self:Show() | 207 self:Show() |
233 | 209 |
234 local contentsHeight = 0 | 210 local contentsHeight = 0 |
235 for _, group in ipairs(cheevos) do | 211 for _, group in ipairs(cheevos) do |
236 for _, id in ipairs(group) do | 212 for _, id in ipairs(group) do |
237 local _, name, points, completed, month, day, year, description, flags, icon = GetAchievementInfo(id) | 213 local _, name, points, completed, month, day, year, description, flags, icon = GetAchievementInfo(id) |
214 print('checking', id, name) | |
238 if completed then | 215 if completed then |
239 -- if the highest mythic kill | 216 -- if the highest mythic kill |
240 if listed[overlaps[id]] then | 217 if listed[overlaps[id]] then |
241 break | 218 break |
242 end | 219 end |