mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix double chat
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user