Skip to content

Commit

Permalink
Merge pull request liyunfan1223#627 from EricksOliveira/patch-1
Browse files Browse the repository at this point in the history
Fix Logs LOG_ERROR for LOG_DEBUG
  • Loading branch information
hermensbas authored Oct 20, 2024
2 parents f912c5d + c8dd44f commit b234824
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/PlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ void PlayerbotHolder::HandlePlayerBotLoginCallback(PlayerbotLoginQueryHolder con
Player* bot = botSession->GetPlayer();
if (!bot)
{
// Log para debug
LOG_ERROR("mod-playerbots", "Bot player could not be loaded for account ID: {}", botAccountId);
// Debug log
LOG_DEBUG("mod-playerbots", "Bot player could not be loaded for account ID: {}", botAccountId);
botSession->LogoutPlayer(true);
delete botSession;
botLoading.erase(holder.GetGuid());
Expand All @@ -115,7 +115,7 @@ void PlayerbotHolder::HandlePlayerBotLoginCallback(PlayerbotLoginQueryHolder con
Player* masterPlayer = masterSession ? masterSession->GetPlayer() : nullptr;
if (masterSession && !masterPlayer)
{
LOG_ERROR("mod-playerbots", "Master session found but no player is associated for master account ID: {}", masterAccount);
LOG_DEBUG("mod-playerbots", "Master session found but no player is associated for master account ID: {}", masterAccount);
}

std::ostringstream out;
Expand Down Expand Up @@ -144,7 +144,7 @@ void PlayerbotHolder::HandlePlayerBotLoginCallback(PlayerbotLoginQueryHolder con
PlayerbotMgr* mgr = GET_PLAYERBOT_MGR(masterPlayer);
if (!mgr)
{
LOG_ERROR("mod-playerbots", "PlayerbotMgr not found for master player with GUID: {}", masterPlayer->GetGUID().GetRawValue());
LOG_DEBUG("mod-playerbots", "PlayerbotMgr not found for master player with GUID: {}", masterPlayer->GetGUID().GetRawValue());
}

uint32 count = mgr->GetPlayerbotsCount();
Expand Down Expand Up @@ -443,15 +443,15 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
if (!botAI)
{
// Log a warning here to indicate that the botAI is null
LOG_ERROR("mod-playerbots", "PlayerbotAI is null for bot with GUID: {}", bot->GetGUID().GetRawValue());
LOG_DEBUG("mod-playerbots", "PlayerbotAI is null for bot with GUID: {}", bot->GetGUID().GetRawValue());
return;
}

Player* master = botAI->GetMaster();
if (!master)
{
// Log a warning to indicate that the master is null
LOG_ERROR("mod-playerbots", "Master is null for bot with GUID: {}", bot->GetGUID().GetRawValue());
LOG_DEBUG("mod-playerbots", "Master is null for bot with GUID: {}", bot->GetGUID().GetRawValue());
return;
}

Expand Down

0 comments on commit b234824

Please sign in to comment.