Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Commit 298c9be

Browse files
committed
feat: 更新门派染色匹配逻辑
1 parent df3d300 commit 298c9be

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

MY_Farbnamen/src/MY_Farbnamen.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ function D.RegisterNameIDHeader(szName, dwID, szHeaderXml)
616616
return X.OutputDebugMessage('ERROR', 'MY_Farbnamen Conflicted Name-ID: ' .. szName .. '(' .. dwID .. ')', X.DEBUG_LEVEL.ERROR)
617617
end
618618
if dwID == '*' then
619-
szName = X.ExtractPlayerBaseName(szName)
619+
szName = X.ExtractPlayerInitialName(szName)
620620
end
621621
NAME_ID_HEADER_XML[szName][dwID] = szHeaderXml
622622
end
@@ -635,12 +635,18 @@ function D.GetTip(szName)
635635
-- author info
636636
if tInfo.dwID and tInfo.szName then
637637
local szHeaderXml = GUID_HEADER_XML[tInfo.szGlobalID]
638-
or (NAME_ID_HEADER_XML[tInfo.szName] and NAME_ID_HEADER_XML[tInfo.szName][tInfo.dwID])
638+
if not szHeaderXml and NAME_ID_HEADER_XML[tInfo.szName] then
639+
szHeaderXml = NAME_ID_HEADER_XML[tInfo.szName][tInfo.dwID]
640+
end
641+
if not szHeaderXml then
642+
local szInitialName = X.ExtractPlayerInitialName(tInfo.szName)
643+
szHeaderXml = NAME_ID_HEADER_XML[szInitialName] and NAME_ID_HEADER_XML[szInitialName][tInfo.dwID]
644+
end
639645
if szHeaderXml then
640646
table.insert(tTip, szHeaderXml)
641647
table.insert(tTip, X.CONSTANT.XML_LINE_BREAKER)
642648
elseif tInfo.dwID ~= X.GetClientPlayerID() then
643-
local szName = X.ExtractPlayerBaseName(tInfo.szName)
649+
local szName = X.ExtractPlayerInitialName(tInfo.szName)
644650
local szHeaderXml = NAME_ID_HEADER_XML[szName] and NAME_ID_HEADER_XML[szName]['*']
645651
if szHeaderXml then
646652
table.insert(tTip, szHeaderXml)
@@ -654,7 +660,7 @@ function D.GetTip(szName)
654660
end
655661
-- 拼音
656662
if IsCtrlKeyDown() then
657-
local szPinyin = X.Han2TonePinyin(X.ExtractPlayerBaseName(szName), true)[1]
663+
local szPinyin = X.Han2TonePinyin(X.ExtractPlayerInitialName(szName), true)[1]
658664
if not X.IsEmpty(szPinyin) then
659665
table.insert(tTip, GetFormatText(szPinyin .. '\n', 136))
660666
end

0 commit comments

Comments
 (0)