mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
automatically action for random bots
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "ChangeTalentsAction.h"
|
||||
#include "ChatHelper.h"
|
||||
#include "Event.h"
|
||||
#include "PlayerbotFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool ChangeTalentsAction::Execute(Event event)
|
||||
@@ -82,7 +83,7 @@ bool ChangeTalentsAction::Execute(Event event)
|
||||
out.str("");
|
||||
out.clear();
|
||||
|
||||
if (paths.size() > 1 && sPlayerbotAIConfig->autoPickTalents != "full")
|
||||
if (paths.size() > 1 && false/*!sPlayerbotAIConfig->autoPickTalents*/)
|
||||
{
|
||||
out << "Found multiple specs: ";
|
||||
listPremadePaths(paths, &out);
|
||||
@@ -278,7 +279,7 @@ bool ChangeTalentsAction::AutoSelectTalents(std::ostringstream* out)
|
||||
specId = -1;
|
||||
// specLink = "";
|
||||
}
|
||||
else if (paths.size() > 1 && sPlayerbotAIConfig->autoPickTalents != "full" && !sRandomPlayerbotMgr->IsRandomBot(bot))
|
||||
else if (paths.size() > 1 && false/*!sPlayerbotAIConfig->autoPickTalents*/ && !sRandomPlayerbotMgr->IsRandomBot(bot))
|
||||
{
|
||||
*out << "Found multiple specs: ";
|
||||
listPremadePaths(paths, out);
|
||||
@@ -328,13 +329,14 @@ bool AutoSetTalentsAction::Execute(Event event)
|
||||
{
|
||||
std::ostringstream out;
|
||||
|
||||
if (sPlayerbotAIConfig->autoPickTalents == "no" && !sRandomPlayerbotMgr->IsRandomBot(bot))
|
||||
if (!sPlayerbotAIConfig->autoPickTalents || !sRandomPlayerbotMgr->IsRandomBot(bot))
|
||||
return false;
|
||||
|
||||
if (bot->GetFreeTalentPoints() <= 0)
|
||||
return false;
|
||||
|
||||
AutoSelectTalents(&out);
|
||||
PlayerbotFactory factory(bot, bot->GetLevel());
|
||||
factory.InitTalentsTree(true);
|
||||
|
||||
botAI->TellMaster(out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user