mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
temporary disable rndbot group strategy
This commit is contained in:
@@ -547,7 +547,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)
|
||||||
@@ -578,7 +578,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)
|
||||||
|
|||||||
@@ -523,72 +523,72 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
|
|||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (admin)
|
// if (admin)
|
||||||
|
// {
|
||||||
|
Player* bot = GetPlayerBot(guid);
|
||||||
|
if (!bot)
|
||||||
|
bot = sRandomPlayerbotMgr->GetPlayerBot(guid);
|
||||||
|
|
||||||
|
if (!bot)
|
||||||
|
return "bot not found";
|
||||||
|
|
||||||
|
if (!isRandomAccount || isRandomBot) {
|
||||||
|
return "ERROR: You can not use this command on summoned random bot.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Player* master = GET_PLAYERBOT_AI(bot)->GetMaster())
|
||||||
{
|
{
|
||||||
Player* bot = GetPlayerBot(guid);
|
if (cmd == "init=white" || cmd == "init=common")
|
||||||
if (!bot)
|
|
||||||
bot = sRandomPlayerbotMgr->GetPlayerBot(guid);
|
|
||||||
|
|
||||||
if (!bot)
|
|
||||||
return "bot not found";
|
|
||||||
|
|
||||||
if (!isRandomAccount || !isRandomBot) {
|
|
||||||
return "ERROR: You can not use this command on non-ramdom bot.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Player* master = GET_PLAYERBOT_AI(bot)->GetMaster())
|
|
||||||
{
|
{
|
||||||
if (cmd == "init=white" || cmd == "init=common")
|
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_NORMAL);
|
||||||
{
|
factory.Randomize(false);
|
||||||
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_NORMAL);
|
|
||||||
factory.Randomize(false);
|
|
||||||
return "ok";
|
|
||||||
}
|
|
||||||
else if (cmd == "init=green" || cmd == "init=uncommon")
|
|
||||||
{
|
|
||||||
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_UNCOMMON);
|
|
||||||
factory.Randomize(false);
|
|
||||||
return "ok";
|
|
||||||
}
|
|
||||||
else if (cmd == "init=blue" || cmd == "init=rare")
|
|
||||||
{
|
|
||||||
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_RARE);
|
|
||||||
factory.Randomize(false);
|
|
||||||
return "ok";
|
|
||||||
}
|
|
||||||
else if (cmd == "init=epic" || cmd == "init=purple")
|
|
||||||
{
|
|
||||||
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_EPIC);
|
|
||||||
factory.Randomize(false);
|
|
||||||
return "ok";
|
|
||||||
}
|
|
||||||
else if (cmd == "init=legendary" || cmd == "init=yellow")
|
|
||||||
{
|
|
||||||
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_LEGENDARY);
|
|
||||||
factory.Randomize(false);
|
|
||||||
return "ok";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cmd == "levelup" || cmd == "level")
|
|
||||||
{
|
|
||||||
PlayerbotFactory factory(bot, bot->getLevel());
|
|
||||||
factory.Randomize(true);
|
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
else if (cmd == "refresh")
|
else if (cmd == "init=green" || cmd == "init=uncommon")
|
||||||
{
|
{
|
||||||
PlayerbotFactory factory(bot, bot->getLevel());
|
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_UNCOMMON);
|
||||||
factory.Refresh();
|
factory.Randomize(false);
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
else if (cmd == "random")
|
else if (cmd == "init=blue" || cmd == "init=rare")
|
||||||
{
|
{
|
||||||
sRandomPlayerbotMgr->Randomize(bot);
|
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_RARE);
|
||||||
|
factory.Randomize(false);
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
else if (cmd == "init=epic" || cmd == "init=purple")
|
||||||
|
{
|
||||||
|
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_EPIC);
|
||||||
|
factory.Randomize(false);
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
else if (cmd == "init=legendary" || cmd == "init=yellow")
|
||||||
|
{
|
||||||
|
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_LEGENDARY);
|
||||||
|
factory.Randomize(false);
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cmd == "levelup" || cmd == "level")
|
||||||
|
{
|
||||||
|
PlayerbotFactory factory(bot, bot->getLevel());
|
||||||
|
factory.Randomize(true);
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
else if (cmd == "refresh")
|
||||||
|
{
|
||||||
|
PlayerbotFactory factory(bot, bot->getLevel());
|
||||||
|
factory.Refresh();
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
else if (cmd == "random")
|
||||||
|
{
|
||||||
|
sRandomPlayerbotMgr->Randomize(bot);
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
return "unknown command";
|
return "unknown command";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -883,7 +883,7 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
|||||||
}
|
}
|
||||||
else if (master && member != master->GetGUID())
|
else if (master && member != master->GetGUID())
|
||||||
{
|
{
|
||||||
out << ProcessBotCommand(cmdStr, member, master->GetGUID(), true, master->GetSession()->GetAccountId(), master->GetGuildId());
|
out << ProcessBotCommand(cmdStr, member, master->GetGUID(), master->GetSession()->GetSecurity() >= SEC_GAMEMASTER, master->GetSession()->GetAccountId(), master->GetGuildId());
|
||||||
}
|
}
|
||||||
else if (!master)
|
else if (!master)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -941,7 +941,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player)
|
|||||||
uint32 teleport = GetEventValue(bot, "teleport");
|
uint32 teleport = GetEventValue(bot, "teleport");
|
||||||
if (!teleport)
|
if (!teleport)
|
||||||
{
|
{
|
||||||
LOG_INFO("players", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName());
|
LOG_INFO("playerbots", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName());
|
||||||
Refresh(player);
|
Refresh(player);
|
||||||
RandomTeleportForLevel(player);
|
RandomTeleportForLevel(player);
|
||||||
uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, sPlayerbotAIConfig->maxRandomBotTeleportInterval);
|
uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, sPlayerbotAIConfig->maxRandomBotTeleportInterval);
|
||||||
@@ -1490,8 +1490,8 @@ bool RandomPlayerbotMgr::IsRandomBot(Player* bot)
|
|||||||
bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot)
|
bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot)
|
||||||
{
|
{
|
||||||
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(bot);
|
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(bot);
|
||||||
if (sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid)))
|
if (!sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid)))
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
return GetEventValue(bot, "add");
|
return GetEventValue(bot, "add");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
if (!IsMovingAllowed(mapId, x, y, z)) {
|
if (!IsMovingAllowed(mapId, x, y, z)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
UpdateMovementState();
|
||||||
// if (bot->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_FALLING_FAR)) {
|
// if (bot->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_FALLING_FAR)) {
|
||||||
// bot->Say("I'm falling!, flag:" + std::to_string(bot->m_movementInfo.GetMovementFlags()), LANG_UNIVERSAL);
|
// bot->Say("I'm falling!, flag:" + std::to_string(bot->m_movementInfo.GetMovementFlags()), LANG_UNIVERSAL);
|
||||||
// return false;
|
// return false;
|
||||||
@@ -166,7 +167,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
// UpdateMovementState();
|
//
|
||||||
// // LOG_DEBUG("playerbots", "IsMovingAllowed {}", IsMovingAllowed());
|
// // LOG_DEBUG("playerbots", "IsMovingAllowed {}", IsMovingAllowed());
|
||||||
// bot->AddUnitMovementFlag()
|
// bot->AddUnitMovementFlag()
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class PlayerbotAI;
|
|||||||
class LootStrategyValue : public ManualSetValue<LootStrategy*>
|
class LootStrategyValue : public ManualSetValue<LootStrategy*>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LootStrategyValue(PlayerbotAI* botAI, std::string const name = "loot strategy") : ManualSetValue<LootStrategy*>(botAI, all, name) { }
|
LootStrategyValue(PlayerbotAI* botAI, std::string const name = "loot strategy") : ManualSetValue<LootStrategy*>(botAI, normal, name) { }
|
||||||
virtual ~LootStrategyValue();
|
virtual ~LootStrategyValue();
|
||||||
|
|
||||||
std::string const Save() override;
|
std::string const Save() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user