File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Boilerplate_!Base/src/lib Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ function X.GetChatInput()
2222 return frame and frame :Lookup (' Edit_Input' )
2323end
2424
25+ function X .GetChatPanel (k )
26+ return Station .SearchFrame (' ChatPanel' .. k )
27+ or Station .SearchFrame (' ChatPanel_Normal' .. k )
28+ end
29+
2530-- 海鳗里面抠出来的
2631-- 聊天复制并发布
2732function X .RepeatChatLine (hTime )
@@ -1610,8 +1615,7 @@ end
16101615
16111616local HOOKED_UI = setmetatable ({}, { __mode = ' k' })
16121617local function Hook (i )
1613- local frame = Station .SearchFrame (' ChatPanel' .. i )
1614- or Station .SearchFrame (' ChatPanel_Normal' .. i )
1618+ local frame = X .GetChatPanel (i )
16151619 local h = frame and frame :Lookup (' Wnd_Message' , ' Handle_Message' )
16161620 if h and not HOOKED_UI [h ] then
16171621 HOOKED_UI [h ] = true
@@ -1622,8 +1626,7 @@ end
16221626X .RegisterEvent (' CHAT_PANEL_OPEN' , ' ChatPanelHook' , function (event ) Hook (arg0 ) end )
16231627
16241628local function Unhook (i )
1625- local frame = Station .SearchFrame (' ChatPanel' .. i )
1626- or Station .SearchFrame (' ChatPanel_Normal' .. i )
1629+ local frame = X .GetChatPanel (i )
16271630 local h = frame and frame :Lookup (' Wnd_Message' , ' Handle_Message' )
16281631 if h and HOOKED_UI [h ] then
16291632 HOOKED_UI [h ] = nil
You can’t perform that action at this time.
0 commit comments