>wowhelm_
~/forever/addon-api/source/1.60.1.70790

Interface/AddOns/Blizzard_ChatFrameBase/Shared/ChatFrameUtil.lua

1.60.1.70790 compared with 1.60.1.70755 · 2026-11-04 · +15 −0· view file
@@ -385,7 +385,22 @@ function ChatFrameUtil.SendTell(name, chatFrame)
ChatFrameUtil.SendTellWithMessage(name, message, chatFrame);
end
+function ChatFrameUtil.GetCharacterWhisperTargetIfTitleFriend(tokenizedName)
+ local bnetIDAccount = BNet_GetBNetIDAccount(tokenizedName);
+ if not bnetIDAccount then
+ return nil;
+ end
+
+ return C_BattleNet.GetDefaultTitleWhisperTarget(bnetIDAccount);
+end
+
function ChatFrameUtil.SendBNetTell(tokenizedName)
+ local titleFriendWhisperTarget = tokenizedName and ChatFrameUtil.GetCharacterWhisperTargetIfTitleFriend(tokenizedName);
+ if titleFriendWhisperTarget then
+ ChatFrameUtil.SendTell(titleFriendWhisperTarget);
+ return;
+ end
+
local editBox = ChatFrameUtil.ChooseBoxForSend();
editBox:SetTellTarget(tokenizedName);
editBox:SetChatType("BN_WHISPER");