diff --git a/src/PlayerbotMgr.cpp b/src/PlayerbotMgr.cpp index f8923316..2582fd5b 100644 --- a/src/PlayerbotMgr.cpp +++ b/src/PlayerbotMgr.cpp @@ -545,7 +545,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot) if (isLfg) { std::string lfgChannelName = channel->pattern[sWorld->GetDefaultDbcLocale()]; - new_channel = cMgr->GetJoinChannel(lfgChannelName, channel->ChannelID); + new_channel = cMgr->GetJoinChannel("LookingForGroup", channel->ChannelID); } else { diff --git a/src/PlayerbotTextMgr.cpp b/src/PlayerbotTextMgr.cpp index 64261314..fd3a95a6 100644 --- a/src/PlayerbotTextMgr.cpp +++ b/src/PlayerbotTextMgr.cpp @@ -192,7 +192,6 @@ uint32 PlayerbotTextMgr::GetLocalePriority() topLocale = i; } - LOG_INFO("playerbots", "GetLocalePriority: {}", topLocale); return topLocale; } diff --git a/src/strategy/actions/SayAction.cpp b/src/strategy/actions/SayAction.cpp index 71b7664e..46bcf089 100644 --- a/src/strategy/actions/SayAction.cpp +++ b/src/strategy/actions/SayAction.cpp @@ -661,15 +661,16 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32 LOG_ERROR("playerbots", "plr pointer is nullptr chat whisper"); } - if (type == CHAT_MSG_SAY) + else if (type == CHAT_MSG_SAY) { + LOG_INFO("playerbots", "say respond: {}", respondsText); if (bot->GetTeamId() == TEAM_ALLIANCE) bot->Say(respondsText, LANG_COMMON); else bot->Say(respondsText, LANG_ORCISH); } - if (type == CHAT_MSG_YELL) + else if (type == CHAT_MSG_YELL) { if (bot->GetTeamId() == TEAM_ALLIANCE) bot->Yell(respondsText, LANG_COMMON); @@ -677,7 +678,7 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32 bot->Yell(respondsText, LANG_ORCISH); } - if (type == CHAT_MSG_GUILD) + else if (type == CHAT_MSG_GUILD) { if (!bot->GetGuildId()) return; @@ -696,4 +697,4 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32 } GET_PLAYERBOT_AI(bot)->GetAiObjectContext()->GetValue("last said", "chat")->Set(time(nullptr) + urand(5, 25)); } -} \ No newline at end of file +} diff --git a/src/strategy/actions/SuggestWhatToDoAction.cpp b/src/strategy/actions/SuggestWhatToDoAction.cpp index fa8eada1..0fd543c5 100644 --- a/src/strategy/actions/SuggestWhatToDoAction.cpp +++ b/src/strategy/actions/SuggestWhatToDoAction.cpp @@ -109,7 +109,7 @@ void SuggestWhatToDoAction::instance() instances["Halls of Reflection"] = 80; } - std::vector allowedInstances; + std::vector allowedInstances; for (const auto& instance : instances) { if (bot->GetLevel() >= instance.second) @@ -248,12 +248,12 @@ void SuggestWhatToDoAction::grindReputation() factions["The Wyrmrest Accord"] = 77; } - std::vector levels; + std::vector levels; levels.push_back("honored"); levels.push_back("revered"); levels.push_back("exalted"); - std::vector allowedFactions; + std::vector allowedFactions; for (const auto& i : factions) { if (bot->GetLevel() >= i.second) @@ -310,7 +310,10 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(i); if (!channel) continue; - LOG_INFO("playerbots", "Loop on channel: {}", channel->pattern[_dbc_locale]); + if (channel->pattern[_dbc_locale]) + LOG_INFO("playerbots", "Loop on channel: {}", channel->pattern[_dbc_locale]); + else + LOG_ERROR("playerbots", "channel->pattern[_dbc_locale] is null"); for (AreaTableEntry const* current_zone : sAreaTableStore) {