ZhengPeiRu21 / mod-playerbots

AzerothCore Playerbots Module
MIT License
193 stars 93 forks source link

Chat privately to a bot, and everyone will receive a reply message from the bot #176

Open zhantai033 opened 1 year ago

zhantai033 commented 1 year ago

I found a problem with the playerbot version of AC. When chatting privately with the bot, it will be broadcast around the world.For example, if you try to say "123" to a bot, the bot will chat "123" to you privately,and talk to every player in the game.

807133728 commented 1 year ago

I have already resolved it. It's not related to the playerbot, it's an issue with npcTalk.lua Caused by SendWorldMessage RegisterServerEvent(5, function(_, p, w) local c = p:GetOpcode() if (c==0x095) then local t = p:ReadULong() local l = p:ReadULong() local n = p:ReadString() local m = p:ReadString() if (t == 7 and n~= w:GetName()) then
--SendWorldMessage(string.format("|cFFFF80FF|Hplayer:%s|h[%s]|h悄悄的说:%s|r",n,n,m)) end end

if (c==0x06E) then 
    local n = p:ReadString() 
    --SendWorldMessage(string.format("%s 拒绝了你的邀请.",n)) 
end

if (c==0x069) then 
    local n = p:ReadString() 
    --SendWorldMessage(string.format("%s 拒绝了你的邀请.",n)) 
end 

end

Dreathean commented 10 months ago

Has this fix been implemented and if so can this be closed out?