Verified Commit 5aa3f79d authored by Merathilis's avatar Merathilis

Merge branch 'development' into master

parents 235b3749 87ab2a2c
[b][color=orange]v4.69[/color], 20.12.2020[/b][list]
[*]Updated GarrisonUI Skin
[*]Updated CovenantRenown Skin
[*]Added back the Quick Join messages to my notification
[*]Updated some utility items for the AutoButtons
[*]Update my item alerts
[*]Added right click to EncounterJournal Button on the MicroBar to open Weekly Rewards
[*]Added some hearthstones to the MicroBar and LocPanel
[*]Updated ChatLinks
[*]Updated some reminders[/list]
[b][color=orange]v4.68[/color], 05.12.2020[/b][list]
[*]AutoButtons: Added a new category: FOODVENDOR
[*]Added some more vignettes to be ignored. Thx isp
......
** v4.69, 20.12.2020**
* Updated GarrisonUI Skin
* Updated CovenantRenown Skin
* Added back the Quick Join messages to my notification
* Updated some utility items for the AutoButtons
* Update my item alerts
* Added right click to EncounterJournal Button on the MicroBar to open Weekly Rewards
* Added some hearthstones to the MicroBar and LocPanel
* Updated ChatLinks
* Updated some reminders
** v4.68, 05.12.2020**
* AutoButtons: Added a new category: FOODVENDOR
* Added some more vignettes to be ignored. Thx isp
......
......@@ -22,8 +22,8 @@ function MER:LoadAddOnSkinsProfile()
AS.db['EmbedSexyCooldown'] = false
AS.db['TransparentEmbed'] = false
AS.db['EmbedIsHidden'] = false
AS.db['EmbedFrameStrata'] = '2-LOW'
AS.db['EmbedFrameLevel'] = 10
AS.db['EmbedFrameStrata'] = '4-HIGH'
AS.db['EmbedFrameLevel'] = 50
AS.db['RecountBackdrop'] = false
AS.db['SkadaBackdrop'] = false
AS.db['OmenBackdrop'] = false
......
......@@ -424,7 +424,7 @@ function MER:LoadDetailsProfile()
},
},
["fontstrings_text3_anchor"] = 35,
["strata"] = "LOW",
["strata"] = "MEDIUM",
["clickthrough_incombatonly"] = true,
["__snap"] = {
},
......@@ -1168,7 +1168,7 @@ function MER:LoadDetailsProfile()
["font_face"] = "Friz Quadrata TT",
["frame"] = {
["show_title"] = false,
["strata"] = "LOW",
["strata"] = "MEDIUM",
["backdrop_color"] = {
0, -- [1]
0, -- [2]
......@@ -1203,7 +1203,7 @@ function MER:LoadDetailsProfile()
["font_face"] = "Friz Quadrata TT",
["frame"] = {
["show_title"] = true,
["strata"] = "LOW",
["strata"] = "MEDIUM",
["backdrop_color"] = {
0, -- [1]
0, -- [2]
......
......@@ -16,12 +16,15 @@ local DISABLED_FONT_COLOR = DISABLED_FONT_COLOR
local ChangeLogData = {
"Changes:",
"• AutoButtons: Added a new category: FOODVENDOR",
"• Added some more vignettes to be ignored. Thx isp",
"• Updated Garrison skin",
"• Updated PlayerChoice skin",
"• Added an own BigWigs Queue Timers",
"• Added some hearthstones to MicroBar",
"• Updated GarrisonUI Skin",
"• Updated CovenantRenown Skin",
"• Added back the Quick Join messages to my notification",
"• Updated some utility items for the AutoButtons",
"• Update my item alerts",
"• Added right click to EncounterJournal Button on the MicroBar to open Weekly Rewards",
"• Added some hearthstones to the MicroBar and LocPanel",
"• Updated ChatLinks",
"• Updated some reminders",
-- "• ''",
" ",
......
......@@ -466,7 +466,7 @@ end
function MER:CreateText(f, layer, size, outline, text, classcolor, anchor, x, y)
local text = f:CreateFontString(nil, layer)
text:FontTemplate(nil, size or 10, outline or "OUTLINE")
text:SetWordWrap(false)
text:SetHeight(text:GetStringHeight()+20)
if text then
text:SetText(text)
......
......@@ -136,7 +136,7 @@ local function SetupChat()
E.db["chat"]["panelHeight"] = 146
E.db["chat"]["panelHeightRight"] = 146
E.db["chat"]["panelWidthRight"] = 288
E.db["chat"]["editBoxPosition"] = "ABOVE_CHAT"
E.db["chat"]["editBoxPosition"] = "ABOVE_CHAT_INSIDE"
E.db["chat"]["panelBackdrop"] = "SHOWBOTH"
E.db["chat"]["keywords"] = "%MYNAME%, ElvUI, MerathilisUI"
E.db["chat"]["copyChatLines"] = true
......@@ -144,7 +144,7 @@ local function SetupChat()
E.db["chat"]["useCustomTimeColor"] = true
E.db["chat"]["customTimeColor"] = {r = 0, g = 0.75, b = 0.98}
E.db["chat"]["panelBackdropNameRight"] = ""
E.db["chat"]["socialQueueMessages"] = true
E.db["chat"]["socialQueueMessages"] = false
E.db["chat"]["hideChatToggles"] = true
E.db["chat"]["tabSelector"] = "BOX"
E.db["chat"]["tabSelectorColor"] = {r = MER.r, g = MER.g, b = MER.b}
......@@ -1427,6 +1427,12 @@ function MER:SetupUnitframes(layout)
E.db["unitframe"]["units"]["target"]["healPrediction"]["anchorPoint"] = "BOTTOM"
E.db["unitframe"]["units"]["target"]["healPrediction"]["height"] = -1
E.db["unitframe"]["units"]["target"]["cutaway"]["health"]["enabled"] = true
E.db["unitframe"]["units"]["target"]["CombatIcon"]["size"] = 11
E.db["unitframe"]["units"]["target"]["CombatIcon"]["texture"] = "COMBAT"
E.db["unitframe"]["units"]["target"]["CombatIcon"]["customTexture"] = ""
E.db["unitframe"]["units"]["target"]["CombatIcon"]["anchorPoint"] = "CENTER"
E.db["unitframe"]["units"]["target"]["CombatIcon"]["xOffset"] = 0
E.db["unitframe"]["units"]["target"]["CombatIcon"]["yOffset"] = 0
-- TargetTarget
E.db["unitframe"]["units"]["targettarget"]["disableMouseoverGlow"] = false
......
## Interface: 90002
## Author: Merathilis
## Version: 4.68
## Version: 4.69
## Title: |cFF1784d1ElvUI|r |cffffffffMerathilis|r|cffff7d0aUI|r
## Notes: A decorative edit for ElvUI + additional features.
## Notes-deDE: Eine dekorative Erweiterung für ElvUI + einige zusätzliche Funktionen.
......@@ -11,7 +11,7 @@
## OptionalDeps: SharedMedia, BigWigs, ls_Toasts
## X-Credits: Benik, Blazeflack, Azilroka, Simpy, NihilisticPandemonium, Darth Predator, fgprodigal, siweia, Solor, Elv, fang2hou & all AddOn Authors who inspired me.
## X-ElvVersion: 12.13
## X-Curse-Packaged-Version: 4.68
## X-Curse-Packaged-Version: 4.69
## X-Curse-Project-Name: MerathilisUI
## X-Curse-Project-ID: merathilis-ui
## X-Tukui-ProjectID: 1
......
......@@ -33,6 +33,7 @@ MER.Bags = MER:NewModule('MER_Bags', 'AceHook-3.0', 'AceEvent-3.0', 'AceTimer-3.
MER.BagInfo = MER:NewModule("MER_BagInfo", 'AceHook-3.0', 'AceEvent-3.0', 'AceTimer-3.0')
MER.Chat = MER:NewModule('MER_Chat', 'AceEvent-3.0', 'AceHook-3.0', 'AceTimer-3.0')
MER.ChatBar = MER:NewModule('MER_ChatBar', 'AceEvent-3.0', 'AceHook-3.0')
MER.ChatLink = MER:NewModule('MER_ChatLink', 'AceEvent-3.0')
MER.Cooldown = MER:NewModule('MER_Cooldown', 'AceHook-3.0')
MER.Compatibility = MER:NewModule('MER_Compatibility')
MER.CombatText = MER:NewModule('MER_CombatText', 'AceEvent-3.0', 'AceTimer-3.0')
......
......@@ -322,12 +322,18 @@ local banners = {
}
local utilities = {
153023,
109076,
49040,
109076,
132514,
164733,
164978,
153023,
171285,
171286,
171436,
171437,
171438,
171439,
172346,
172347,
}
local torghastItems = {
......@@ -338,6 +344,7 @@ local torghastItems = {
176443, -- Fleeting Frenzy Potion
168035, -- Mawrat Harness
184652, -- Phantasmic Infusor
184662, -- Requisitioned Anima Cell
}
local questItemList = {}
......
......@@ -142,20 +142,6 @@ commOpen:SetScript("OnEvent", function(self, event, addonName)
end
end)
local function AddIcon(link)
local texture = GetItemIcon(link)
return "\124T"..texture..":12:12:0:0:64:64:5:59:5:59\124t"..link
end
function module:CreateChatLootIcons(_, message, ...)
if IsAddOnLoaded("ChatLinkIcons") then return end
message = message:gsub("(\124c%x+\124Hitem:.-\124h\124r)", AddIcon)
return false, message, ...
end
function module:CreateSeparators()
if E.db.mui.chat.seperators.enable ~= true then return end
......@@ -214,8 +200,6 @@ function module:Initialize()
-- Remove the Realm Name from system messages
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", module.RemoveCurrentRealmName)
-- Chat Icons for loot
ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT", module.CreateChatLootIcons)
self:EasyChannel()
self:StyleChat()
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local module = MER:GetModule('MER_ChatLink')
local _G = _G
local ceil = ceil
local format = format
local gsub = gsub
local pairs = pairs
local select = select
local strmatch = strmatch
local tonumber = tonumber
local tostring = tostring
local unpack = unpack
local ChatFrame_AddMessageEventFilter = ChatFrame_AddMessageEventFilter
local GetItemIcon = GetItemIcon
local GetItemInfo = GetItemInfo
local GetPvpTalentInfoByID = GetPvpTalentInfoByID
local GetSpellTexture = GetSpellTexture
local GetTalentInfoByID = GetTalentInfoByID
local ItemLevelTooltip = E.ScanTooltip
local ItemLevelPattern = gsub(ITEM_LEVEL, "%%d", "(%%d+)")
local IconString = "|T%s:16:18:0:0:64:64:4:60:7:57"
local SearchArmorType = {
INVTYPE_HEAD = true,
INVTYPE_SHOULDER = true,
INVTYPE_CHEST = true,
INVTYPE_WRIST = true,
INVTYPE_HAND = true,
INVTYPE_WAIST = true,
INVTYPE_LEGS = true,
INVTYPE_FEET = true
}
local abbrList = {
INVTYPE_HEAD = L["Head"],
INVTYPE_NECK = L["Neck"],
INVTYPE_SHOULDER = L["Shoulders"],
INVTYPE_CLOAK = L["Back"],
INVTYPE_CHEST = L["Chest"],
INVTYPE_WRIST = L["Wrist"],
INVTYPE_HAND = L["Hands"],
INVTYPE_WAIST = L["Waist"],
INVTYPE_LEGS = L["Legs"],
INVTYPE_FEET = L["Feet"],
INVTYPE_HOLDABLE = L["Off-Hand"],
INVTYPE_FINGER = L["Finger"],
INVTYPE_TRINKET = L["Trinket"]
}
local function AddItemInfo(Hyperlink)
local id = strmatch(Hyperlink, "Hitem:(%d-):")
if not id then
return
end
id = tonumber(id)
if module.db.level or module.db.slot then
local text, level, extraname, slot
ItemLevelTooltip:SetOwner(_G.UIParent, "ANCHOR_NONE")
ItemLevelTooltip:ClearLines()
ItemLevelTooltip:SetHyperlink(Hyperlink)
if module.db.level then
for i = 2, 5 do
local leftText = _G[ItemLevelTooltip:GetName() .. "TextLeft" .. i]
if leftText then
text = leftText:GetText() or ""
level = strmatch(text, ItemLevelPattern)
if level then
break
end
end
end
end
local type = select(6, GetItemInfo(id))
if type == _G.ARMOR and module.db.armorCategory then
local equipLoc = select(9, GetItemInfo(id))
if equipLoc ~= "" then
if SearchArmorType[equipLoc] then
local armorType = select(7, GetItemInfo(id))
if E.global.general.locale == "zhTW" or E.global.general.locale == "zhCN" then
slot = armorType .. (abbrList[equipLoc] or _G[equipLoc])
else
slot = armorType .. " " .. (abbrList[equipLoc] or _G[equipLoc])
end
else
slot = abbrList[equipLoc] or _G[equipLoc]
end
end
end
if type == _G.WEAPON and module.db.weaponCategory then
local equipLoc = select(9, GetItemInfo(id))
if equipLoc ~= "" then
local weaponType = select(7, GetItemInfo(id))
slot = weaponType or abbrList[equipLoc] or _G[equipLoc]
end
end
if level and extraname then
Hyperlink = Hyperlink:gsub("|h%[(.-)%]|h", "|h[" .. level .. ":%1:" .. extraname .. "]|h")
elseif level and slot then
Hyperlink = Hyperlink:gsub("|h%[(.-)%]|h", "|h[" .. level .. "-" .. slot .. ":%1]|h")
elseif level then
Hyperlink = Hyperlink:gsub("|h%[(.-)%]|h", "|h[" .. level .. ":%1]|h")
elseif slot then
Hyperlink = Hyperlink:gsub("|h%[(.-)%]|h", "|h[" .. slot .. ":%1]|h")
end
end
if module.db.icon then
local texture = GetItemIcon(id)
local icon = format(IconString .. ":255:255:255|t", texture)
Hyperlink = icon .. " " .. Hyperlink
end
return Hyperlink
end
local function AddSpellInfo(Hyperlink)
local id = strmatch(Hyperlink, "Hspell:(%d-):")
if not id then
return
end
if module.db.icon then
local texture = GetSpellTexture(tonumber(id))
local icon = format(IconString .. ":255:255:255|t", texture)
Hyperlink = icon .. " |cff71d5ff" .. Hyperlink .. "|r" -- I dk why the color is needed, but worked!
end
return Hyperlink
end
local function AddEnchantInfo(Hyperlink)
local id = strmatch(Hyperlink, "Henchant:(%d-)\124")
if not id then
return
end
if module.db.icon then
local texture = GetSpellTexture(tonumber(id))
local icon = format(IconString .. ":255:255:255|t", texture)
Hyperlink = icon .. " " .. Hyperlink
end
return Hyperlink
end
local function AddPvPTalentInfo(Hyperlink)
local id = strmatch(Hyperlink, "Hpvptal:(%d-)|")
if not id then
return
end
if module.db.icon then
local texture = select(3, GetPvpTalentInfoByID(tonumber(id)))
local icon = format(IconString .. ":255:255:255|t", texture)
Hyperlink = icon .. " " .. Hyperlink
end
return Hyperlink
end
local function AddTalentInfo(Hyperlink)
local id = strmatch(Hyperlink, "Htalent:(%d-)|")
if not id then
return
end
if module.db.icon then
local texture = select(3, GetTalentInfoByID(tonumber(id)))
local icon = format(IconString .. ":255:255:255|t", texture)
Hyperlink = icon .. " " .. Hyperlink
end
return Hyperlink
end
function module:Filter(event, msg, ...)
if module.db.enable then
msg = gsub(msg, "(|Hitem:%d+:.-|h.-|h)", AddItemInfo)
msg = gsub(msg, "(|Hspell:%d+:%d+|h.-|h)", AddSpellInfo)
msg = gsub(msg, "(|Henchant:%d+|h.-|h)", AddEnchantInfo)
msg = gsub(msg, "(|Htalent:%d+|h.-|h)", AddTalentInfo)
msg = gsub(msg, "(|Hpvptal:%d+|h.-|h)", AddPvPTalentInfo)
end
return false, msg, ...
end
function module:Initialize()
self.db = E.db.mui.chat.chatLink
ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_LEADER", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_PARTY", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_PARTY_LEADER", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_GUILD", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_BATTLEGROUND", self.Filter)
ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT", self.Filter)
self.Initialized = true
end
function module:ProfileUpdate()
self.db = E.db.mui.chat.chatLink
if self.db.enable and not self.Initialized then
self:Initialize()
end
end
MER:RegisterModule(module:GetName())
......@@ -6,7 +6,6 @@ local MERC = MER:GetModule('MER_Chat')
local _G = _G
local pairs, ipairs, tonumber = pairs, ipairs, tonumber
local format = string.format
local strsub = strsub
local strsplit = strsplit
local time = time
local tinsert = table.insert
......@@ -16,24 +15,19 @@ local ShowUIPanel = ShowUIPanel
local UIParent = UIParent
local firstLines = {
"^Details!: (.*)$", -- Details!
"^Recount - (.*)$", -- Recount
"^Skada: (.*) for (.*):$", -- Skada enUS
"^Skada: (.*) für (.*):$", -- Skada deDE
"^Skada: (.*) pour (.*):$", -- Skada frFR
"^Отчёт Skada: (.*), с (.*):$", -- Skada ruRU
"^Skada: (.*) por (.*):$", -- Skada esES/ptBR
"^Skada: (.*) per (.*):$", -- Skada itIT
"^(.*) 의 Skada 보고 (.*):$", -- Skada koKR
"^Skada报告(.*)的(.*):$", -- Skada zhCN
"^Skada:(.*)來自(.*):$", -- Skada zhTW
"^Numeration: (.*) - (.*)$", -- Numeration
"^(.*) Done for (.*)$", -- TinyDPS enUS
"^(.*) für (.*)$", -- TinyDPS deDE
"데미지량 -(.*)$", -- TinyDPS koKR
"힐량 -(.*)$", -- TinyDPS koKR
"Урон:(.*)$", -- TinyDPS ruRU
"Исцеление:(.*)$" -- TinyDPS ruRU
"^Recount - (.*)$", --Recount
"^Skada: (.*) for (.*):$", -- Skada enUS
"^Skada: (.*) por (.*):$", -- Skada esES/ptBR
"^Skada: (.*) für (.*):$", -- Skada deDE
"^Skada: (.*) pour (.*):$", -- Skada frFR
"^Skada: (.*) per (.*):$", -- Skada itIT
"^(.*) ? Skada ?? (.*):$", -- Skada koKR
"^Отчёт Skada: (.*), с (.*):$", -- Skada ruRU
"^Skada??(.*)?(.*):$", -- Skada zhCN
"^Skada:(.*)??(.*):$", -- Skada zhTW
"^(.*) Done for (.*)$", -- TinyDPS
"^Numeration: (.*)$", -- Numeration
"^Details!:(.*)$" -- Details!
}
local nextLines = {
......@@ -65,18 +59,16 @@ local events = {
}
local function FilterLine(event, source, message, ...)
for i = 1, #nextLines do
local v = nextLines[i]
local spam = false
for k, v in ipairs(nextLines) do
if message:match(v) then
local curTime = time()
for i = 1, #meters do
local j = meters[i]
for i, j in ipairs(meters) do
local elapsed = curTime - j.time
if j.source == source and j.event == event and elapsed < 5 then
if j.source == source and j.event == event and elapsed < 1 then
local toInsert = true
for i = 1, #j.data do
if j.data[i] == message then
for a, b in ipairs(j.data) do
if b == message then
toInsert = false
end
end
......@@ -90,46 +82,47 @@ local function FilterLine(event, source, message, ...)
end
end
for i = 1, #firstLines do
local v = firstLines[i]
for k, v in ipairs(firstLines) do
local newID = 0
if message:match(v) then
local curTime = time()
for i = 1, #meters do
local j = meters[i]
for i, j in ipairs(meters) do
local elapsed = curTime - j.time
if j.source == source and j.event == event and elapsed < 1 then
newID = i
return true, true, format("|Hspam:%1$d|h|cFFFFFF00[%2$s]|r|h", newID or 0, message or "nil")
return true, true, format('|HMergeSpamMeter:%1$d|h|cFFFFFF00[%2$s]|r|h', newID or 0, message or 'nil')
end
end
tinsert(meters, {source = source, event = event, time = curTime, data = {}, title = message})
for i = 1, #meters do
local j = meters[i]
for i, j in ipairs(meters) do
if j.source == source and j.event == event and j.time == curTime then
newID = i
end
end
return true, true, format("|Hspam:%1$d|h|cFFFFFF00[%2$s]|r|h", newID or 0, message or "nil")
return true, true, format('|HMergeSpamMeter:%1$d|h|cFFFFFF00[%2$s]|r|h', newID or 0, message or 'nil')
end
end
return false, false, nil
end
local SetHyperlink = _G.ItemRefTooltip.SetHyperlink
function _G.ItemRefTooltip:SetHyperlink(link, ...)
if link and (strsub(link, 1, 4) == "spam") then
local _, id = strsplit(":", link)
local orig2 = SetItemRef
function SetItemRef(link, text, button, frame)
local linkType, id = strsplit(':', link)
if linkType == 'MergeSpamMeter' then
local meterID = tonumber(id)
ShowUIPanel(_G.ItemRefTooltip)
if not _G.ItemRefTooltip:IsShown() then
_G.ItemRefTooltip:SetOwner(UIParent, 'ANCHOR_PRESERVE')
end
_G.ItemRefTooltip:ClearLines()
_G.ItemRefTooltip:AddLine(meters[meterID].title)
_G.ItemRefTooltip:AddLine(format(BY_SOURCE..": %s", meters[meterID].source))
for _, v in ipairs(meters[meterID].data) do
local left, right = v:match("^(.*) (.*)$")
_G.ItemRefTooltip:AddLine(format(_G.BY_SOURCE..': %s', meters[meterID].source))
for k, v in ipairs(meters[meterID].data) do
local left, right = v:match('^(.*) (.*)$')
if left and right then
_G.ItemRefTooltip:AddDoubleLine(left, right, 1, 1, 1, 1, 1, 1)
else
......@@ -137,19 +130,22 @@ function _G.ItemRefTooltip:SetHyperlink(link, ...)
end
end
_G.ItemRefTooltip:Show()
return
else
return orig2(link, text, button, frame)
end
SetHyperlink(self, link, ...)
end
local function ParseChatEvent(_, event, message, sender, ...)
local isRecount, isFirstLine, newMessage = FilterLine(event, sender, message)
if isRecount then
if isFirstLine then
return false, newMessage, sender, ...
else
return true
local function ParseChatEvent(self, event, message, sender, ...)
for _, value in ipairs(events) do
if event == value then
local isRecount, isFirstLine, newMessage = FilterLine(event, sender, message)