fix double chat

This commit is contained in:
Atidot3
2024-08-31 22:53:57 +02:00
parent 99c5cb4222
commit 5c33aca6d3

View File

@@ -510,9 +510,11 @@ bool ChatReplyAction::SendGeneralResponse(Player* bot, ChatChannelSource chatCha
} }
case ChatChannelSource::SRC_GENERAL: case ChatChannelSource::SRC_GENERAL:
{ {
//may reply to the same channel or whisper //may reply to the same channel 80% or whisper
GET_PLAYERBOT_AI(bot)->SayToChannel(responseMessage, ChatChannelId::GENERAL); if (urand(0, 100) < 80)
GET_PLAYERBOT_AI(bot)->Whisper(responseMessage, name); GET_PLAYERBOT_AI(bot)->SayToChannel(responseMessage, ChatChannelId::GENERAL);
else
GET_PLAYERBOT_AI(bot)->Whisper(responseMessage, name);
break; break;
} }
case ChatChannelSource::SRC_TRADE: case ChatChannelSource::SRC_TRADE: