mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
feat: log action
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -48,3 +48,4 @@ local.properties
|
|||||||
.loadpath
|
.loadpath
|
||||||
.project
|
.project
|
||||||
.cproject
|
.cproject
|
||||||
|
.vscode
|
||||||
@@ -577,7 +577,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
|||||||
nonCombatEngine->addStrategy("pvp");
|
nonCombatEngine->addStrategy("pvp");
|
||||||
nonCombatEngine->addStrategy("collision");
|
nonCombatEngine->addStrategy("collision");
|
||||||
nonCombatEngine->addStrategy("grind");
|
nonCombatEngine->addStrategy("grind");
|
||||||
nonCombatEngine->addStrategy("group");
|
// nonCombatEngine->addStrategy("group");
|
||||||
nonCombatEngine->addStrategy("guild");
|
nonCombatEngine->addStrategy("guild");
|
||||||
|
|
||||||
if (sPlayerbotAIConfig->autoDoQuests)
|
if (sPlayerbotAIConfig->autoDoQuests)
|
||||||
@@ -606,7 +606,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
|||||||
nonCombatEngine->addStrategy("pvp");
|
nonCombatEngine->addStrategy("pvp");
|
||||||
nonCombatEngine->addStrategy("collision");
|
nonCombatEngine->addStrategy("collision");
|
||||||
nonCombatEngine->addStrategy("grind");
|
nonCombatEngine->addStrategy("grind");
|
||||||
nonCombatEngine->addStrategy("group");
|
// nonCombatEngine->addStrategy("group");
|
||||||
nonCombatEngine->addStrategy("guild");
|
nonCombatEngine->addStrategy("guild");
|
||||||
|
|
||||||
if (sPlayerbotAIConfig->autoDoQuests)
|
if (sPlayerbotAIConfig->autoDoQuests)
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ void Engine::LogAction(char const* format, ...)
|
|||||||
if (sPlayerbotAIConfig->logInGroupOnly && !bot->GetGroup())
|
if (sPlayerbotAIConfig->logInGroupOnly && !bot->GetGroup())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG_INFO("playerbots", "{} {}", bot->GetName().c_str(), buf);
|
LOG_INFO("playerbots", "{} {} {} {}", bot->GetName().c_str(), buf, sPlayerbotAIConfig->logInGroupOnly, bot->GetGroup()->GetGroupType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,17 +100,17 @@ bool LfgJoinAction::JoinLFG()
|
|||||||
for (std::vector<uint32>::iterator i = dungeons.begin(); i != dungeons.end(); ++i)
|
for (std::vector<uint32>::iterator i = dungeons.begin(); i != dungeons.end(); ++i)
|
||||||
{
|
{
|
||||||
LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(*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;
|
continue;
|
||||||
|
|
||||||
uint32 botLevel = bot->getLevel();
|
uint32 botLevel = bot->getLevel();
|
||||||
if (dungeon->minlevel && botLevel < dungeon->minlevel)
|
if (dungeon->MinLevel && botLevel < dungeon->MinLevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (dungeon->minlevel && botLevel > dungeon->minlevel + 10)
|
if (dungeon->MinLevel && botLevel > dungeon->MinLevel + 10)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (dungeon->maxlevel && botLevel > dungeon->maxlevel)
|
if (dungeon->MaxLevel && botLevel > dungeon->MaxLevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
selected.push_back(dungeon->ID);
|
selected.push_back(dungeon->ID);
|
||||||
@@ -134,13 +134,13 @@ bool LfgJoinAction::JoinLFG()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint32 botLevel = bot->getLevel();
|
uint32 botLevel = bot->getLevel();
|
||||||
if (dungeon->minlevel && botLevel < dungeon->minlevel)
|
if (dungeon->MinLevel && botLevel < dungeon->MinLevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (dungeon->minlevel && botLevel > dungeon->minlevel + 10)
|
if (dungeon->MinLevel && botLevel > dungeon->MinLevel + 10)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (dungeon->maxlevel && botLevel > dungeon->maxlevel)
|
if (dungeon->MaxLevel && botLevel > dungeon->MaxLevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (heroic && !dungeon->difficulty)
|
if (heroic && !dungeon->difficulty)
|
||||||
@@ -173,7 +173,7 @@ bool LfgJoinAction::JoinLFG()
|
|||||||
|
|
||||||
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Dungeon as {} ({})",
|
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Dungeon as {} ({})",
|
||||||
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H",
|
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())
|
/*if (lfgState->IsSingleRole())
|
||||||
{
|
{
|
||||||
@@ -213,7 +213,7 @@ bool LfgJoinAction::JoinLFG()
|
|||||||
|
|
||||||
pState->SetType(LFG_TYPE_RANDOM_DUNGEON);
|
pState->SetType(LFG_TYPE_RANDOM_DUNGEON);
|
||||||
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Random Dungeon as {} ({})",
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
else if (heroic)
|
else if (heroic)
|
||||||
@@ -221,19 +221,19 @@ bool LfgJoinAction::JoinLFG()
|
|||||||
pState->SetType(LFG_TYPE_HEROIC_DUNGEON);
|
pState->SetType(LFG_TYPE_HEROIC_DUNGEON);
|
||||||
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Heroic Dungeon as {} ({})",
|
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Heroic Dungeon as {} ({})",
|
||||||
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H",
|
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)
|
else if (rbotAId)
|
||||||
{
|
{
|
||||||
pState->SetType(LFG_TYPE_RAID);
|
pState->SetType(LFG_TYPE_RAID);
|
||||||
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, RbotAId as {} ({})",
|
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
|
else
|
||||||
{
|
{
|
||||||
pState->SetType(LFG_TYPE_DUNGEON);
|
pState->SetType(LFG_TYPE_DUNGEON);
|
||||||
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: queues LFG, Dungeon as {} ({})",
|
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
|
// Set RbotAId Browser comment
|
||||||
|
|||||||
Reference in New Issue
Block a user