vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | |
2 | -- Saved Data |
||
3 | |||
4 | PartySpotterSettings = {}; |
||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | -- Local Variables |
||
11 | |||
12 | local timeSinceLastUpdate = 0; |
||
13 | local iiInterval = 10; |
||
14 | local timeSinceLastWMUpdate = 0; |
||
15 | local timeSinceLastBFMUpdate = 0; |
||
16 | local timeSinceLastAMUpdate = 0; |
||
17 | local updateInterval; |
||
18 | local highlightedGroup = 0; |
||
19 | local singleOut = ""; |
||
20 | |||
21 | local PSTOPC = {}; |
||
22 | PSTOPC.r = 0.64; |
||
23 | PSTOPC.g = 0.21; |
||
24 | PSTOPC.b = 0.93; |
||
25 | |||
26 | local groupColours = { |
||
27 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup1", |
||
28 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup2", |
||
29 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup3", |
||
30 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup4", |
||
31 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup5", |
||
32 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup6", |
||
33 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup7", |
||
34 | }; |
||
35 | |||
36 | local groupNumbers = { |
||
37 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup1t", |
||
38 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup2t", |
||
39 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup3t", |
||
40 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup4t", |
||
41 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup5t", |
||
42 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup6t", |
||
43 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup7t", |
||
44 | "Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup8t", |
||
45 | }; |
||
46 | |||
47 | local friendA = {}; |
||
48 | local numberOfFriends = 0; |
||
49 | local ignoreA = {}; |
||
50 | guildA = {}; |
||
51 | numberOfGuildMembers = 0; |
||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | |||
58 | -- Local Constants |
||
59 | |||
60 | local PSTOP_DEFAULT_INTERVAL = 1; |
||
61 | local MAX_RAID_GROUPINGS = 8; |
||
62 | |||
63 | |||
64 | |||
65 | |||
66 | |||
67 | |||
68 | |||
69 | |||
70 | |||
71 | -- AddOn Functions |
||
72 | |||
73 | function PartySpotter_OnLoad() |
||
74 | this:RegisterEvent("ADDON_LOADED"); |
||
75 | this:RegisterEvent("FRIENDLIST_UPDATE"); |
||
76 | this:RegisterEvent("IGNORELIST_UPDATE"); |
||
77 | this:RegisterEvent("GUILD_ROSTER_UPDATE"); |
||
78 | this:RegisterEvent("PLAYER_ENTERING_WORLD"); |
||
79 | |||
80 | SlashCmdList["PTSPOT"] = function(pList) |
||
81 | PartySpotter_CmdLine(pList); |
||
82 | end |
||
83 | SLASH_PTSPOT1 = "/pspot"; |
||
84 | |||
85 | if ( not PartySpotterSettings.updateInterval ) then |
||
86 | updateInterval = PSTOP_DEFAULT_INTERVAL; |
||
87 | PartySpotterSettings.updateInterval = updateInterval; |
||
88 | else |
||
89 | updateInterval = PartySpotterSettings.updateInterval; |
||
90 | end |
||
91 | |||
92 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter v2.52.11200", PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
93 | end |
||
94 | |||
95 | function WorldMapPartySpotterKey_OnLoad() |
||
96 | WorldMapPartySpotterKeyBttn1IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup1t"); |
||
97 | WorldMapPartySpotterKeyBttn2IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup2t"); |
||
98 | WorldMapPartySpotterKeyBttn3IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup3t"); |
||
99 | WorldMapPartySpotterKeyBttn4IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup4t"); |
||
100 | WorldMapPartySpotterKeyBttn5IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup5t"); |
||
101 | WorldMapPartySpotterKeyBttn6IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup6t"); |
||
102 | WorldMapPartySpotterKeyBttn7IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup7t"); |
||
103 | WorldMapPartySpotterKeyBttn8IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup8t"); |
||
104 | end |
||
105 | |||
106 | function AlphaMapPartySpotterKey_OnLoad() |
||
107 | AlphaMapPartySpotterKeyBttn1IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup1t"); |
||
108 | AlphaMapPartySpotterKeyBttn2IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup2t"); |
||
109 | AlphaMapPartySpotterKeyBttn3IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup3t"); |
||
110 | AlphaMapPartySpotterKeyBttn4IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup4t"); |
||
111 | AlphaMapPartySpotterKeyBttn5IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup5t"); |
||
112 | AlphaMapPartySpotterKeyBttn6IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup6t"); |
||
113 | AlphaMapPartySpotterKeyBttn7IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup7t"); |
||
114 | AlphaMapPartySpotterKeyBttn8IconsNumber:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGroup8t"); |
||
115 | end |
||
116 | |||
117 | |||
118 | |||
119 | function PartySpotter_OnEvent() |
||
120 | if ( event == "ADDON_LOADED" ) then |
||
121 | if ( ( arg1 ) and ( arg1 == "Blizzard_BattlefieldMinimap" ) ) then |
||
122 | PartySpotter_LoadBFM(); |
||
123 | end |
||
124 | elseif ( event == "FRIENDLIST_UPDATE" ) then |
||
125 | PartySpotter_UpdateFriends(); |
||
126 | elseif ( event == "IGNORELIST_UPDATE" ) then |
||
127 | PartySpotter_UpdateIgnores(); |
||
128 | elseif ( event == "GUILD_ROSTER_UPDATE" ) then |
||
129 | PartySpotter_UpdateGuild(); |
||
130 | elseif ( event == "PLAYER_ENTERING_WORLD" ) then |
||
131 | PartySpotter_UpdateGuild(); |
||
132 | PartySpotter_UpdateIgnores(); |
||
133 | PartySpotter_UpdateFriends(); |
||
134 | end |
||
135 | end |
||
136 | |||
137 | |||
138 | |||
139 | function PartySpotter_CmdLine(pList) |
||
140 | nList = tonumber(pList); |
||
141 | if ( nList == nil ) then |
||
142 | nList = -1; |
||
143 | end |
||
144 | pList = string.lower(pList); |
||
145 | local t2 = string.sub(pList, 1, 2); |
||
146 | local tCap = string.sub(pList, 4, 4); |
||
147 | local tRest = string.sub(pList, 5); |
||
148 | if ( ( nList > 0 ) and ( nList < 9.001 ) ) then |
||
149 | updateInterval = nList; |
||
150 | PartySpotterSettings.updateInterval = updateInterval; |
||
151 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter On : "..updateInterval..PSPOT_DELAY_SUFFIX, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
152 | |||
153 | elseif ( t2 == "-l" ) then |
||
154 | if ( PartySpotterSettings.showLeader ) then |
||
155 | PartySpotterSettings.showLeader = nil; |
||
156 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_LEADER.." "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
157 | else |
||
158 | PartySpotterSettings.showLeader = true; |
||
159 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_LEADER, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
160 | end |
||
161 | |||
162 | elseif ( t2 == "-t" ) then |
||
163 | if ( ( tCap ) and ( tCap ~= "" ) and ( tCap ~= " " ) and ( tRest ) ) then |
||
164 | tCap = string.upper(tCap); |
||
165 | singleOut = tCap..tRest; |
||
166 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_INDI.." "..singleOut, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
167 | else |
||
168 | singleOut = ""; |
||
169 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_INDI.." "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
170 | end |
||
171 | |||
172 | elseif ( nList == 0 ) then |
||
173 | updateInterval = 0; |
||
174 | PartySpotterSettings.updateInterval = 0; |
||
175 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
176 | |||
177 | elseif ( pList == "reset" ) then |
||
178 | PartySpotter_Reset(); |
||
179 | DEFAULT_CHAT_FRAME:AddMessage(PSPOT_HELP_TEXT); |
||
180 | PartySpotter_ReportStatus(); |
||
181 | |||
182 | elseif ( pList == "showgroups icons" ) then |
||
183 | PartySpotterSettings.showGroups = "Icons"; |
||
184 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_COLOUR_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
185 | |||
186 | elseif ( pList == "showgroups numbers" ) then |
||
187 | PartySpotterSettings.showGroups = "Numbers"; |
||
188 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_NUMBER_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
189 | |||
190 | elseif ( pList == "showgroups off" ) then |
||
191 | PartySpotterSettings.showGroups = nil; |
||
192 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_DFLT_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
193 | |||
194 | elseif ( ( pList == "showfriends" ) or ( pList == "togglefriends" ) ) then |
||
195 | PartySpotterSettings.showIgnores = nil; |
||
196 | PartySpotterSettings.showGuild = nil; |
||
197 | if ( pList == "showfriends" ) then |
||
198 | if ( PartySpotterSettings.showFriends ) then |
||
199 | PartySpotterSettings.showFriends = nil; |
||
200 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_FRIENDS.." " ..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
201 | else |
||
202 | PartySpotterSettings.showFriends = "1"; |
||
203 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_FRIENDS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
204 | end |
||
205 | else |
||
206 | PartySpotterSettings.showFriends = "1"; |
||
207 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_FRIENDS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
208 | end |
||
209 | |||
210 | elseif ( ( pList == "showignores" ) or ( pList == "toggleignores" ) ) then |
||
211 | PartySpotterSettings.showFriends = nil; |
||
212 | PartySpotterSettings.showGuild = nil; |
||
213 | if ( pList == "showignores" ) then |
||
214 | if ( PartySpotterSettings.showIgnores ) then |
||
215 | PartySpotterSettings.showIgnores = nil; |
||
216 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_IGNORES.." " ..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
217 | else |
||
218 | PartySpotterSettings.showIgnores = "1"; |
||
219 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_IGNORES, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
220 | end |
||
221 | else |
||
222 | PartySpotterSettings.showIgnores = "1"; |
||
223 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_IGNORES, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
224 | end |
||
225 | |||
226 | elseif ( ( pList == "showguild" ) or ( pList == "toggleguild" ) ) then |
||
227 | PartySpotterSettings.showFriends = nil; |
||
228 | PartySpotterSettings.showIgnores = nil; |
||
229 | if ( pList == "showguild" ) then |
||
230 | if ( PartySpotterSettings.showGuild ) then |
||
231 | PartySpotterSettings.showGuild = nil; |
||
232 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_GUILD.." " ..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
233 | else |
||
234 | PartySpotterSettings.showGuild = "1"; |
||
235 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_GUILD, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
236 | end |
||
237 | else |
||
238 | PartySpotterSettings.showGuild = "1"; |
||
239 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_GUILD, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
240 | end |
||
241 | |||
242 | else |
||
243 | DEFAULT_CHAT_FRAME:AddMessage(PSPOT_HELP_TEXT); |
||
244 | PartySpotter_ReportStatus(); |
||
245 | local index = 0; |
||
246 | local value = getglobal("PSPOT_HELP_TEXT"..index); |
||
247 | while( value ) do |
||
248 | DEFAULT_CHAT_FRAME:AddMessage(value); |
||
249 | index = index + 1; |
||
250 | value = getglobal("PSPOT_HELP_TEXT"..index); |
||
251 | end |
||
252 | DEFAULT_CHAT_FRAME:AddMessage(PSPOT_HELP_TEXT); |
||
253 | end |
||
254 | end |
||
255 | |||
256 | function PartySpotter_ReportStatus() |
||
257 | if ( ( PartySpotterSettings.updateInterval > 0 ) and ( PartySpotterSettings.updateInterval < 9 ) ) then |
||
258 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PartySpotterSettings.updateInterval..PSPOT_DELAY_SUFFIX, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
259 | if ( singleOut == "" ) then |
||
260 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_INDI.." "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
261 | else |
||
262 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_INDI.." "..singleOut, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
263 | end |
||
264 | if ( PartySpotterSettings.showLeader ) then |
||
265 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_LEADER, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
266 | else |
||
267 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_LEADER.." "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
268 | end |
||
269 | if ( PartySpotterSettings.showFriends ) then |
||
270 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_FRIENDS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
271 | elseif ( PartySpotterSettings.showIgnores ) then |
||
272 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_IGNORES, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
273 | elseif ( PartySpotterSettings.showGuild ) then |
||
274 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_SHOW_GUILD, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
275 | else |
||
276 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_NO_HLIGHTS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
277 | end |
||
278 | if ( PartySpotterSettings.showGroups == "Icons" ) then |
||
279 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_COLOUR_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
280 | elseif ( PartySpotterSettings.showGroups == "Numbers" ) then |
||
281 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_NUMBER_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
282 | else |
||
283 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_DFLT_GROUPS, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
284 | end |
||
285 | else |
||
286 | DEFAULT_CHAT_FRAME:AddMessage("PartySpotter : "..PSPOT_OFF, PSTOPC.r, PSTOPC.g, PSTOPC.b); |
||
287 | end |
||
288 | end |
||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
294 | function PartySpotter_OnUpdate(arg1) |
||
295 | timeSinceLastUpdate = timeSinceLastUpdate + arg1; |
||
296 | if ( timeSinceLastUpdate > iiInterval ) then |
||
297 | PartySpotter_UpdateIgnores(); |
||
298 | timeSinceLastUpdate = 0; |
||
299 | end |
||
300 | end |
||
301 | |||
302 | function PartySpotterWM_OnUpdate(arg1) |
||
303 | timeSinceLastWMUpdate = timeSinceLastWMUpdate + arg1; |
||
304 | if ( timeSinceLastWMUpdate > updateInterval ) then |
||
305 | PartySpotter_Update("WorldMap"); |
||
306 | timeSinceLastWMUpdate = 0; |
||
307 | end |
||
308 | end |
||
309 | |||
310 | function PartySpotterBFM_OnUpdate(arg1) |
||
311 | timeSinceLastBFMUpdate = timeSinceLastBFMUpdate + arg1; |
||
312 | if ( timeSinceLastBFMUpdate > updateInterval ) then |
||
313 | PartySpotter_Update("BattlefieldMinimap"); |
||
314 | timeSinceLastBFMUpdate = 0; |
||
315 | end |
||
316 | end |
||
317 | |||
318 | function PartySpotterAM_OnUpdate(arg1) |
||
319 | timeSinceLastAMUpdate = timeSinceLastAMUpdate + arg1; |
||
320 | if ( timeSinceLastAMUpdate > updateInterval ) then |
||
321 | PartySpotter_Update("AlphaMap"); |
||
322 | timeSinceLastAMUpdate = 0; |
||
323 | end |
||
324 | end |
||
325 | |||
326 | |||
327 | |||
328 | function PartySpotter_KeyButton_OnClick(mouseBttn, id) |
||
329 | if ( highlightedGroup > 0 ) then |
||
330 | local WMBttn = getglobal("WorldMapPartySpotterKeyBttn"..highlightedGroup); |
||
331 | if ( WMBttn ) then |
||
332 | WMBttn:UnlockHighlight(); |
||
333 | end |
||
334 | local AMBttn = getglobal("AlphaMapPartySpotterKeyBttn"..highlightedGroup); |
||
335 | if ( AMBttn ) then |
||
336 | AMBttn:UnlockHighlight(); |
||
337 | end |
||
338 | end |
||
339 | if ( id == highlightedGroup ) then |
||
340 | highlightedGroup = 0; |
||
341 | else |
||
342 | highlightedGroup = id; |
||
343 | local WMBttn = getglobal("WorldMapPartySpotterKeyBttn"..id); |
||
344 | if ( WMBttn ) then |
||
345 | WMBttn:LockHighlight(); |
||
346 | end |
||
347 | local AMBttn = getglobal("AlphaMapPartySpotterKeyBttn"..id); |
||
348 | if ( AMBttn ) then |
||
349 | AMBttn:LockHighlight(); |
||
350 | end |
||
351 | end |
||
352 | end |
||
353 | |||
354 | |||
355 | |||
356 | function PartySpotter_Update(Map) |
||
357 | |||
358 | PartySpotter_ResetRaidSpots(Map); |
||
359 | PartySpotter_ResetPartySpots(Map); |
||
360 | |||
361 | if ( PartySpotterSettings.updateInterval == 0 ) then |
||
362 | WorldMapPartySpotterKey:Hide(); |
||
363 | AlphaMapPartySpotterKey:Hide(); |
||
364 | return; |
||
365 | end |
||
366 | |||
367 | if ( ( not UnitInRaid("player") ) and ( GetNumPartyMembers() < 1 ) ) then |
||
368 | if ( ( singleOut ~= "" ) or ( PartySpotterSettings.showFriends ) or ( PartySpotterSettings.showIgnores ) or ( PartySpotterSettings.showGuild ) ) then |
||
369 | WorldMapPartySpotterKey:Hide(); |
||
370 | AlphaMapPartySpotterKey:Hide(); |
||
371 | for i=1, MAX_PARTY_MEMBERS, 1 do |
||
372 | local partyIcon = getglobal(Map.."Party"..i); |
||
373 | if ( ( partyIcon ) and ( partyIcon:IsVisible() ) ) then |
||
374 | PartySpotter_UpdatePartyHighlight(Map, partyIcon, i); |
||
375 | -- else |
||
376 | -- break; |
||
377 | end |
||
378 | |||
379 | end |
||
380 | for i=1, MAX_RAID_MEMBERS, 1 do |
||
381 | local raidIcon = getglobal(Map.."Raid"..i); |
||
382 | if ( ( raidIcon ) and ( raidIcon:IsVisible() ) ) then |
||
383 | PartySpotter_UpdateRaidHighlight(Map, raidIcon, i); |
||
384 | -- else |
||
385 | -- break; |
||
386 | end |
||
387 | |||
388 | end |
||
389 | return; |
||
390 | end |
||
391 | elseif ( UnitInRaid("player") ) then |
||
392 | local pName = UnitName("player"); |
||
393 | local localGroup = 0; |
||
394 | for i=1, MAX_RAID_MEMBERS, 1 do |
||
395 | local rName, rDiscard, rSubGroup = GetRaidRosterInfo(i); |
||
396 | if ( rName == pName ) then |
||
397 | localGroup = rSubGroup; |
||
398 | end |
||
399 | end |
||
400 | |||
401 | local mapKey = getglobal(Map.."PartySpotterKey"); |
||
402 | if ( ( PartySpotterSettings.showGroups ) and ( ( Map == "WorldMap" ) or ( Map == "AlphaMap" ) ) ) then |
||
403 | if ( mapKey ) then |
||
404 | for i = 1, MAX_RAID_GROUPINGS, 1 do |
||
405 | local KeyOther = getglobal(Map.."PartySpotterKeyBttn"..i.."IconsOther"); |
||
406 | local KeyNumber = getglobal(Map.."PartySpotterKeyBttn"..i.."IconsNumber"); |
||
407 | local KeyParty = getglobal(Map.."PartySpotterKeyBttn"..i.."IconsParty"); |
||
408 | if ( i < localGroup ) then |
||
409 | if ( PartySpotterSettings.showGroups == "Icons" ) then |
||
410 | KeyOther:SetTexture(groupColours[i]); |
||
411 | KeyOther:Show(); |
||
412 | else |
||
413 | KeyOther:Hide(); |
||
414 | end |
||
415 | KeyParty:Hide(); |
||
416 | elseif ( i > localGroup ) then |
||
417 | if ( PartySpotterSettings.showGroups == "Icons" ) then |
||
418 | KeyOther:SetTexture(groupColours[i-1]); |
||
419 | KeyOther:Show(); |
||
420 | else |
||
421 | KeyOther:Hide(); |
||
422 | end |
||
423 | KeyParty:Hide(); |
||
424 | else |
||
425 | KeyOther:Hide(); |
||
426 | KeyParty:Show(); |
||
427 | end |
||
428 | mapKey:Show(); |
||
429 | end |
||
430 | end |
||
431 | else |
||
432 | if ( mapKey ) then |
||
433 | mapKey:Hide(); |
||
434 | end |
||
435 | end |
||
436 | |||
437 | -- Set Map Icons accordingly |
||
438 | for i=1, MAX_RAID_MEMBERS, 1 do |
||
439 | local raidIcon = getglobal(Map.."Raid"..i); |
||
440 | if ( raidIcon ) then |
||
441 | local unitHighlighted = nil; |
||
442 | if ( ( singleOut ~= "" ) or ( PartySpotterSettings.showFriends ) or ( PartySpotterSettings.showIgnores ) or ( PartySpotterSettings.showGuild ) ) then |
||
443 | unitHighlighted = PartySpotter_UpdateRaidHighlight(Map, raidIcon, i); |
||
444 | end |
||
445 | if ( not unitHighlighted ) then |
||
446 | local spotRaid = getglobal(Map.."SpotRaid"..i); |
||
447 | if ( raidIcon.name ) then |
||
448 | spotRaid:Hide(); |
||
449 | else |
||
450 | local rName, rRank, rSubGroup = GetRaidRosterInfo(i); |
||
451 | local spotRaidTextureParty = getglobal(Map.."SpotRaid"..i.."PartySpot"); |
||
452 | local spotRaidTextureRaid = getglobal(Map.."SpotRaid"..i.."RaidSpot"); |
||
453 | local gIndex = rSubGroup; |
||
454 | local raidUnitName; |
||
455 | local uType = raidIcon.unit; |
||
456 | if ( ( not uType ) or ( uType == "" ) or ( uType == "unit" ) ) then |
||
457 | raidUnitName = "~"; |
||
458 | else |
||
459 | raidUnitName = UnitName(uType); |
||
460 | end |
||
461 | if ( ( PartySpotterSettings.showLeader ) and ( rRank == 2 ) ) then |
||
462 | spotRaidTextureRaid:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotLeader"); |
||
463 | spotRaid:SetFrameLevel( raidIcon:GetFrameLevel() + 3 ); |
||
464 | spotRaidTextureParty:Hide(); |
||
465 | spotRaidTextureRaid:Show(); |
||
466 | spotRaid:Show(); |
||
467 | elseif ( rSubGroup == localGroup ) then |
||
468 | spotRaid:SetFrameLevel( raidIcon:GetFrameLevel() + 2 ); |
||
469 | spotRaidTextureRaid:Hide(); |
||
470 | spotRaidTextureParty:Show(); |
||
471 | spotRaid:Show(); |
||
472 | else |
||
473 | if ( PartySpotterSettings.showGroups == "Icons" ) then |
||
474 | if ( rSubGroup > localGroup ) then |
||
475 | rSubGroup = rSubGroup - 1; |
||
476 | end |
||
477 | spotRaidTextureRaid:SetTexture(groupColours[rSubGroup]); |
||
478 | elseif ( PartySpotterSettings.showGroups == "Numbers" ) then |
||
479 | spotRaidTextureRaid:SetTexture(groupNumbers[rSubGroup]); |
||
480 | else |
||
481 | spotRaidTextureRaid:SetTexture(groupColours[1]); |
||
482 | end |
||
483 | if ( gIndex == highlightedGroup ) then |
||
484 | spotRaid:SetFrameLevel( raidIcon:GetFrameLevel() + 3 ); |
||
485 | else |
||
486 | spotRaid:SetFrameLevel( raidIcon:GetFrameLevel() ); |
||
487 | end |
||
488 | spotRaidTextureParty:Hide(); |
||
489 | spotRaidTextureRaid:Show(); |
||
490 | spotRaid:Show(); |
||
491 | end |
||
492 | end |
||
493 | end |
||
494 | -- else |
||
495 | -- return; |
||
496 | end |
||
497 | end |
||
498 | else |
||
499 | for i = 1, MAX_PARTY_MEMBERS, 1 do |
||
500 | local partyIcon = getglobal(Map.."Party"..i); |
||
501 | if ( ( partyIcon ) and ( partyIcon:IsVisible() ) ) then |
||
502 | local unitHighlighted = nil; |
||
503 | if ( ( singleOut ~= "" ) or ( PartySpotterSettings.showFriends ) or ( PartySpotterSettings.showIgnores ) or ( PartySpotterSettings.showGuild ) ) then |
||
504 | unitHighlighted = PartySpotter_UpdatePartyHighlight(Map, partyIcon, i); |
||
505 | end |
||
506 | if ( not unitHighlighted ) then |
||
507 | local spotParty = getglobal(Map.."SpotParty"..i); |
||
508 | local spotPartyIcon = getglobal(Map.."SpotParty"..i.."PartySpot"); |
||
509 | spotPartyIcon:Show(); |
||
510 | spotParty:Show(); |
||
511 | end |
||
512 | -- else |
||
513 | -- return; |
||
514 | end |
||
515 | end |
||
516 | end |
||
517 | end |
||
518 | |||
519 | |||
520 | |||
521 | function PartySpotter_ResetRaidSpots(Map) |
||
522 | for i=1, MAX_RAID_MEMBERS, 1 do |
||
523 | local raidIcon = getglobal(Map.."Raid"..i); |
||
524 | if ( ( raidIcon ) and ( raidIcon:IsVisible() ) ) then |
||
525 | local spotRaid = getglobal(Map.."SpotRaid"..i); |
||
526 | if ( spotRaid ) then |
||
527 | spotRaid:Hide(); |
||
528 | end |
||
529 | else |
||
530 | return; |
||
531 | end |
||
532 | end |
||
533 | end |
||
534 | |||
535 | function PartySpotter_ResetPartySpots(Map) |
||
536 | for i=1, MAX_PARTY_MEMBERS, 1 do |
||
537 | local partyIcon = getglobal(Map.."Party"..i); |
||
538 | if ( ( partyIcon ) and ( partyIcon:IsVisible() ) ) then |
||
539 | local spotParty = getglobal(Map.."SpotParty"..i); |
||
540 | local spotPartyTexture = getglobal(Map.."SpotParty"..i.."PartySpot"); |
||
541 | if ( spotParty ) then |
||
542 | spotPartyTexture:SetTexture("Interface\\AddOns\\PartySpotter\\Artwork\\SpotPartyIcon"); |
||
543 | spotParty:Hide(); |
||
544 | end |
||
545 | else |
||
546 | return; |
||
547 | end |
||
548 | end |
||
549 | end |
||
550 | |||
551 | |||
552 | |||
553 | function PartySpotter_UpdateRaidHighlight(Map, raidIcon, raidIndex) |
||
554 | local unitHighlighted = nil; |
||
555 | local rName, spotRaid, spotRaidTextureParty, spotRaidTextureRaid; |
||
556 | if ( raidIcon.name ) then |
||
557 | rName = raidIcon.name; |
||
558 | else |
||
559 | local uType = raidIcon.unit; |
||
560 | if ( ( uType == nil ) or ( uType == "" ) or ( uType == "unit" ) ) then |
||
561 | return; |
||
562 | end |
||
563 | rName = UnitName(uType); |
||
564 | end |
||
565 | if ( rName == singleOut ) then |
||
566 | spotRaid = getglobal(Map.."SpotRaid"..raidIndex); |
||
567 | spotRaidTextureParty = getglobal(Map.."SpotRaid"..raidIndex.."PartySpot"); |
||
568 | spotRaidTextureRaid = getglobal(Map.."SpotRaid"..raidIndex.."RaidSpot"); |
||
569 | spotRaidTextureParty:Hide(); |
||
570 | spotRaidTextureRaid:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotTarget"); |
||
571 | spotRaid:SetFrameLevel( raidIcon:GetFrameLevel() + 3 ); |
||
572 | spotRaidTextureRaid:Show(); |
||
573 | spotRaid:Show(); |
||
574 | unitHighlighted = true; |
||
575 | elseif ( PartySpotterSettings.showFriends ) then |
||
576 | if ( numberOfFriends == 0 ) then |
||
577 | PartySpotter_UpdateFriends(); |
||
578 | end |
||
579 | if ( friendA[rName] ) then |
||
580 | spotRaid = getglobal(Map.."SpotRaid"..raidIndex); |
||
581 | spotRaidTextureParty = getglobal(Map.."SpotRaid"..raidIndex.."PartySpot"); |
||
582 | spotRaidTextureRaid = getglobal(Map.."SpotRaid"..raidIndex.."RaidSpot"); |
||
583 | spotRaidTextureParty:Hide(); |
||
584 | spotRaidTextureRaid:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotFriend"); |
||
585 | spotRaidTextureRaid:Show(); |
||
586 | spotRaid:Show(); |
||
587 | unitHighlighted = true; |
||
588 | end |
||
589 | elseif ( PartySpotterSettings.showIgnores ) then |
||
590 | if ( ignoreA[rName] ) then |
||
591 | spotRaid = getglobal(Map.."SpotRaid"..raidIndex); |
||
592 | spotRaidTextureParty = getglobal(Map.."SpotRaid"..raidIndex.."PartySpot"); |
||
593 | spotRaidTextureRaid = getglobal(Map.."SpotRaid"..raidIndex.."RaidSpot"); |
||
594 | spotRaidTextureParty:Hide(); |
||
595 | spotRaidTextureRaid:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotIgnore"); |
||
596 | spotRaidTextureRaid:Show(); |
||
597 | spotRaid:Show(); |
||
598 | unitHighlighted = true; |
||
599 | end |
||
600 | elseif ( PartySpotterSettings.showGuild ) then |
||
601 | if ( numberOfGuildMembers == 0 ) then |
||
602 | PartySpotter_UpdateGuild(); |
||
603 | end |
||
604 | if ( guildA[rName] ) then |
||
605 | spotRaid = getglobal(Map.."SpotRaid"..raidIndex); |
||
606 | spotRaidTextureParty = getglobal(Map.."SpotRaid"..raidIndex.."PartySpot"); |
||
607 | spotRaidTextureRaid = getglobal(Map.."SpotRaid"..raidIndex.."RaidSpot"); |
||
608 | spotRaidTextureParty:Hide(); |
||
609 | spotRaidTextureRaid:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGuild"); |
||
610 | spotRaidTextureRaid:Show(); |
||
611 | spotRaid:Show(); |
||
612 | unitHighlighted = true; |
||
613 | end |
||
614 | end |
||
615 | return unitHighlighted; |
||
616 | end |
||
617 | |||
618 | function PartySpotter_UpdatePartyHighlight(Map, partyIcon, partyIndex) |
||
619 | local unitHighlighted = nil; |
||
620 | local spotParty, spotPartyTextureParty, spotPartyTextureRaid; |
||
621 | local rName = UnitName(partyIcon.unit); |
||
622 | if ( rName == singleOut ) then |
||
623 | spotParty = getglobal(Map.."SpotParty"..partyIndex); |
||
624 | spotPartyTextureParty = getglobal(Map.."SpotParty"..partyIndex.."PartySpot"); |
||
625 | spotPartyTextureRaid = getglobal(Map.."SpotParty"..partyIndex.."RaidSpot"); |
||
626 | spotPartyTextureRaid:Hide(); |
||
627 | spotPartyTextureParty:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotTarget"); |
||
628 | spotParty:SetFrameLevel( partyIcon:GetFrameLevel() + 3 ); |
||
629 | spotPartyTextureParty:Show(); |
||
630 | spotParty:Show(); |
||
631 | unitHighlighted = true; |
||
632 | elseif ( PartySpotterSettings.showFriends ) then |
||
633 | if ( numberOfFriends == 0 ) then |
||
634 | PartySpotter_UpdateFriends(); |
||
635 | end |
||
636 | if ( friendA[rName] ) then |
||
637 | spotParty = getglobal(Map.."SpotParty"..partyIndex); |
||
638 | spotPartyTextureParty = getglobal(Map.."SpotParty"..partyIndex.."PartySpot"); |
||
639 | spotPartyTextureRaid = getglobal(Map.."SpotParty"..partyIndex.."RaidSpot"); |
||
640 | spotPartyTextureRaid:Hide(); |
||
641 | spotPartyTextureParty:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotFriend"); |
||
642 | spotPartyTextureParty:Show(); |
||
643 | spotParty:Show(); |
||
644 | unitHighlighted = true; |
||
645 | end |
||
646 | elseif ( PartySpotterSettings.showIgnores ) then |
||
647 | if ( ignoreA[rName] ) then |
||
648 | spotParty = getglobal(Map.."SpotParty"..partyIndex); |
||
649 | spotPartyTextureParty = getglobal(Map.."SpotParty"..partyIndex.."PartySpot"); |
||
650 | spotPartyTextureRaid = getglobal(Map.."SpotParty"..partyIndex.."RaidSpot"); |
||
651 | spotPartyTextureRaid:Hide(); |
||
652 | spotPartyTextureParty:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotIgnore"); |
||
653 | spotPartyTextureParty:Show(); |
||
654 | spotParty:Show(); |
||
655 | unitHighlighted = true; |
||
656 | end |
||
657 | elseif ( PartySpotterSettings.showGuild ) then |
||
658 | if ( numberOfGuildMembers == 0 ) then |
||
659 | PartySpotter_UpdateGuild(); |
||
660 | end |
||
661 | if ( guildA[rName] ) then |
||
662 | spotParty = getglobal(Map.."SpotParty"..partyIndex); |
||
663 | spotPartyTextureParty = getglobal(Map.."SpotParty"..partyIndex.."PartySpot"); |
||
664 | spotPartyTextureRaid = getglobal(Map.."SpotParty"..partyIndex.."RaidSpot"); |
||
665 | spotPartyTextureRaid:Hide(); |
||
666 | spotPartyTextureParty:SetTexture("Interface\\Addons\\PartySpotter\\Artwork\\SpotGuild"); |
||
667 | spotPartyTextureParty:Show(); |
||
668 | spotParty:Show(); |
||
669 | unitHighlighted = true; |
||
670 | end |
||
671 | end |
||
672 | return unitHighlighted; |
||
673 | end |
||
674 | |||
675 | |||
676 | |||
677 | function PartySpotter_LoadBFM() |
||
678 | PartySpotterBFM:SetParent(BattlefieldMinimap); |
||
679 | BattlefieldMinimapSpotParty1:SetParent(BattlefieldMinimapParty1); |
||
680 | BattlefieldMinimapSpotParty2:SetParent(BattlefieldMinimapParty2); |
||
681 | BattlefieldMinimapSpotParty3:SetParent(BattlefieldMinimapParty3); |
||
682 | BattlefieldMinimapSpotParty4:SetParent(BattlefieldMinimapParty4); |
||
683 | BattlefieldMinimapSpotRaid1:SetParent(BattlefieldMinimapRaid1); |
||
684 | BattlefieldMinimapSpotRaid2:SetParent(BattlefieldMinimapRaid2); |
||
685 | BattlefieldMinimapSpotRaid3:SetParent(BattlefieldMinimapRaid3); |
||
686 | BattlefieldMinimapSpotRaid4:SetParent(BattlefieldMinimapRaid4); |
||
687 | BattlefieldMinimapSpotRaid5:SetParent(BattlefieldMinimapRaid5); |
||
688 | BattlefieldMinimapSpotRaid6:SetParent(BattlefieldMinimapRaid6); |
||
689 | BattlefieldMinimapSpotRaid7:SetParent(BattlefieldMinimapRaid7); |
||
690 | BattlefieldMinimapSpotRaid8:SetParent(BattlefieldMinimapRaid8); |
||
691 | BattlefieldMinimapSpotRaid9:SetParent(BattlefieldMinimapRaid9); |
||
692 | BattlefieldMinimapSpotRaid10:SetParent(BattlefieldMinimapRaid10); |
||
693 | BattlefieldMinimapSpotRaid11:SetParent(BattlefieldMinimapRaid11); |
||
694 | BattlefieldMinimapSpotRaid12:SetParent(BattlefieldMinimapRaid12); |
||
695 | BattlefieldMinimapSpotRaid13:SetParent(BattlefieldMinimapRaid13); |
||
696 | BattlefieldMinimapSpotRaid14:SetParent(BattlefieldMinimapRaid14); |
||
697 | BattlefieldMinimapSpotRaid15:SetParent(BattlefieldMinimapRaid15); |
||
698 | BattlefieldMinimapSpotRaid16:SetParent(BattlefieldMinimapRaid16); |
||
699 | BattlefieldMinimapSpotRaid17:SetParent(BattlefieldMinimapRaid17); |
||
700 | BattlefieldMinimapSpotRaid18:SetParent(BattlefieldMinimapRaid18); |
||
701 | BattlefieldMinimapSpotRaid19:SetParent(BattlefieldMinimapRaid19); |
||
702 | BattlefieldMinimapSpotRaid20:SetParent(BattlefieldMinimapRaid20); |
||
703 | BattlefieldMinimapSpotRaid21:SetParent(BattlefieldMinimapRaid21); |
||
704 | BattlefieldMinimapSpotRaid22:SetParent(BattlefieldMinimapRaid22); |
||
705 | BattlefieldMinimapSpotRaid23:SetParent(BattlefieldMinimapRaid23); |
||
706 | BattlefieldMinimapSpotRaid24:SetParent(BattlefieldMinimapRaid24); |
||
707 | BattlefieldMinimapSpotRaid25:SetParent(BattlefieldMinimapRaid25); |
||
708 | BattlefieldMinimapSpotRaid26:SetParent(BattlefieldMinimapRaid26); |
||
709 | BattlefieldMinimapSpotRaid27:SetParent(BattlefieldMinimapRaid27); |
||
710 | BattlefieldMinimapSpotRaid28:SetParent(BattlefieldMinimapRaid28); |
||
711 | BattlefieldMinimapSpotRaid29:SetParent(BattlefieldMinimapRaid29); |
||
712 | BattlefieldMinimapSpotRaid30:SetParent(BattlefieldMinimapRaid30); |
||
713 | BattlefieldMinimapSpotRaid31:SetParent(BattlefieldMinimapRaid31); |
||
714 | BattlefieldMinimapSpotRaid32:SetParent(BattlefieldMinimapRaid32); |
||
715 | BattlefieldMinimapSpotRaid33:SetParent(BattlefieldMinimapRaid33); |
||
716 | BattlefieldMinimapSpotRaid34:SetParent(BattlefieldMinimapRaid34); |
||
717 | BattlefieldMinimapSpotRaid35:SetParent(BattlefieldMinimapRaid35); |
||
718 | BattlefieldMinimapSpotRaid36:SetParent(BattlefieldMinimapRaid36); |
||
719 | BattlefieldMinimapSpotRaid37:SetParent(BattlefieldMinimapRaid37); |
||
720 | BattlefieldMinimapSpotRaid38:SetParent(BattlefieldMinimapRaid38); |
||
721 | BattlefieldMinimapSpotRaid39:SetParent(BattlefieldMinimapRaid39); |
||
722 | BattlefieldMinimapSpotRaid40:SetParent(BattlefieldMinimapRaid40); |
||
723 | BattlefieldMinimapSpotParty1:SetPoint("CENTER", "BattlefieldMinimapParty1", "CENTER", 0, 0); |
||
724 | BattlefieldMinimapSpotParty2:SetPoint("CENTER", "BattlefieldMinimapParty2", "CENTER", 0, 0); |
||
725 | BattlefieldMinimapSpotParty3:SetPoint("CENTER", "BattlefieldMinimapParty3", "CENTER", 0, 0); |
||
726 | BattlefieldMinimapSpotParty4:SetPoint("CENTER", "BattlefieldMinimapParty4", "CENTER", 0, 0); |
||
727 | BattlefieldMinimapSpotRaid1:SetPoint("CENTER", "BattlefieldMinimapRaid1", "CENTER", 0, 0); |
||
728 | BattlefieldMinimapSpotRaid2:SetPoint("CENTER", "BattlefieldMinimapRaid2", "CENTER", 0, 0); |
||
729 | BattlefieldMinimapSpotRaid3:SetPoint("CENTER", "BattlefieldMinimapRaid3", "CENTER", 0, 0); |
||
730 | BattlefieldMinimapSpotRaid4:SetPoint("CENTER", "BattlefieldMinimapRaid4", "CENTER", 0, 0); |
||
731 | BattlefieldMinimapSpotRaid5:SetPoint("CENTER", "BattlefieldMinimapRaid5", "CENTER", 0, 0); |
||
732 | BattlefieldMinimapSpotRaid6:SetPoint("CENTER", "BattlefieldMinimapRaid6", "CENTER", 0, 0); |
||
733 | BattlefieldMinimapSpotRaid7:SetPoint("CENTER", "BattlefieldMinimapRaid7", "CENTER", 0, 0); |
||
734 | BattlefieldMinimapSpotRaid8:SetPoint("CENTER", "BattlefieldMinimapRaid8", "CENTER", 0, 0); |
||
735 | BattlefieldMinimapSpotRaid9:SetPoint("CENTER", "BattlefieldMinimapRaid9", "CENTER", 0, 0); |
||
736 | BattlefieldMinimapSpotRaid10:SetPoint("CENTER", "BattlefieldMinimapRaid10", "CENTER", 0, 0); |
||
737 | BattlefieldMinimapSpotRaid11:SetPoint("CENTER", "BattlefieldMinimapRaid11", "CENTER", 0, 0); |
||
738 | BattlefieldMinimapSpotRaid12:SetPoint("CENTER", "BattlefieldMinimapRaid12", "CENTER", 0, 0); |
||
739 | BattlefieldMinimapSpotRaid13:SetPoint("CENTER", "BattlefieldMinimapRaid13", "CENTER", 0, 0); |
||
740 | BattlefieldMinimapSpotRaid14:SetPoint("CENTER", "BattlefieldMinimapRaid14", "CENTER", 0, 0); |
||
741 | BattlefieldMinimapSpotRaid15:SetPoint("CENTER", "BattlefieldMinimapRaid15", "CENTER", 0, 0); |
||
742 | BattlefieldMinimapSpotRaid16:SetPoint("CENTER", "BattlefieldMinimapRaid16", "CENTER", 0, 0); |
||
743 | BattlefieldMinimapSpotRaid17:SetPoint("CENTER", "BattlefieldMinimapRaid17", "CENTER", 0, 0); |
||
744 | BattlefieldMinimapSpotRaid18:SetPoint("CENTER", "BattlefieldMinimapRaid18", "CENTER", 0, 0); |
||
745 | BattlefieldMinimapSpotRaid19:SetPoint("CENTER", "BattlefieldMinimapRaid19", "CENTER", 0, 0); |
||
746 | BattlefieldMinimapSpotRaid20:SetPoint("CENTER", "BattlefieldMinimapRaid20", "CENTER", 0, 0); |
||
747 | BattlefieldMinimapSpotRaid21:SetPoint("CENTER", "BattlefieldMinimapRaid21", "CENTER", 0, 0); |
||
748 | BattlefieldMinimapSpotRaid22:SetPoint("CENTER", "BattlefieldMinimapRaid22", "CENTER", 0, 0); |
||
749 | BattlefieldMinimapSpotRaid23:SetPoint("CENTER", "BattlefieldMinimapRaid23", "CENTER", 0, 0); |
||
750 | BattlefieldMinimapSpotRaid24:SetPoint("CENTER", "BattlefieldMinimapRaid24", "CENTER", 0, 0); |
||
751 | BattlefieldMinimapSpotRaid25:SetPoint("CENTER", "BattlefieldMinimapRaid25", "CENTER", 0, 0); |
||
752 | BattlefieldMinimapSpotRaid26:SetPoint("CENTER", "BattlefieldMinimapRaid26", "CENTER", 0, 0); |
||
753 | BattlefieldMinimapSpotRaid27:SetPoint("CENTER", "BattlefieldMinimapRaid27", "CENTER", 0, 0); |
||
754 | BattlefieldMinimapSpotRaid28:SetPoint("CENTER", "BattlefieldMinimapRaid28", "CENTER", 0, 0); |
||
755 | BattlefieldMinimapSpotRaid29:SetPoint("CENTER", "BattlefieldMinimapRaid29", "CENTER", 0, 0); |
||
756 | BattlefieldMinimapSpotRaid30:SetPoint("CENTER", "BattlefieldMinimapRaid30", "CENTER", 0, 0); |
||
757 | BattlefieldMinimapSpotRaid31:SetPoint("CENTER", "BattlefieldMinimapRaid31", "CENTER", 0, 0); |
||
758 | BattlefieldMinimapSpotRaid32:SetPoint("CENTER", "BattlefieldMinimapRaid32", "CENTER", 0, 0); |
||
759 | BattlefieldMinimapSpotRaid33:SetPoint("CENTER", "BattlefieldMinimapRaid33", "CENTER", 0, 0); |
||
760 | BattlefieldMinimapSpotRaid34:SetPoint("CENTER", "BattlefieldMinimapRaid34", "CENTER", 0, 0); |
||
761 | BattlefieldMinimapSpotRaid35:SetPoint("CENTER", "BattlefieldMinimapRaid35", "CENTER", 0, 0); |
||
762 | BattlefieldMinimapSpotRaid36:SetPoint("CENTER", "BattlefieldMinimapRaid36", "CENTER", 0, 0); |
||
763 | BattlefieldMinimapSpotRaid37:SetPoint("CENTER", "BattlefieldMinimapRaid37", "CENTER", 0, 0); |
||
764 | BattlefieldMinimapSpotRaid38:SetPoint("CENTER", "BattlefieldMinimapRaid38", "CENTER", 0, 0); |
||
765 | BattlefieldMinimapSpotRaid39:SetPoint("CENTER", "BattlefieldMinimapRaid39", "CENTER", 0, 0); |
||
766 | BattlefieldMinimapSpotRaid40:SetPoint("CENTER", "BattlefieldMinimapRaid40", "CENTER", 0, 0); |
||
767 | BattlefieldMinimapSpotParty1:SetFrameLevel( BattlefieldMinimapParty1:GetFrameLevel() + 1 ); |
||
768 | BattlefieldMinimapSpotParty2:SetFrameLevel( BattlefieldMinimapParty2:GetFrameLevel() + 1 ); |
||
769 | BattlefieldMinimapSpotParty3:SetFrameLevel( BattlefieldMinimapParty3:GetFrameLevel() + 1 ); |
||
770 | BattlefieldMinimapSpotParty4:SetFrameLevel( BattlefieldMinimapParty4:GetFrameLevel() + 1 ); |
||
771 | BattlefieldMinimapSpotRaid1:SetFrameLevel( BattlefieldMinimapRaid1:GetFrameLevel() + 1 ); |
||
772 | BattlefieldMinimapSpotRaid2:SetFrameLevel( BattlefieldMinimapRaid2:GetFrameLevel() + 1 ); |
||
773 | BattlefieldMinimapSpotRaid3:SetFrameLevel( BattlefieldMinimapRaid3:GetFrameLevel() + 1 ); |
||
774 | BattlefieldMinimapSpotRaid4:SetFrameLevel( BattlefieldMinimapRaid4:GetFrameLevel() + 1 ); |
||
775 | BattlefieldMinimapSpotRaid5:SetFrameLevel( BattlefieldMinimapRaid5:GetFrameLevel() + 1 ); |
||
776 | BattlefieldMinimapSpotRaid6:SetFrameLevel( BattlefieldMinimapRaid6:GetFrameLevel() + 1 ); |
||
777 | BattlefieldMinimapSpotRaid7:SetFrameLevel( BattlefieldMinimapRaid7:GetFrameLevel() + 1 ); |
||
778 | BattlefieldMinimapSpotRaid8:SetFrameLevel( BattlefieldMinimapRaid8:GetFrameLevel() + 1 ); |
||
779 | BattlefieldMinimapSpotRaid9:SetFrameLevel( BattlefieldMinimapRaid9:GetFrameLevel() + 1 ); |
||
780 | BattlefieldMinimapSpotRaid10:SetFrameLevel( BattlefieldMinimapRaid10:GetFrameLevel() + 1 ); |
||
781 | BattlefieldMinimapSpotRaid11:SetFrameLevel( BattlefieldMinimapRaid11:GetFrameLevel() + 1 ); |
||
782 | BattlefieldMinimapSpotRaid12:SetFrameLevel( BattlefieldMinimapRaid12:GetFrameLevel() + 1 ); |
||
783 | BattlefieldMinimapSpotRaid13:SetFrameLevel( BattlefieldMinimapRaid13:GetFrameLevel() + 1 ); |
||
784 | BattlefieldMinimapSpotRaid14:SetFrameLevel( BattlefieldMinimapRaid14:GetFrameLevel() + 1 ); |
||
785 | BattlefieldMinimapSpotRaid15:SetFrameLevel( BattlefieldMinimapRaid15:GetFrameLevel() + 1 ); |
||
786 | BattlefieldMinimapSpotRaid16:SetFrameLevel( BattlefieldMinimapRaid16:GetFrameLevel() + 1 ); |
||
787 | BattlefieldMinimapSpotRaid17:SetFrameLevel( BattlefieldMinimapRaid17:GetFrameLevel() + 1 ); |
||
788 | BattlefieldMinimapSpotRaid18:SetFrameLevel( BattlefieldMinimapRaid18:GetFrameLevel() + 1 ); |
||
789 | BattlefieldMinimapSpotRaid19:SetFrameLevel( BattlefieldMinimapRaid19:GetFrameLevel() + 1 ); |
||
790 | BattlefieldMinimapSpotRaid20:SetFrameLevel( BattlefieldMinimapRaid20:GetFrameLevel() + 1 ); |
||
791 | BattlefieldMinimapSpotRaid21:SetFrameLevel( BattlefieldMinimapRaid21:GetFrameLevel() + 1 ); |
||
792 | BattlefieldMinimapSpotRaid22:SetFrameLevel( BattlefieldMinimapRaid22:GetFrameLevel() + 1 ); |
||
793 | BattlefieldMinimapSpotRaid23:SetFrameLevel( BattlefieldMinimapRaid23:GetFrameLevel() + 1 ); |
||
794 | BattlefieldMinimapSpotRaid24:SetFrameLevel( BattlefieldMinimapRaid24:GetFrameLevel() + 1 ); |
||
795 | BattlefieldMinimapSpotRaid25:SetFrameLevel( BattlefieldMinimapRaid25:GetFrameLevel() + 1 ); |
||
796 | BattlefieldMinimapSpotRaid26:SetFrameLevel( BattlefieldMinimapRaid26:GetFrameLevel() + 1 ); |
||
797 | BattlefieldMinimapSpotRaid27:SetFrameLevel( BattlefieldMinimapRaid27:GetFrameLevel() + 1 ); |
||
798 | BattlefieldMinimapSpotRaid28:SetFrameLevel( BattlefieldMinimapRaid28:GetFrameLevel() + 1 ); |
||
799 | BattlefieldMinimapSpotRaid29:SetFrameLevel( BattlefieldMinimapRaid29:GetFrameLevel() + 1 ); |
||
800 | BattlefieldMinimapSpotRaid30:SetFrameLevel( BattlefieldMinimapRaid30:GetFrameLevel() + 1 ); |
||
801 | BattlefieldMinimapSpotRaid31:SetFrameLevel( BattlefieldMinimapRaid31:GetFrameLevel() + 1 ); |
||
802 | BattlefieldMinimapSpotRaid32:SetFrameLevel( BattlefieldMinimapRaid32:GetFrameLevel() + 1 ); |
||
803 | BattlefieldMinimapSpotRaid33:SetFrameLevel( BattlefieldMinimapRaid33:GetFrameLevel() + 1 ); |
||
804 | BattlefieldMinimapSpotRaid34:SetFrameLevel( BattlefieldMinimapRaid34:GetFrameLevel() + 1 ); |
||
805 | BattlefieldMinimapSpotRaid35:SetFrameLevel( BattlefieldMinimapRaid35:GetFrameLevel() + 1 ); |
||
806 | BattlefieldMinimapSpotRaid36:SetFrameLevel( BattlefieldMinimapRaid36:GetFrameLevel() + 1 ); |
||
807 | BattlefieldMinimapSpotRaid37:SetFrameLevel( BattlefieldMinimapRaid37:GetFrameLevel() + 1 ); |
||
808 | BattlefieldMinimapSpotRaid38:SetFrameLevel( BattlefieldMinimapRaid38:GetFrameLevel() + 1 ); |
||
809 | BattlefieldMinimapSpotRaid39:SetFrameLevel( BattlefieldMinimapRaid39:GetFrameLevel() + 1 ); |
||
810 | BattlefieldMinimapSpotRaid40:SetFrameLevel( BattlefieldMinimapRaid40:GetFrameLevel() + 1 ); |
||
811 | PartySpotterBFM:Show(); |
||
812 | end |
||
813 | |||
814 | |||
815 | |||
816 | function PartySpotter_UpdateFriends() |
||
817 | friendA = {}; |
||
818 | numberOfFriends = 0; |
||
819 | for i = 1, GetNumFriends(), 1 do |
||
820 | local fName = GetFriendInfo(i); |
||
821 | if ( ( fName ) and ( fName ~= "" ) ) then |
||
822 | friendA[fName] = "1"; |
||
823 | numberOfFriends = numberOfFriends + 1; |
||
824 | end |
||
825 | end |
||
826 | end |
||
827 | |||
828 | function PartySpotter_UpdateIgnores() |
||
829 | ignoreA = {}; |
||
830 | for i = 1, GetNumIgnores(), 1 do |
||
831 | local iName = GetIgnoreName(i); |
||
832 | if ( ( iName ) and ( iName ~= "" ) ) then |
||
833 | ignoreA[iName] = "1"; |
||
834 | end |
||
835 | end |
||
836 | local pKey = GetCVar("realmName"); |
||
837 | if ( ( InfinateIgnore_Config ) and ( InfinateIgnore_Config[pKey] ) and ( InfinateIgnore_Config[pKey].Ignoring ) ) then |
||
838 | local index, value; |
||
839 | for index, value in InfinateIgnore_Config[pKey].Ignoring do |
||
840 | local formattedCap = string.upper( string.sub(index, 1, 1) ); |
||
841 | local formattedRest = string.sub(index, 2, -1); |
||
842 | local formattedName = formattedCap..formattedRest; |
||
843 | ignoreA[formattedName] = "1"; |
||
844 | end |
||
845 | end |
||
846 | end |
||
847 | |||
848 | function PartySpotter_UpdateGuild() |
||
849 | GuildRoster(); |
||
850 | guildA = {}; |
||
851 | numberOfGuildMembers = 0; |
||
852 | for i = 1, GetNumGuildMembers(), 1 do |
||
853 | local gName = GetGuildRosterInfo(i); |
||
854 | if ( ( gName ) and ( gName ~= "" ) ) then |
||
855 | guildA[gName] = "1"; |
||
856 | numberOfGuildMembers = numberOfGuildMembers + 1; |
||
857 | end |
||
858 | end |
||
859 | end |
||
860 | |||
861 | |||
862 | |||
863 | function PartySpotter_Cycle_Mode() |
||
864 | if ( ( PartySpotterSettings.showGroups ) and ( PartySpotterSettings.showGroups == "Icons" ) ) then |
||
865 | PartySpotter_CmdLine("showgroups numbers"); |
||
866 | elseif ( ( PartySpotterSettings.showGroups ) and ( PartySpotterSettings.showGroups == "Numbers" ) ) then |
||
867 | PartySpotter_CmdLine("showgroups off"); |
||
868 | else |
||
869 | PartySpotter_CmdLine("showgroups icons"); |
||
870 | end |
||
871 | end |
||
872 | |||
873 | function PartySpotter_Cycle_Highlight() |
||
874 | if ( PartySpotterSettings.showFriends ) then |
||
875 | PartySpotter_CmdLine("toggleignores"); |
||
876 | elseif ( PartySpotterSettings.showIgnores ) then |
||
877 | PartySpotter_CmdLine("toggleguild"); |
||
878 | elseif ( PartySpotterSettings.showGuild ) then |
||
879 | PartySpotter_CmdLine("showguild"); |
||
880 | else |
||
881 | PartySpotter_CmdLine("togglefriends"); |
||
882 | end |
||
883 | end |
||
884 | |||
885 | |||
886 | |||
887 | |||
888 | |||
889 | function PartySpotter_Reset() |
||
890 | PartySpotterSettings.updateInterval = PSTOP_DEFAULT_INTERVAL; |
||
891 | PartySpotterSettings.showGroups = nil; |
||
892 | PartySpotterSettings.showFriends = nil; |
||
893 | PartySpotterSettings.showIgnores = nil; |
||
894 | PartySpotterSettings.showGuild = nil; |
||
895 | PartySpotterSettings.showLeader = nil; |
||
896 | singleOut = ""; |
||
897 | if ( highlightedGroup > 0 ) then |
||
898 | local dummyBttn = "nil"; |
||
899 | PartySpotter_KeyButton_OnClick(dummyBttn, highlightedGroup); |
||
900 | end |
||
901 | WorldMapPartySpotterKey:SetUserPlaced(0); |
||
902 | WorldMapPartySpotterKey:ClearAllPoints(); |
||
903 | WorldMapPartySpotterKey:SetPoint("BOTTOMRIGHT", WorldMapButton, "BOTTOMRIGHT", 0, 0); |
||
904 | |||
905 | if ( AlphaMapFrame ) then |
||
906 | AlphaMapPartySpotterKey:SetUserPlaced(0); |
||
907 | AlphaMapPartySpotterKey:ClearAllPoints(); |
||
908 | AlphaMapPartySpotterKey:SetPoint("BOTTOMRIGHT", AlphaMapFrame, "BOTTOMRIGHT", 0, 0); |
||
909 | end |
||
910 | end |