Allow NPCs to aggro player pets with NPCAggro field set in database and new rule AggroPlayerPets set to true (#1450)

Co-authored-by: Natedog2012 <joewalters2012@gmail.com>
This commit is contained in:
Natedog2012
2021-07-08 11:38:57 -05:00
committed by GitHub
parent f5ab135906
commit 36e009a5bd
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
}
Mob *pet_owner = mob->GetOwner();
if (pet_owner && pet_owner->IsClient()) {
if (pet_owner && pet_owner->IsClient() && (!RuleB(Aggro, AggroPlayerPets) || pet_owner->CastToClient()->GetGM())) {
return false;
}