This commit is contained in:
Bunny67
2018-07-14 21:11:44 +03:00
parent e2cd058116
commit 7f34a602b9
2 changed files with 18 additions and 19 deletions
+4 -8
View File
@@ -129,14 +129,12 @@ local function OnClick()
if arg1 == "RightButton" then
local menuCountWhispers = 0
local menuCountInvites = 0
local classc, levelc, info
local classc, levelc
menuList[2].menuList = {}
menuList[3].menuList = {}
if getn(friendTable) > 0 then
for i = 1, getn(friendTable) do
info = friendTable[i]
for _, info in friendTable do
if info[5] then
menuCountInvites = menuCountInvites + 1
menuCountWhispers = menuCountWhispers + 1
@@ -148,7 +146,6 @@ local function OnClick()
menuList[3].menuList[menuCountWhispers] = {text = format(levelNameString, levelc.r*255,levelc.g*255,levelc.b*255, info[2],classc.r*255,classc.g*255,classc.b*255, info[1]), arg1 = info[1], notCheckable = true, func = whisperClick}
end
end
end
L_EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 2)
else
ToggleFriendsFrame(1)
@@ -166,11 +163,10 @@ local function OnEnter(self)
dataValid = true
end
local zonec, classc, levelc, info
local zonec, classc, levelc
DT.tooltip:AddDoubleLine(FRIENDS_LIST, format(totalOnlineString, onlineFriends, numberOfFriends), tthead.r, tthead.g, tthead.b, tthead.r, tthead.g, tthead.b)
if onlineFriends > 0 then
for i = 1, getn(friendTable) do
info = friendTable[i]
for _, info in friendTable do
if info[5] then
if GetRealZoneText() == info[4] then zonec = activezone else zonec = inactivezone end
+7 -4
View File
@@ -5,7 +5,7 @@ local DT = E:GetModule("DataTexts")
--Lua functions
local select, unpack = select, unpack
local format, find, join, upper = string.format, string.find, string.join, string.upper
local getn, sort, wipe = table.getn, table.sort, table.wipe
local getn, tinsert, sort, wipe = table.getn, table.insert, table.sort, table.wipe
--WoW API / Variables
local CreateFrame = CreateFrame
local GetGuildInfo = GetGuildInfo
@@ -22,7 +22,8 @@ local IsShiftKeyDown = IsShiftKeyDown
local L_EasyMenu = L_EasyMenu
local SetItemRef = SetItemRef
local ToggleFriendsFrame = ToggleFriendsFrame
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
local LOCALIZED_CLASS_NAMES_FEMALE = LOCALIZED_CLASS_NAMES_FEMALE
local CHAT_MSG_WHISPER_INFORM, GUILD, GUILD_MOTD, GUILD_ONLINE_LABEL, GUILD_RANK1_DESC = CHAT_MSG_WHISPER_INFORM, GUILD, GUILD_MOTD, GUILD_ONLINE_LABEL, GUILD_RANK1_DESC
local LABEL_NOTE, OPTIONS_MENU, PARTY_INVITE = LABEL_NOTE, OPTIONS_MENU, PARTY_INVITE
@@ -75,7 +76,9 @@ local function BuildGuildTable()
if not name then break end
if online then
guildTable[getn(guildTable) + 1] = {name, rank, level, zone, note, officernote, online, upper(class), rankIndex}
for k, v in pairs(LOCALIZED_CLASS_NAMES_MALE) do if class == v then class = k end end
for k, v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do if class == v then class = k end end
tinsert(guildTable, {name, rank, level, zone, note, officernote, online, class, rankIndex})
end
end
end
@@ -148,7 +151,7 @@ local function OnClick()
for i = 1, getn(guildTable) do
info = guildTable[i]
if info[7] and info[1] ~= E.myname then
classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[8]], GetQuestDifficultyColor(info[3])
classc, levelc = (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[8]], GetQuestDifficultyColor(info[3])
menuCountInvites = menuCountInvites + 1
menuList[2].menuList[menuCountInvites] = {text = format(levelNameString, levelc.r*255,levelc.g*255,levelc.b*255, info[3], classc.r*255,classc.g*255,classc.b*255, info[1], ""), arg1 = info[1],notCheckable=true, func = inviteClick}