mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08: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:
@@ -799,6 +799,11 @@ bool NPC::Process()
|
||||
}
|
||||
}
|
||||
|
||||
if (bot_attack_flag_timer.Check()) {
|
||||
bot_attack_flag_timer.Disable();
|
||||
ClearBotAttackFlags();
|
||||
}
|
||||
|
||||
AI_Process();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user