[Configuration] Make some configs deprecated

This commit is contained in:
Yunfan Li
2024-07-09 17:32:13 +08:00
parent ff7b58082d
commit bd94343738
3 changed files with 83 additions and 78 deletions

View File

@@ -1900,19 +1900,19 @@ bool PlayerbotAI::TellMasterNoFacing(std::string const text, PlayerbotSecurityLe
return false;
time_t lastSaid = whispers[text];
// Yunfan: Remove tell cooldown
// if (!lastSaid || (time(nullptr) - lastSaid) >= sPlayerbotAIConfig->repeatDelay / 1000)
// {
whispers[text] = time(nullptr);
if (!lastSaid || (time(nullptr) - lastSaid) >= sPlayerbotAIConfig->repeatDelay / 1000)
{
whispers[text] = time(nullptr);
ChatMsg type = CHAT_MSG_WHISPER;
if (currentChat.second - time(nullptr) >= 1)
type = currentChat.first;
ChatMsg type = CHAT_MSG_WHISPER;
if (currentChat.second - time(nullptr) >= 1)
type = currentChat.first;
WorldPacket data;
ChatHandler::BuildChatPacket(data, type == CHAT_MSG_ADDON ? CHAT_MSG_PARTY : type, type == CHAT_MSG_ADDON ? LANG_ADDON : LANG_UNIVERSAL, bot, nullptr, text.c_str());
master->SendDirectMessage(&data);
// }
WorldPacket data;
ChatHandler::BuildChatPacket(data, type == CHAT_MSG_ADDON ? CHAT_MSG_PARTY : type, type == CHAT_MSG_ADDON ? LANG_ADDON : LANG_UNIVERSAL, bot, nullptr, text.c_str());
master->SendDirectMessage(&data);
}
return true;
}