mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 06:40:26 +00:00
[Bots] Add attack flag when told to attack (#4490)
This adds a flag to mobs that are told to attack by their owner to prevent unintended attacks. Previously, if you were to send your bots to attack a target and then switch targets: before casters land their spell or if melee (especially anyone with pets) hasn't engaged before the target switch, they could switch to your new target and attack. This adds a flag upon attack and bots will only attack flagged targets.
This commit is contained in:
+1
-1
@@ -2978,7 +2978,7 @@ void Bot::SetOwnerTarget(Client* bot_owner) {
|
||||
if (NOT_HOLDING && NOT_PASSIVE) {
|
||||
|
||||
auto attack_target = bot_owner->GetTarget();
|
||||
if (attack_target) {
|
||||
if (attack_target && HasBotAttackFlag(attack_target)) {
|
||||
|
||||
InterruptSpell();
|
||||
WipeHateList();
|
||||
|
||||
Reference in New Issue
Block a user