From 7ec64345fa9d65808139a7df4895cda8b0a45b7e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 5 Mar 2024 18:24:21 +0800 Subject: [PATCH] Remove tell master cooldown --- src/PlayerbotAI.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index efa9d84a..4c553120 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -1878,18 +1878,19 @@ bool PlayerbotAI::TellMasterNoFacing(std::string const text, PlayerbotSecurityLe return false; time_t lastSaid = whispers[text]; - if (!lastSaid || (time(nullptr) - lastSaid) >= sPlayerbotAIConfig->repeatDelay / 1000) - { - whispers[text] = time(nullptr); + // Yunfan: Remove tell cooldown + // 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; }