Merge pull request #169 from AlvinZhu/PR4

fix debug cmd crash client
This commit is contained in:
ZhengPeiRu21
2023-03-22 10:19:17 -06:00
committed by GitHub

View File

@@ -538,7 +538,7 @@ void PlayerbotAI::HandleCommand(uint32 type, std::string const text, Player* fro
{
std::string const response = HandleRemoteCommand(filtered.substr(6));
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_ADDON, LANG_ADDON, nullptr, bot, response.c_str());
ChatHandler::BuildChatPacket(data, (ChatMsg)type, type == CHAT_MSG_ADDON ? LANG_ADDON : LANG_UNIVERSAL, bot, nullptr, response.c_str());
fromPlayer->SendDirectMessage(&data);
return;
}