Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Crum
2018-07-14 15:04:22 -05:00
12 changed files with 28 additions and 55 deletions
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "重设位置"
L["Sort Bags"] = "背包整理" L["Sort Bags"] = "背包整理"
L["Temporary Move"] = "移动背包" L["Temporary Move"] = "移动背包"
L["Toggle Bags"] = "背包开关" L["Toggle Bags"] = "背包开关"
L["Toggle Key"] = true;
L["Vendor Grays"] = "出售灰色物品" L["Vendor Grays"] = "出售灰色物品"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = true;
L["Sort Bags"] = true; L["Sort Bags"] = true;
L["Temporary Move"] = true; L["Temporary Move"] = true;
L["Toggle Bags"] = true; L["Toggle Bags"] = true;
L["Toggle Key"] = true;
L["Vendor Grays"] = true; L["Vendor Grays"] = true;
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "Réinitialiser la position"
L["Sort Bags"] = "Trier les sacs" L["Sort Bags"] = "Trier les sacs"
L["Temporary Move"] = "Déplacer temporairement" L["Temporary Move"] = "Déplacer temporairement"
L["Toggle Bags"] = "Afficher les sacs" L["Toggle Bags"] = "Afficher les sacs"
L["Toggle Key"] = true;
L["Vendor Grays"] = "Vendre les objets gris" L["Vendor Grays"] = "Vendre les objets gris"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "Position zurücksetzen"
L["Sort Bags"] = "Taschen sortieren" L["Sort Bags"] = "Taschen sortieren"
L["Temporary Move"] = "Temporäres Bewegen" L["Temporary Move"] = "Temporäres Bewegen"
L["Toggle Bags"] = "Taschen umschalten" L["Toggle Bags"] = "Taschen umschalten"
L["Toggle Key"] = true;
L["Vendor Grays"] = "Graue Gegenstände verkaufen" L["Vendor Grays"] = "Graue Gegenstände verkaufen"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "위치 초기화"
L["Sort Bags"] = "가방 정렬" L["Sort Bags"] = "가방 정렬"
L["Temporary Move"] = "임시 이동" L["Temporary Move"] = "임시 이동"
L["Toggle Bags"] = "가방슬롯 보기" L["Toggle Bags"] = "가방슬롯 보기"
L["Toggle Key"] = true;
L["Vendor Grays"] = "잡동사니 자동판매" L["Vendor Grays"] = "잡동사니 자동판매"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "Redefinir Posição"
L["Sort Bags"] = "Organizar Bolsas" L["Sort Bags"] = "Organizar Bolsas"
L["Temporary Move"] = "Mover Temporariamente" L["Temporary Move"] = "Mover Temporariamente"
L["Toggle Bags"] = "Mostrar/Ocultar Bolsas" L["Toggle Bags"] = "Mostrar/Ocultar Bolsas"
L["Toggle Key"] = true;
L["Vendor Grays"] = "Vender Itens Cinzentos" L["Vendor Grays"] = "Vender Itens Cinzentos"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "Сбросить позицию"
L["Sort Bags"] = "Сортировать" L["Sort Bags"] = "Сортировать"
L["Temporary Move"] = "Временное перемещение" L["Temporary Move"] = "Временное перемещение"
L["Toggle Bags"] = "Показать сумки" L["Toggle Bags"] = "Показать сумки"
L["Toggle Key"] = "Показать ключи"
L["Vendor Grays"] = "Продавать серые предметы" L["Vendor Grays"] = "Продавать серые предметы"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "Reestablecer Posición"
L["Sort Bags"] = "Ordenar Bolsas" L["Sort Bags"] = "Ordenar Bolsas"
L["Temporary Move"] = "Movimiento Temporal" L["Temporary Move"] = "Movimiento Temporal"
L["Toggle Bags"] = "Mostrar/Ocultar Bolsas" L["Toggle Bags"] = "Mostrar/Ocultar Bolsas"
L["Toggle Key"] = true;
L["Vendor Grays"] = "Vender Objetos Grises" L["Vendor Grays"] = "Vender Objetos Grises"
--Chat --Chat
-1
View File
@@ -38,7 +38,6 @@ L["Reset Position"] = "重設位置"
L["Sort Bags"] = "整理背包" L["Sort Bags"] = "整理背包"
L["Temporary Move"] = "移動背包" L["Temporary Move"] = "移動背包"
L["Toggle Bags"] = "開啟/關閉背包" L["Toggle Bags"] = "開啟/關閉背包"
L["Toggle Key"] = true;
L["Vendor Grays"] = "出售灰色物品" L["Vendor Grays"] = "出售灰色物品"
--Chat --Chat
+2 -1
View File
@@ -47,6 +47,7 @@ local KEYRING_CONTAINER = KEYRING_CONTAINER
local MAX_CONTAINER_ITEMS = MAX_CONTAINER_ITEMS local MAX_CONTAINER_ITEMS = MAX_CONTAINER_ITEMS
local NUM_BAG_FRAMES = NUM_BAG_FRAMES local NUM_BAG_FRAMES = NUM_BAG_FRAMES
local NUM_CONTAINER_FRAMES = NUM_CONTAINER_FRAMES local NUM_CONTAINER_FRAMES = NUM_CONTAINER_FRAMES
local BINDING_NAME_TOGGLEKEYRING = BINDING_NAME_TOGGLEKEYRING
local SEARCH = SEARCH local SEARCH = SEARCH
local SEARCH_STRING = "" local SEARCH_STRING = ""
@@ -973,7 +974,7 @@ function B:ContructContainerFrame(name, isBank)
f.keyButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords)) f.keyButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords))
E:SetInside(f.keyButton:GetPushedTexture()) E:SetInside(f.keyButton:GetPushedTexture())
E:StyleButton(f.keyButton, nil, true) E:StyleButton(f.keyButton, nil, true)
f.keyButton.ttText = L["Toggle Key"] f.keyButton.ttText = BINDING_NAME_TOGGLEKEYRING
f.keyButton:SetScript("OnEnter", self.Tooltip_Show) f.keyButton:SetScript("OnEnter", self.Tooltip_Show)
f.keyButton:SetScript("OnLeave", self.Tooltip_Hide) f.keyButton:SetScript("OnLeave", self.Tooltip_Hide)
f.keyButton:SetScript("OnClick", function() ToggleFrame(f.keyFrame) end) f.keyButton:SetScript("OnClick", function() ToggleFrame(f.keyFrame) end)
+2 -5
View File
@@ -8,11 +8,10 @@ local pairs = pairs
local format, join, upper = string.format, string.join, string.upper local format, join, upper = string.format, string.join, string.upper
--WoW API / Variables --WoW API / Variables
local GetInventoryItemDurability = GetInventoryItemDurability local GetInventoryItemDurability = GetInventoryItemDurability
local GetInventoryItemTexture = GetInventoryItemTexture
local GetInventorySlotInfo = GetInventorySlotInfo local GetInventorySlotInfo = GetInventorySlotInfo
local ToggleCharacter = ToggleCharacter local ToggleCharacter = ToggleCharacter
local DURABILITY = "Durability" local DURABILITY = "Durability" -- Need add in locales
local displayString = "" local displayString = ""
local tooltipString = "%d%%" local tooltipString = "%d%%"
@@ -33,7 +32,7 @@ local slots = {
"HeadSlot" "HeadSlot"
} }
local function OnEvent(self, t) local function OnEvent(self)
lastPanel = self lastPanel = self
totalDurability = 100 totalDurability = 100
@@ -42,8 +41,6 @@ local function OnEvent(self, t)
current, max = GetInventoryItemDurability(slot) current, max = GetInventoryItemDurability(slot)
if current then if current then
current, max = GetInventoryItemDurability(slot)
invDurability[value] = (current / max) * 100 invDurability[value] = (current / max) * 100
if ((current / max) * 100) < totalDurability then if ((current / max) * 100) < totalDurability then
+24 -40
View File
@@ -3,31 +3,25 @@ local DT = E:GetModule("DataTexts");
--Cache global variables --Cache global variables
--Lua functions --Lua functions
local type, pairs = type, pairs local pairs = pairs
local sort, wipe = table.sort, wipe local tinsert, sort, wipe, next = table.insert, table.sort, wipe, next
local format, find, join, gsub = string.format, string.find, string.join, string.gsub local format, find, join, gsub = string.format, string.find, string.join, string.gsub
--WoW API / Variables --WoW API / Variables
local UnitIsAFK = UnitIsAFK
local UnitIsDND = UnitIsDND
local SendChatMessage = SendChatMessage local SendChatMessage = SendChatMessage
local InviteByName = InviteByName local InviteByName = InviteByName
local SetItemRef = SetItemRef local SetItemRef = SetItemRef
local GetFriendInfo = GetFriendInfo local GetFriendInfo = GetFriendInfo
local GetNumFriends = GetNumFriends local GetNumFriends = GetNumFriends
local GetQuestDifficultyColor = GetQuestDifficultyColor local GetQuestDifficultyColor = GetQuestDifficultyColor
local UnitInParty = UnitInParty
local UnitInRaid = UnitInRaid
local ToggleFriendsFrame = ToggleFriendsFrame local ToggleFriendsFrame = ToggleFriendsFrame
local L_EasyMenu = L_EasyMenu
local AVAILABLE, CHAT_MSG_AFK, CHAT_MSG_DND, CHAT_MSG_WHISPER_INFORM = AVAILABLE, CHAT_MSG_AFK, CHAT_MSG_DND, CHAT_MSG_WHISPER_INFORM local CHAT_MSG_AFK = CHAT_MSG_AFK
local ERR_FRIEND_ONLINE_SS, ERR_FRIEND_OFFLINE_S, FRIENDS, FRIENDS_LIST = ERR_FRIEND_ONLINE_SS, ERR_FRIEND_OFFLINE_S, FRIENDS, FRIENDS_LIST local CHAT_MSG_DND = CHAT_MSG_DND
local GUILD_ONLINE_LABEL, OPTIONS_MENU, PARTY_INVITE, PLAYER_STATUS = GUILD_ONLINE_LABEL, OPTIONS_MENU, PARTY_INVITE, PLAYER_STATUS local FRIENDS = FRIENDS
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
local LOCALIZED_CLASS_NAMES_FEMALE = LOCALIZED_CLASS_NAMES_FEMALE local LOCALIZED_CLASS_NAMES_FEMALE = LOCALIZED_CLASS_NAMES_FEMALE
local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local L_EasyMenu = L_EasyMenu
local function GetNumberFriends() local function GetNumberFriends()
local numFriends = GetNumFriends() local numFriends = GetNumFriends()
@@ -52,9 +46,9 @@ local menuList = {
{text = CHAT_MSG_WHISPER_INFORM, hasArrow = true, notCheckable = true}, {text = CHAT_MSG_WHISPER_INFORM, hasArrow = true, notCheckable = true},
{text = PLAYER_STATUS, hasArrow = true, notCheckable = true, {text = PLAYER_STATUS, hasArrow = true, notCheckable = true,
menuList = { menuList = {
-- {text = "|cff2BC226" .. AVAILABLE .. "|r", notCheckable = true, func = function() end}, -- TODO -- {text = "|cff2BC226"..AVAILABLE.."|r", notCheckable = true, func = function() end}, -- TODO
{text = "|cffE7E716" .. CHAT_MSG_AFK .. "|r", notCheckable = true, func = function() SendChatMessage("", "AFK") end}, {text = "|cffE7E716"..CHAT_MSG_AFK.."|r", notCheckable = true, func = function() SendChatMessage("", "AFK") end},
{text = "|cffFF0000" .. CHAT_MSG_DND .. "|r", notCheckable = true, func = function() SendChatMessage("", "DND") end} {text = "|cffFF0000"..CHAT_MSG_DND.."|r", notCheckable = true, func = function() SendChatMessage("", "DND") end}
} }
} }
} }
@@ -66,12 +60,12 @@ end
local function whisperClick(playerName) local function whisperClick(playerName)
menuFrame:Hide() menuFrame:Hide()
SetItemRef("player:" .. playerName, format("|Hplayer:%1$s|h[%1$s]|h", playerName), "LeftButton") SetItemRef("player:"..playerName, format("|Hplayer:%1$s|h[%1$s]|h", playerName), "LeftButton")
end end
local lastPanel local lastPanel
local levelNameString = "|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r" local levelNameString = "|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r"
local levelNameClassString = "|cff%02x%02x%02x%d|r %s%s" local levelNameClassString = "|cff%02x%02x%02x%d|r %s"
local totalOnlineString = join("", GUILD_ONLINE_LABEL, ": %s/%s") local totalOnlineString = join("", GUILD_ONLINE_LABEL, ": %s/%s")
local tthead = {r = 0.4, g = 0.78, b = 1} local tthead = {r = 0.4, g = 0.78, b = 1}
local activezone, inactivezone = {r = 0.3, g = 1.0, b = 0.3}, {r = 0.65, g = 0.65, b = 0.65} local activezone, inactivezone = {r = 0.3, g = 1.0, b = 0.3}, {r = 0.65, g = 0.65, b = 0.65}
@@ -82,37 +76,32 @@ local friendOnline, friendOffline = gsub(ERR_FRIEND_ONLINE_SS, "\124Hplayer:%%s\
local dataValid = false local dataValid = false
local function SortAlphabeticName(a, b) local function SortAlphabeticName(a, b)
if(a[1] and b[1]) then if a[1] and b[1] then
return a[1] < b[1] return a[1] < b[1]
end end
end end
local function BuildFriendTable(total) local function BuildFriendTable(total)
wipe(friendTable) wipe(friendTable)
local name, level, class, area, online, status, note local name, level, class, area, online
for i = 1, total do for i = 1, total do
name, level, class, area, online, status, note = GetFriendInfo(i) name, level, class, area, online = GetFriendInfo(i)
if status == CHAT_FLAG_AFK then
status = "|cffFFFFFF[|r|cfffaff00" .. CHAT_MSG_AFK .. "|r|cffFFFFFF]|r"
elseif status == CHAT_FLAG_DND then
status = "|cffFFFFFF[|r|cffff0000" .. CHAT_MSG_DND .. "|r|cffFFFFFF]|r"
end
if online then if online then
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_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 for k, v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do if class == v then class = k end end
friendTable[i] = {name, level, class, area, online, status, note} friendTable[i] = {name, level, class, area, online}
end end
end end
sort(friendTable, SortAlphabeticName) if next(friendTable) then
sort(friendTable, SortAlphabeticName)
end
end end
local function OnEvent(self, event) local function OnEvent(self, event, message)
local _, onlineFriends = GetNumberFriends() local _, onlineFriends = GetNumberFriends()
if event == "CHAT_MSG_SYSTEM" then if event == "CHAT_MSG_SYSTEM" then
local message = arg1
if not (find(message, friendOnline) or find(message, friendOffline)) then return end if not (find(message, friendOnline) or find(message, friendOffline)) then return end
end end
@@ -127,8 +116,6 @@ local function OnClick()
DT.tooltip:Hide() DT.tooltip:Hide()
if arg1 == "RightButton" then if arg1 == "RightButton" then
local menuCountWhispers = 0
local menuCountInvites = 0
local classc, levelc local classc, levelc
menuList[2].menuList = {} menuList[2].menuList = {}
@@ -136,14 +123,11 @@ local function OnClick()
for _, info in friendTable do for _, info in friendTable do
if info[5] then if info[5] then
menuCountInvites = menuCountInvites + 1
menuCountWhispers = menuCountWhispers + 1
classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[3]], GetQuestDifficultyColor(info[2]) classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[3]], GetQuestDifficultyColor(info[2])
classc = classc or GetQuestDifficultyColor(info[2]) classc = classc or GetQuestDifficultyColor(info[2])
menuList[2].menuList[menuCountInvites] = {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 = inviteClick} tinsert(menuList[2].menuList, {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 = inviteClick})
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} tinsert(menuList[3].menuList, {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 end
L_EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 2) L_EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 2)
@@ -173,7 +157,7 @@ local function OnEnter(self)
classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[3]], GetQuestDifficultyColor(info[2]) classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[info[3]], GetQuestDifficultyColor(info[2])
classc = classc or GetQuestDifficultyColor(info[2]) classc = classc or GetQuestDifficultyColor(info[2])
DT.tooltip:AddDoubleLine(format(levelNameClassString, levelc.r*255,levelc.g*255,levelc.b*255, info[2], info[1], " " .. info[6]), info[4], classc.r,classc.g,classc.b, zonec.r,zonec.g,zonec.b) DT.tooltip:AddDoubleLine(format(levelNameClassString, levelc.r*255,levelc.g*255,levelc.b*255, info[2], info[1]), info[4], classc.r,classc.g,classc.b, zonec.r,zonec.g,zonec.b)
end end
end end
end end