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
commit 51908ecd84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)); std::string const response = HandleRemoteCommand(filtered.substr(6));
WorldPacket data; 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); fromPlayer->SendDirectMessage(&data);
return; return;
} }