From 6b7bf8ade788beec762e04aac4cb399ff33af467 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 31 Jul 2023 16:53:48 +0800 Subject: [PATCH] random bot teleport --- conf/playerbots.conf.dist | 2 +- src/RandomPlayerbotMgr.cpp | 4 ++-- src/strategy/actions/ReviveFromCorpseAction.cpp | 2 +- src/strategy/generic/RpgStrategy.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 53c7c5dc..0f2fe785 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -543,7 +543,7 @@ AiPlayerbot.RandomBotMaps = 0,1,530,571 AiPlayerbot.RandomBotQuestItems = "6948,5175,5176,5177,5178,16309,12382,13704,11000" # PvP Restricted Zones (bots don't pvp) -AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323,4395,3703" +AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323,4395,3703,33" # Spells every random bot will learn on randomize (54197 - cold weather flying) AiPlayerbot.RandomBotSpellIds = "54197" diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 0559f9e2..e4b33754 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -2192,7 +2192,7 @@ void RandomPlayerbotMgr::ChangeStrategy(Player* player) { LOG_INFO("playerbots", "Changing strategy for bot #{} <{}> to RPG", bot, player->GetName().c_str()); LOG_INFO("playerbots", "Bot #{} <{}>: sent to inn", bot, player->GetName().c_str()); - RandomTeleportForRpg(player); + RandomTeleportForLevel(player); SetEventValue(bot, "teleport", 1, sPlayerbotAIConfig->maxRandomBotInWorldTime); } @@ -2212,7 +2212,7 @@ void RandomPlayerbotMgr::ChangeStrategyOnce(Player* player) else { LOG_INFO("playerbots", "Bot #{} <{}>: sent to inn", bot, player->GetName().c_str()); - RandomTeleportForRpg(player); + RandomTeleportForLevel(player); } } diff --git a/src/strategy/actions/ReviveFromCorpseAction.cpp b/src/strategy/actions/ReviveFromCorpseAction.cpp index c93aff5e..7c9fb910 100644 --- a/src/strategy/actions/ReviveFromCorpseAction.cpp +++ b/src/strategy/actions/ReviveFromCorpseAction.cpp @@ -92,7 +92,7 @@ bool FindCorpseAction::Execute(Event event) LOG_DEBUG("playerbots", "Bot {} {}:{} <{}>: died too many times and was sent to an inn", bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str()); context->GetValue("death count")->Set(0); - sRandomPlayerbotMgr->RandomTeleportForRpg(bot); + sRandomPlayerbotMgr->RandomTeleportForLevel(bot); return true; } } diff --git a/src/strategy/generic/RpgStrategy.cpp b/src/strategy/generic/RpgStrategy.cpp index 46ebfd25..d0b8b0c8 100644 --- a/src/strategy/generic/RpgStrategy.cpp +++ b/src/strategy/generic/RpgStrategy.cpp @@ -55,7 +55,7 @@ void RpgStrategy::InitTriggers(std::vector& triggers) //triggers.push_back(new TriggerNode("rpg spell", NextAction::array(0, new NextAction("rpg spell", 1.001f), nullptr))); //triggers.push_back(new TriggerNode("rpg craft", NextAction::array(0, new NextAction("rpg craft", 1.001f), nullptr))); // triggers.push_back(new TriggerNode("rpg trade useful", NextAction::array(0, new NextAction("rpg trade useful", 1.030f), nullptr))); - triggers.push_back(new TriggerNode("rpg duel", NextAction::array(0, new NextAction("rpg duel", 1.010f), nullptr))); + // triggers.push_back(new TriggerNode("rpg duel", NextAction::array(0, new NextAction("rpg duel", 1.010f), nullptr))); } void RpgStrategy::InitMultipliers(std::vector& multipliers)