Skip to content

Commit

Permalink
ElvUI默认支持表情和链接图标,安装ElvUI不再提供此项显示
Browse files Browse the repository at this point in the history
- 更新版本号到1.0.2
  • Loading branch information
CvCn committed Aug 9, 2024
1 parent 6944c82 commit c135472
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 12 deletions.
9 changes: 8 additions & 1 deletion Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,17 @@ ReplaceIconString(text)
return newText
end

function ICON:IconFilter(msg)
function ICON:EmojiFilter(msg)
if not msg or msg == '' then return '' end
local re = msg
re = gsub(re, "%{.-%}", ReplaceEmote)
return re
end


function ICON:IconFilter(msg)
if not msg or msg == '' then return '' end
local re = msg
re = gsub(re, "%|H.-%]%|h", ReplaceIconString)
return re
end
2 changes: 2 additions & 0 deletions InIt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ local M = {}
local U = {}
local D = {}
local L = {}
local E = 'DEV'
T[1] = W
T[2] = M
T[3] = U
T[4] = D
T[5] = _G
T[6] = L
T[7] = E
T.N = N
_G['INPUTINPUT'] = T
3 changes: 2 additions & 1 deletion InputInput.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
3 changes: 2 additions & 1 deletion InputInput_Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
3 changes: 2 additions & 1 deletion InputInput_Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
3 changes: 2 additions & 1 deletion InputInput_Mainline.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
3 changes: 2 additions & 1 deletion InputInput_Vanilla.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
3 changes: 2 additions & 1 deletion InputInput_Wrath.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Title: InputInput
## Notes:
## Author: York
## Version: 1.0.1
## Version: 1.0.2
## X-Date: 2024-08-09

## X-Category: Interface Enhancements
## X-Curse-Project-ID: 1076615
Expand Down
9 changes: 6 additions & 3 deletions Main.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local W, M, U, D, G, L = unpack((select(2, ...)))
local W, M, U, D, G, L, E = unpack((select(2, ...)))
local MAIN = {}
M.MAIN = MAIN

Expand Down Expand Up @@ -467,7 +467,10 @@ function Chat(editBox, chatType, backdropFrame2, channel_name)
local c_h = 0
for k = 0, 4 do
local msg = msg_list[#msg_list - k]
msg = M.ICON:IconFilter(msg)
msg = M.ICON:EmojiFilter(msg)
if ElvUI == nil then
msg = M.ICON:IconFilter(msg)
end
msg = U:BTagFilter(msg)

-- if msg and #msg > 0 then chat_h = chat_h + 1 end
Expand Down Expand Up @@ -805,7 +808,7 @@ frame:SetScript("OnEvent", function(self_f, event, ...)
return
end

if language and #language > 0 then
if language and #language > 0 and sender and #sender > 0 then
if UnitFactionGroup('player') ~= UnitFactionGroup(sender) then
msg = '[' .. language .. ']' .. msg
end
Expand Down
5 changes: 3 additions & 2 deletions Unit.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local W, M, U, D, G = unpack((select(2, ...)))
local W, M, U, D, G, L, E = unpack((select(2, ...)))

-- 获取当前时间戳和毫秒数
function U:GetFormattedTimestamp()
Expand Down Expand Up @@ -131,7 +131,7 @@ end
function U:ReplacePlainTextUsingFind(text, pattern, replacement)
local result = ""
local searchFrom = 1
local startPos, endPos = text:find(pattern, searchFrom, true) -- true 表示纯文本匹配
local startPos, endPos = text:find(pattern, searchFrom, true) -- true 表示纯文本匹配

while startPos do
-- 拼接结果字符串
Expand All @@ -146,6 +146,7 @@ function U:ReplacePlainTextUsingFind(text, pattern, replacement)
end

function U:SaveLog(key, value)
if E ~= 'DEV' then return end
local log = D:ReadDB('LOG__', {})
local thisKey = log[key] or {}
tinsert(thisKey, {
Expand Down

0 comments on commit c135472

Please sign in to comment.