Skip to content

Commit

Permalink
fix double chat
Browse files Browse the repository at this point in the history
  • Loading branch information
atidot3 committed Aug 31, 2024
1 parent 99c5cb4 commit 5c33aca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/strategy/actions/SayAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,11 @@ bool ChatReplyAction::SendGeneralResponse(Player* bot, ChatChannelSource chatCha
}
case ChatChannelSource::SRC_GENERAL:
{
//may reply to the same channel or whisper
GET_PLAYERBOT_AI(bot)->SayToChannel(responseMessage, ChatChannelId::GENERAL);
GET_PLAYERBOT_AI(bot)->Whisper(responseMessage, name);
//may reply to the same channel 80% or whisper
if (urand(0, 100) < 80)
GET_PLAYERBOT_AI(bot)->SayToChannel(responseMessage, ChatChannelId::GENERAL);
else
GET_PLAYERBOT_AI(bot)->Whisper(responseMessage, name);
break;
}
case ChatChannelSource::SRC_TRADE:
Expand Down

0 comments on commit 5c33aca

Please sign in to comment.