From 7678a905c8ba3ee4b52fca5c080a43471c40cdb4 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 24 Dec 2019 14:57:58 -0500 Subject: [PATCH] Modified bot command 'pull' to ignore engaged targets --- zone/bot.cpp | 2 +- zone/bot_command.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index c695d7169..b7be0c962 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2825,7 +2825,7 @@ void Bot::AI_Process() return; } - else if (HasTargetReflection()) { + else if (GetTarget()->GetHateList().size()) { WipeHateList(); SetTarget(nullptr); diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 51fa44ced..8030d4898 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -4264,6 +4264,12 @@ void bot_command_pull(Client *c, const Seperator *sep) return; } + if (target_mob->IsNPC() && target_mob->GetHateList().size()) { + + c->Message(m_fail, "Your current target is already engaged!"); + return; + } + Bot* bot_puller = nullptr; for (auto bot_iter : sbl) {