feat: log action

This commit is contained in:
qcloud
2023-05-22 23:14:17 +08:00
parent 9871cd34c4
commit 32da0c07c9
4 changed files with 16 additions and 15 deletions

1
.gitignore vendored
View File

@@ -48,3 +48,4 @@ local.properties
.loadpath
.project
.cproject
.vscode

View File

@@ -577,7 +577,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("pvp");
nonCombatEngine->addStrategy("collision");
nonCombatEngine->addStrategy("grind");
nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("group");
nonCombatEngine->addStrategy("guild");
if (sPlayerbotAIConfig->autoDoQuests)
@@ -606,7 +606,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("pvp");
nonCombatEngine->addStrategy("collision");
nonCombatEngine->addStrategy("grind");
nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("group");
nonCombatEngine->addStrategy("guild");
if (sPlayerbotAIConfig->autoDoQuests)

View File

@@ -643,7 +643,7 @@ void Engine::LogAction(char const* format, ...)
if (sPlayerbotAIConfig->logInGroupOnly && !bot->GetGroup())
return;
LOG_INFO("playerbots", "{} {}", bot->GetName().c_str(), buf);
LOG_INFO("playerbots", "{} {} {} {}", bot->GetName().c_str(), buf, sPlayerbotAIConfig->logInGroupOnly, bot->GetGroup()->GetGroupType());
}
}

View File

@@ -100,17 +100,17 @@ bool LfgJoinAction::JoinLFG()
for (std::vector<uint32>::iterator i = dungeons.begin(); i != dungeons.end(); ++i)
{
LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(*i);
if (!dungeon || (dungeon->type != LFG_TYPE_RANDOM && dungeon->type != LFG_TYPE_DUNGEON && dungeon->type != LFG_TYPE_HEROIC && dungeon->type != LFG_TYPE_RAID))
if (!dungeon || (dungeon->TypeID != LFG_TYPE_RANDOM && dungeon->TypeID != LFG_TYPE_DUNGEON && dungeon->TypeID != LFG_TYPE_HEROIC && dungeon->TypeID != LFG_TYPE_RAID))
continue;
uint32 botLevel = bot->getLevel();
if (dungeon->minlevel && botLevel < dungeon->minlevel)
if (dungeon->MinLevel && botLevel < dungeon->MinLevel)
continue;
if (dungeon->minlevel && botLevel > dungeon->minlevel + 10)
if (dungeon->MinLevel && botLevel > dungeon->MinLevel + 10)
continue;
if (dungeon->maxlevel && botLevel > dungeon->maxlevel)
if (dungeon->MaxLevel && botLevel > dungeon->MaxLevel)
continue;
selected.push_back(dungeon->ID);
@@ -134,13 +134,13 @@ bool LfgJoinAction::JoinLFG()
continue;
uint32 botLevel = bot->getLevel();
if (dungeon->minlevel && botLevel < dungeon->minlevel)
if (dungeon->MinLevel && botLevel < dungeon->MinLevel)
continue;
if (dungeon->minlevel && botLevel > dungeon->minlevel + 10)
if (dungeon->MinLevel && botLevel > dungeon->MinLevel + 10)
continue;
if (dungeon->maxlevel && botLevel > dungeon->maxlevel)
if (dungeon->MaxLevel && botLevel > dungeon->MaxLevel)
continue;
if (heroic && !dungeon->difficulty)
@@ -173,7 +173,7 @@ bool LfgJoinAction::JoinLFG()
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Dungeon as {} ({})",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H",
bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->name[0]);
bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->Name[0]);
/*if (lfgState->IsSingleRole())
{
@@ -213,7 +213,7 @@ bool LfgJoinAction::JoinLFG()
pState->SetType(LFG_TYPE_RANDOM_DUNGEON);
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Random Dungeon as {} ({})",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, dungeon->name[0]);
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, dungeon->Name[0]);
return true;
}
else if (heroic)
@@ -221,19 +221,19 @@ bool LfgJoinAction::JoinLFG()
pState->SetType(LFG_TYPE_HEROIC_DUNGEON);
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Heroic Dungeon as {} ({})",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H",
bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->name[0]);
bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->Name[0]);
}
else if (rbotAId)
{
pState->SetType(LFG_TYPE_RAID);
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, RbotAId as {} ({})",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->name[0]);
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->Name[0]);
}
else
{
pState->SetType(LFG_TYPE_DUNGEON);
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Dungeon as {} ({})",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->name[0]);
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str(), _roles, many ? "several dungeons" : dungeon->Name[0]);
}*/
// Set RbotAId Browser comment