mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
more target validation for bots to prevent pets from getting hit with AEs and pets trying to attack invalid targets
This commit is contained in:
@@ -2113,6 +2113,13 @@ void Bot::AI_Process()
|
||||
|
||||
// TARGET VALIDATION
|
||||
if (!IsValidTarget(bot_owner, leash_owner, lo_distance, leash_distance, tar, tar_distance)) {
|
||||
if (HasPet()) {
|
||||
if (tar && GetPet()->GetTarget() && GetPet()->GetTarget() == tar) {
|
||||
GetPet()->WipeHateList();
|
||||
GetPet()->SetTarget(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user