@@ -99,23 +99,54 @@ X.RegisterBgMsg('RL', function(_, data, nChannel, dwTalkerID, szTalkerName, bIsS
9999end )
100100
101101-- 查看完整属性
102+ local CHAR_INFO_BLOCK_LIST = {}
102103X .RegisterBgMsg (' CHAR_INFO' , function (_ , data , nChannel , dwTalkerID , szTalkerName , bIsSelf )
103104 if not bIsSelf and data [2 ] == X .GetClientPlayerID () then
104105 local nReplyChannel = X .IsTeammate (dwTalkerID )
105106 and PLAYER_TALK_CHANNEL .RAID
106107 or D .GetReplyChannel (nChannel , szTalkerName )
107- if data [1 ] == ' ASK' then
108- if not _G .MY_CharInfo or _G .MY_CharInfo .bEnable or data [3 ] == ' DEBUG' then
108+ if data [1 ] == ' ASK' then
109+ local bAcquaintance = X .IsTeammate (dwTalkerID ) or X .IsFellowship (dwTalkerID ) or X .IsAuthorPlayer (dwTalkerID , szTalkerName )
110+ local bDebug = data [3 ] == ' DEBUG' and bAcquaintance
111+ local bConfirm = not bAcquaintance and not bDebug
112+ local function fnResolve ()
109113 local aInfo = X .GetClientPlayerCharInfo ()
110- if not X .IsTeammate (dwTalkerID ) and not data [ 3 ] == ' DEBUG ' then
114+ if not X .IsTeammate (dwTalkerID ) and not bDebug then
111115 for _ , v in ipairs (aInfo ) do
112116 v .tip = nil
113117 end
114118 end
115119 X .SendBgMsg (nReplyChannel , ' CHAR_INFO' , {' ACCEPT' , dwTalkerID , aInfo }, true )
116- else
120+ end
121+ local function fnReject ()
117122 X .SendBgMsg (nReplyChannel , ' CHAR_INFO' , {' REFUSE' , dwTalkerID }, true )
118123 end
124+ if not CHAR_INFO_BLOCK_LIST [dwTalkerID ] and (not _G .MY_CharInfo or _G .MY_CharInfo .bEnable or bDebug ) then
125+ if bConfirm then
126+ X .MessageBox (' MY_CharInfo' , {
127+ szMessage = _L (' [%s] wants to see your detailed character info, OK?' , szTalkerName ),
128+ {
129+ szOption = g_tStrings .STR_HOTKEY_SURE ,
130+ fnAction = fnResolve ,
131+ }, {
132+ szOption = g_tStrings .STR_HOTKEY_CANCEL ,
133+ fnAction = fnReject ,
134+ },
135+ {
136+ szOption = _L (' Block' ),
137+ bCheck = true ,
138+ fnAction = function ()
139+ fnReject ()
140+ CHAR_INFO_BLOCK_LIST [dwTalkerID ] = true
141+ end ,
142+ }
143+ })
144+ else
145+ fnResolve ()
146+ end
147+ else
148+ fnReject ()
149+ end
119150 end
120151 end
121152end )
0 commit comments