vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | local dewdrop = DewdropLib:GetInstance('1.0') |
2 | local tablet = TabletLib:GetInstance('1.0') |
||
3 | local metro = Metrognome:GetInstance('1') |
||
4 | |||
5 | FriendsFu = FuBarPlugin:GetInstance("1.2"):new({ |
||
6 | |||
7 | name = FriendsFULocals.NAME, |
||
8 | description = FriendsFULocals.DESCRIPTION, |
||
9 | version = "1.51", |
||
10 | releaseDate = "2006-05-13", |
||
11 | aceCompatible = 103, |
||
12 | author = "Garfield", |
||
13 | email = "f6_garfield@hotmail.com", |
||
14 | website = "", |
||
15 | category = "interface", |
||
16 | db = AceDatabase:new("FriendsFUDB"), |
||
17 | defaults = DEFAULT_OPTIONS, |
||
18 | cmd = AceChatCmd:new(FriendsFULocals.COMMANDS, FriendsFULocals.CMD_OPTIONS), |
||
19 | hasIcon = TRUE, |
||
20 | colorRank = "|cffff9933", |
||
21 | colorNotes = "|cffff9933", |
||
22 | colorLevel = "|cff33ff00", |
||
23 | loc = FriendsFULocals, |
||
24 | |||
25 | -- Methods |
||
26 | |||
27 | |||
28 | |||
29 | |||
30 | ToggleHideLocation = function(self) |
||
31 | self.data.hideLocation = not self.data.hideLocation |
||
32 | self:Update() |
||
33 | return self.data.hideLocation |
||
34 | end, |
||
35 | |||
36 | ToggleHideLevel = function(self) |
||
37 | self.data.hideLevel = not self.data.hideLevel |
||
38 | self:Update() |
||
39 | return self.data.hideLevel |
||
40 | end, |
||
41 | |||
42 | ToggleColorNames = function(self) |
||
43 | self.data.colornames = not self.data.colornames |
||
44 | self:Update() |
||
45 | return self.data.colornames |
||
46 | end, |
||
47 | |||
48 | ToggleHideLabel = function(self) |
||
49 | self.data.hideLabel = not self.data.hideLabel |
||
50 | self:Update() |
||
51 | return self.data.hideLabel |
||
52 | end, |
||
53 | |||
54 | ToggleHideTotal = function(self) |
||
55 | self.data.hideTotal = not self.data.hideTotal |
||
56 | self:Update() |
||
57 | return self.data.hideTotal |
||
58 | end, |
||
59 | |||
60 | ToggleHideClass = function(self) |
||
61 | self.data.hideClass = not self.data.hideClass |
||
62 | self:Update() |
||
63 | return self.data.hideClass |
||
64 | end, |
||
65 | |||
66 | ToggleOrder = function(self,selectorder) |
||
67 | self.data.SortOrder = selectorder |
||
68 | self:Update() |
||
69 | return true |
||
70 | end, |
||
71 | |||
72 | SetLeadText = function(self, txt) |
||
73 | txt = self:trim(txt) |
||
74 | if ( txt == "nil" ) then self.data.LeadText = nil else self.data.LeadText = text end |
||
75 | self:Update() |
||
76 | end, |
||
77 | |||
78 | trim = function(self,s) |
||
79 | return (string.gsub(s, "^%s*(.-)%s*$", "%1")) |
||
80 | end, |
||
81 | |||
82 | SetLevelRange = function(self, txt) |
||
83 | txt = tonumber(txt) |
||
84 | if ((txt < 0) or (txt > 10) )then self.data.levelrange = nil else self.data.levelrange = txt end |
||
85 | end, |
||
86 | |||
87 | SetRefreshRate = function(self, txt) |
||
88 | txt = tonumber(txt) |
||
89 | if ((txt < 1) or (txt > 300) )then self.data.refreshrate = nil else self.data.refreshrate = txt end |
||
90 | metro:Stop(self.loc.NAME) |
||
91 | metro:Unregister(self.loc.NAME) |
||
92 | metro:Register(self.loc.NAME, prepare_data, self.data.refreshrate or self.loc.REFRESHINTERVAL,self) |
||
93 | metro:Start(self.loc.NAME) |
||
94 | end, |
||
95 | |||
96 | MenuSettings = function(self,level,value) |
||
97 | |||
98 | local pagingRemainder, numPages, pagemenu, info |
||
99 | if ( level == 3 ) then |
||
100 | if (value == self.loc.MENU_FILTER_CLASS) then |
||
101 | local classindex, classListValues |
||
102 | local playerFaction = "" |
||
103 | playerFaction = UnitFactionGroup("player") |
||
104 | if (playerFaction == "Horde") then |
||
105 | classListValues = self.loc.hordeClassValues |
||
106 | else |
||
107 | classListValues = self.loc.allianceClassValues |
||
108 | end |
||
109 | for classindex=1,table.getn(classListValues) do |
||
110 | checked = false |
||
111 | if ( classindex==1 and not self.data.filterclass ) then checked = true end |
||
112 | if ( self.data.filterclass and self.data.filterclass[classListValues[classindex]] ) then checked = true end |
||
113 | dewdrop:AddLine ( |
||
114 | 'text' , classListValues[classindex], |
||
115 | 'value' , classListValues[classindex], |
||
116 | 'func' , function(myclass) self:FilterClass(myclass) end, |
||
117 | 'arg1', classListValues[classindex], |
||
118 | 'checked' , checked) |
||
119 | end |
||
120 | end |
||
121 | if (value == self.loc.MENU_FILTER_LEVEL) then |
||
122 | checked = false |
||
123 | if ( self.data.filterlevel == self.loc.allianceClassValues[1] or not self.data.filterclass ) then checked = true end |
||
124 | dewdrop:AddLine( |
||
125 | 'text', self.loc.allianceClassValues[1], |
||
126 | 'value' , self.loc.allianceClassValues[1], |
||
127 | 'func', function() self:FilterLevel(self.loc.allianceClassValues[1]) end, |
||
128 | 'checked',checked) |
||
129 | |||
130 | checked = false |
||
131 | if ( self.data.filterlevel == "levelrange" ) then checked = true end |
||
132 | dewdrop:AddLine( |
||
133 | 'text',string.format("+/- %i from your level", self.data.levelrange or self.loc.MENU_FILTER_LEVELRANGE), |
||
134 | 'value', "levelrange", |
||
135 | 'func', function() self:FilterLevel("levelrange") end, |
||
136 | 'checked',checked) |
||
137 | |||
138 | local index, minlvl,maxlvl |
||
139 | for index=0,5 do |
||
140 | info = {} |
||
141 | minlvl = index *10 |
||
142 | maxlvl = index *10 + 9 |
||
143 | if (minlvl == 0) then minlvl = 1 end |
||
144 | checked = false |
||
145 | myvalue = string.format("level%i",index) |
||
146 | if ( self.data.filterlevel == myvalue ) then checked = true end |
||
147 | dewdrop:AddLine( |
||
148 | 'text', string.format("From level %i to %i", minlvl , maxlvl), |
||
149 | 'value', myvalue, |
||
150 | 'func', function(myarg) self:FilterLevel(myarg) end, |
||
151 | 'arg1', myvalue, |
||
152 | 'checked',checked) |
||
153 | end |
||
154 | checked = false |
||
155 | if ( self.data.filterlevel == "level6" ) then checked = true end |
||
156 | dewdrop:AddLine( |
||
157 | 'text', string.format("Level %i", self.loc.WowMaxLevel), |
||
158 | 'value', "level6", |
||
159 | 'func', function() self:FilterLevel("level6") end, |
||
160 | 'checked',checked) |
||
161 | end |
||
162 | if (value == self.loc.MENU_FILTER_ZONE) then |
||
163 | for i=1,table.getn(self.loc.MENU_FILTERS_ZONE) do |
||
164 | local checked = false |
||
165 | if self.data.filterzone and self.data.filterzone[self.loc.MENU_FILTERS_ZONE[i]] then checked = true end |
||
166 | dewdrop:AddLine( |
||
167 | 'text', self.loc.MENU_FILTERS_ZONE[i], |
||
168 | 'value', self.loc.MENU_FILTERS_ZONE[i], |
||
169 | 'func', function(myzone) self:FilterZone(myzone) end, |
||
170 | 'arg1', self.loc.MENU_FILTERS_ZONE[i], |
||
171 | 'checked',checked) |
||
172 | end |
||
173 | end |
||
174 | end |
||
175 | |||
176 | if ( level == 2 ) then |
||
177 | |||
178 | if ( value == self.loc.MENU_INVITE or value == self.loc.MENU_WHISPER) then |
||
179 | local friendIndex |
||
180 | |||
181 | for friendIndex=1 , table.getn(self.data.FriendTable) do |
||
182 | if ( value == self.loc.MENU_INVITE ) then |
||
183 | myfunc = function(myfriend) self:friendInvite(myfriend) end |
||
184 | else |
||
185 | myfunc = function(myfriend) self:friendWhisper(myfriend) end |
||
186 | end |
||
187 | dewdrop:AddLine( |
||
188 | 'text',self.data.FriendTable[friendIndex][1], |
||
189 | 'value', self.data.FriendTable[friendIndex][1], |
||
190 | 'func', myfunc, |
||
191 | 'arg1', self.data.FriendTable[friendIndex][1] |
||
192 | ) |
||
193 | |||
194 | end |
||
195 | end |
||
196 | if ( value == self.loc.MENU_DISPLAY ) then |
||
197 | dewdrop:AddLine( |
||
198 | 'text', self.loc.MENU_SHOW_LOCATION, |
||
199 | 'value', self.loc.MENU_SHOW_LOCATION, |
||
200 | 'func', function() self:ToggleHideLocation() end, |
||
201 | 'checked', not self.data.hideLocation, |
||
202 | 'closeWhenClicked', false) |
||
203 | |||
204 | dewdrop:AddLine( |
||
205 | 'text', self.loc.MENU_SHOW_LEVEL, |
||
206 | 'value', self.loc.MENU_SHOW_LEVEL, |
||
207 | 'func', function() self:ToggleHideLevel() end, |
||
208 | 'checked', not self.data.hideLevel, |
||
209 | 'closeWhenClicked', false) |
||
210 | |||
211 | dewdrop:AddLine( |
||
212 | 'text', self.loc.MENU_SHOW_CLASS, |
||
213 | 'value', self.loc.MENU_SHOW_CLASS, |
||
214 | 'func', function() self:ToggleHideClass() end, |
||
215 | 'checked', not self.data.hideClass, |
||
216 | 'closeWhenClicked', false) |
||
217 | |||
218 | dewdrop:AddLine( |
||
219 | 'text', self.loc.MENU_SHOW_LABEL, |
||
220 | 'value', self.loc.MENU_SHOW_LABEL, |
||
221 | 'func', function() self:ToggleHideLabel() end, |
||
222 | 'checked', not self.data.hideLabel, |
||
223 | 'closeWhenClicked', false) |
||
224 | |||
225 | dewdrop:AddLine( |
||
226 | 'text', self.loc.MENU_SHOW_TOTAL, |
||
227 | 'value', self.loc.MENU_SHOW_TOTAL, |
||
228 | 'func', function() self:ToggleHideTotal() end, |
||
229 | 'checked', not self.data.hideTotal, |
||
230 | 'closeWhenClicked', false) |
||
231 | |||
232 | dewdrop:AddLine( |
||
233 | 'text', self.loc.MENU_COLORNAMES, |
||
234 | 'value', self.loc.MENU_COLORNAMES, |
||
235 | 'func', function() self:ToggleColorNames() end, |
||
236 | 'checked', self.data.colornames, |
||
237 | 'closeWhenClicked', false) |
||
238 | |||
239 | end |
||
240 | if ( value == self.loc.MENU_ORDER ) then |
||
241 | local checked = false |
||
242 | if ( self.data.SortOrder == self.loc.MENU_ORDER_LOCATION) then checked = true end |
||
243 | dewdrop:AddLine( |
||
244 | 'text', self.loc.MENU_ORDER_LOCATION, |
||
245 | 'value', self.loc.MENU_ORDER_LOCATION, |
||
246 | 'func', function() self:ToggleOrder(self.loc.MENU_ORDER_LOCATION) end, |
||
247 | 'checked', checked) |
||
248 | |||
249 | checked = false |
||
250 | if ( self.data.SortOrder == self.loc.MENU_ORDER_LEVEL) then checked = true end |
||
251 | dewdrop:AddLine( |
||
252 | 'text', self.loc.MENU_ORDER_LEVEL, |
||
253 | 'value', self.loc.MENU_ORDER_LEVEL, |
||
254 | 'func', function() self:ToggleOrder(self.loc.MENU_ORDER_LEVEL) end, |
||
255 | 'checked', checked) |
||
256 | |||
257 | checked = false |
||
258 | if ( self.data.SortOrder == self.loc.MENU_ORDER_CLASS) then checked = true end |
||
259 | dewdrop:AddLine( |
||
260 | 'text', self.loc.MENU_ORDER_CLASS, |
||
261 | 'value', self.loc.MENU_ORDER_CLASS, |
||
262 | 'func', function() self:ToggleOrder(self.loc.MENU_ORDER_CLASS) end, |
||
263 | 'checked', checked) |
||
264 | |||
265 | checked = false |
||
266 | if ( self.data.SortOrder == self.loc.MENU_ORDER_NAME) then checked = true end |
||
267 | dewdrop:AddLine( |
||
268 | 'text', self.loc.MENU_ORDER_NAME, |
||
269 | 'value', self.loc.MENU_ORDER_NAME, |
||
270 | 'func', function() self:ToggleOrder(self.loc.MENU_ORDER_NAME) end, |
||
271 | 'checked', checked) |
||
272 | |||
273 | end |
||
274 | |||
275 | if ( value == self.loc.MENU_FILTER ) then |
||
276 | dewdrop:AddLine( |
||
277 | 'text', self.loc.MENU_FILTER_CLASS, |
||
278 | 'value',self.loc.MENU_FILTER_CLASS, |
||
279 | 'hasArrow', true) |
||
280 | |||
281 | dewdrop:AddLine( |
||
282 | 'text', self.loc.MENU_FILTER_LEVEL, |
||
283 | 'value',self.loc.MENU_FILTER_LEVEL, |
||
284 | 'hasArrow', true) |
||
285 | |||
286 | dewdrop:AddLine( |
||
287 | 'text', self.loc.MENU_FILTER_ZONE, |
||
288 | 'value',self.loc.MENU_FILTER_ZONE, |
||
289 | 'hasArrow', true) |
||
290 | end |
||
291 | end |
||
292 | if ( level == 1 ) then |
||
293 | dewdrop:AddLine( |
||
294 | 'text', self.loc.MENU_INVITE, |
||
295 | 'value',self.loc.MENU_INVITE, |
||
296 | 'hasArrow', true) |
||
297 | |||
298 | dewdrop:AddLine( |
||
299 | 'text', self.loc.MENU_WHISPER, |
||
300 | 'value',self.loc.MENU_WHISPER, |
||
301 | 'hasArrow', true) |
||
302 | |||
303 | |||
304 | dewdrop:AddLine() |
||
305 | |||
306 | dewdrop:AddLine( |
||
307 | 'text', self.loc.MENU_DISPLAY, |
||
308 | 'value',self.loc.MENU_DISPLAY, |
||
309 | 'hasArrow', true) |
||
310 | |||
311 | dewdrop:AddLine( |
||
312 | 'text', self.loc.MENU_ORDER, |
||
313 | 'value',self.loc.MENU_ORDER, |
||
314 | 'hasArrow', true) |
||
315 | |||
316 | dewdrop:AddLine( |
||
317 | 'text', self.loc.MENU_FILTER, |
||
318 | 'value',self.loc.MENU_FILTER, |
||
319 | 'hasArrow', true) |
||
320 | |||
321 | end |
||
322 | end, |
||
323 | |||
324 | Initialize = function(self) |
||
325 | self:Show() |
||
326 | if GetNumFriends() == 0 then self:Hide() end |
||
327 | end, |
||
328 | |||
329 | Enable = function(self) |
||
330 | self:RegisterEvent("GUILD_ROSTER_SHOW","Update") |
||
331 | self:RegisterEvent("GUILD_ROSTER_UPDATE","Update") |
||
332 | self:RegisterEvent("GUILD_REGISTRAR_SHOW","Update") |
||
333 | self:RegisterEvent("GUILD_REGISTRAR_CLOSED","Update") |
||
334 | self:RegisterEvent("PLAYER_ENTERING_WORLD","Update") |
||
335 | self:RegisterEvent("CHAT_MSG_SYSTEM","SystemMessage") |
||
336 | metro:Register(self.loc.NAME, self.prepare_data, self.data.refreshrate or self.loc.REFRESHINTERVAL,self) |
||
337 | metro:Start(self.loc.NAME) |
||
338 | |||
339 | end, |
||
340 | |||
341 | Disable = function(self) |
||
342 | metro:Unregister(self.loc.NAME) |
||
343 | end, |
||
344 | |||
345 | prepare_data = function(self) |
||
346 | self:UpdateData() |
||
347 | self:UpdateText() |
||
348 | end, |
||
349 | |||
350 | SystemMessage = function(self) |
||
351 | if ( string.find(arg1, self.loc.SYSMSG_ONLINE) or string.find(arg1, self.loc.SYSMSG_OFFLINE) or string.find(arg1, self.loc.SYSMSG_ADDED) or string.find(arg1, self.loc.SYSMSG_REMOVED) ) then |
||
352 | self:Update() |
||
353 | end |
||
354 | end, |
||
355 | |||
356 | friendInvite = function(self,name) |
||
357 | InviteByName( name ) |
||
358 | end, |
||
359 | |||
360 | FilterClass = function(self, selectclass) |
||
361 | if selectclass == self.loc.allianceClassValues[1] then |
||
362 | self.data.filterclass = nil |
||
363 | else |
||
364 | if not self.data.filterclass then self.data.filterclass={} end |
||
365 | if self.data.filterclass[selectclass] then self.data.filterclass[selectclass]=nil else self.data.filterclass[selectclass]=TRUE end |
||
366 | end |
||
367 | self:Update() |
||
368 | end, |
||
369 | |||
370 | FilterLevel = function(self,selectlevel) |
||
371 | self.data.filterlevel=selectlevel |
||
372 | self:Update() |
||
373 | end, |
||
374 | |||
375 | FilterZone = function(self, selectzone) |
||
376 | if not self.data.filterzone then self.data.filterzone={} end |
||
377 | if self.data.filterzone[selectzone] then self.data.filterzone[selectzone]=nil else self.data.filterzone[selectzone]=TRUE end |
||
378 | self:Update() |
||
379 | end, |
||
380 | |||
381 | passfilter = function(self,info) |
||
382 | local filterclass,filterlevel,filterzone |
||
383 | |||
384 | |||
385 | if ( self.data.filterclass ) then |
||
386 | if ( self.data.filterclass[info[3]] ) then filterclass = true end |
||
387 | else |
||
388 | filterclass = true |
||
389 | end |
||
390 | |||
391 | if ( self.data.filterlevel and self.data.filterlevel ~= self.loc.allianceClassValues[1] ) then |
||
392 | local minlvl, maxlvl |
||
393 | local wowmaxlvl |
||
394 | |||
395 | if ( self.data.filterlevel == "levelrange" ) then |
||
396 | local mylvl = UnitLevel("player") |
||
397 | minlvl = mylvl - ( self.data.levelrange or self.loc.MENU_FILTER_LEVELRANGE) |
||
398 | maxlvl = mylvl + ( self.data.levelrange or self.loc.MENU_FILTER_LEVELRANGE ) |
||
399 | else |
||
400 | local lvl |
||
401 | lvl = tonumber(string.sub(self.data.filterlevel,-1,-1)) |
||
402 | minlvl = lvl * 10 |
||
403 | maxlvl = lvl * 10 + 9 |
||
404 | end |
||
405 | wowmaxlvl = self.loc.WowMaxLevel |
||
406 | if ( minlvl < 1 ) then minlvl = 1 end |
||
407 | if ( maxlvl < 1 ) then maxlvl = 1 end |
||
408 | if ( minlvl > wowmaxlvl ) then minlvl = wowmaxlvl end |
||
409 | if ( maxlvl > wowmaxlvl ) then maxlvl = wowmaxlvl end |
||
410 | if ( minlvl <= info[2] and maxlvl >= info[2] ) then filterlevel = true end |
||
411 | else |
||
412 | filterlevel = true |
||
413 | end |
||
414 | |||
415 | if ( self.data.filterzone ) then |
||
416 | filterzone = true |
||
417 | if self.data.filterzone[self.loc.MENU_FILTERS_ZONE[1]] then |
||
418 | if (info[4] ~= GetZoneText() ) then filterzone = nil end |
||
419 | end |
||
420 | if self.data.filterzone[self.loc.MENU_FILTERS_ZONE[2]] then |
||
421 | if (self.loc.dungeonlist[info[4]] ) then filterzone = nil end |
||
422 | end |
||
423 | if self.data.filterzone[self.loc.MENU_FILTERS_ZONE[3]] then |
||
424 | if (self.loc.battlegroundlist[info[4]] ) then filterzone = nil end |
||
425 | end |
||
426 | else |
||
427 | filterzone = true |
||
428 | end |
||
429 | return filterclass and filterlevel and filterzone |
||
430 | end, |
||
431 | |||
432 | friendWhisper= function(self,name) |
||
433 | if ( not ChatFrameEditBox:IsVisible() ) then |
||
434 | ChatFrame_OpenChat(string.format("/w %s ",name)) |
||
435 | else |
||
436 | ChatFrameEditBox:SetText(string.format("/w %s ",name)) |
||
437 | end |
||
438 | end , |
||
439 | |||
440 | |||
441 | UpdateData = function(self) |
||
442 | |||
443 | local NumFriends = GetNumFriends() |
||
444 | local NumFriendsOnline = 0 |
||
445 | local friend_name, friend_level, friend_class, friend_area, friend_connected, friend_rank, rankIndex, note, officernote, status |
||
446 | local friendIndex |
||
447 | local friendtable={} |
||
448 | |||
449 | ShowFriends() |
||
450 | for friendIndex=1, NumFriends do |
||
451 | friend_name, friend_level, friend_class, friend_area, friend_connected = GetFriendInfo(friendIndex) |
||
452 | if (not friend_area) then friend_area = " . " end |
||
453 | if ( friend_connected ) then |
||
454 | if ( self:passfilter({friend_name, friend_level,friend_class, friend_area} ) )then |
||
455 | NumFriendsOnline = NumFriendsOnline + 1 |
||
456 | table.insert(friendtable,{friend_name, friend_level,friend_class, friend_area}) |
||
457 | end |
||
458 | end |
||
459 | end |
||
460 | if ( self.data.SortOrder == self.loc.MENU_ORDER_LOCATION ) then table.sort(friendtable, function(a,b) return a[4]<b[4] end) end |
||
461 | if ( self.data.SortOrder == self.loc.MENU_ORDER_LEVEL ) then table.sort(friendtable, function(a,b) return a[2]>b[2] end) end |
||
462 | if ( self.data.SortOrder == self.loc.MENU_ORDER_CLASS ) then table.sort(friendtable, function(a,b) return a[3]<b[3] end) end |
||
463 | if ( self.data.SortOrder == self.loc.MENU_ORDER_NAME ) then table.sort(friendtable, function(a,b) return a[1]<b[1] end) end |
||
464 | |||
465 | self.data.NumOnline = NumFriendsOnline |
||
466 | self.data.NumMaximum = NumFriends |
||
467 | self.data.FriendTable = friendtable |
||
468 | end, |
||
469 | |||
470 | UpdateText = function(self) |
||
471 | local tekst |
||
472 | if ( self.data.hideTotal ) then |
||
473 | tekst =self.data.NumOnline |
||
474 | else |
||
475 | tekst = string.format("%i/%i",self.data.NumOnline, self.data.NumMaximum ) |
||
476 | end |
||
477 | if (not self.data.hideLabel ) then |
||
478 | if self.data.LeadText then tekst = string.format("%s %s",self.data.LeadText or "",tekst) end |
||
479 | end |
||
480 | self:SetText(tekst) |
||
481 | end, |
||
482 | |||
483 | UpdateTooltip = function(self) |
||
484 | local lijn1, lijn2 |
||
485 | local friendIndex, friend_name,friend_class,friend_level,friend_area |
||
486 | |||
487 | local cat = tablet:AddCategory('columns', 4) |
||
488 | |||
489 | for friendIndex=1, table.getn(self.data.FriendTable) do |
||
490 | friend_name = self.data.FriendTable[friendIndex][1] |
||
491 | friend_level = string.format("%s%s|r",self.colorLevel,self.data.FriendTable[friendIndex][2]) |
||
492 | friend_color = self.loc.colorclasses[self.data.FriendTable[friendIndex][3]] |
||
493 | friend_class = string.format("%s%s|r",friend_color,self.data.FriendTable[friendIndex][3]) |
||
494 | friend_area = self.data.FriendTable[friendIndex][4] |
||
495 | if ( self.data.colornames ) then friend_name = string.format("%s%s|r",friend_color,friend_name) end |
||
496 | if (self.data.hideLocation ) then |
||
497 | friend_area = "" |
||
498 | end |
||
499 | if ( self.data.hideLevel ) then |
||
500 | friend_level = "" |
||
501 | end |
||
502 | if ( self.data.hideClass ) then |
||
503 | friend_class = "" |
||
504 | end |
||
505 | |||
506 | cat:AddLine( |
||
507 | 'text' , friend_name, |
||
508 | 'text2', friend_area, |
||
509 | 'text3', friend_level, |
||
510 | 'text4', friend_class, |
||
511 | 'justify', "LEFT", |
||
512 | 'justify2', "LEFT", |
||
513 | 'justify3', "RIGHT", |
||
514 | 'justify4', "RIGHT" |
||
515 | ) |
||
516 | end |
||
517 | end, |
||
518 | |||
519 | OnClick = function(self) |
||
520 | ToggleFriendsFrame(1) |
||
521 | FriendsFrame.showFriendsList = true |
||
522 | FriendsFrame_Update() |
||
523 | end, |
||
524 | |||
525 | }) |
||
526 | |||
527 | FriendsFu:RegisterForLoad() |