mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-27 08:17:16 +00:00
Add bot check to IsAttackAllowed for GetUltimateOwner to skip entity list where possible
This commit is contained in:
+2
-2
@@ -745,8 +745,8 @@ bool Mob::IsAttackAllowed(Mob *target, bool isSpellAttack)
|
|||||||
// can't damage own pet (applies to everthing)
|
// can't damage own pet (applies to everthing)
|
||||||
Mob *target_owner = target->GetOwner();
|
Mob *target_owner = target->GetOwner();
|
||||||
Mob *our_owner = GetOwner();
|
Mob *our_owner = GetOwner();
|
||||||
Mob* target_ultimate_owner = target->GetUltimateOwner();
|
Mob* target_ultimate_owner = (target->IsBot() ? target->CastToBot()->GetBotOwner() : target->GetUltimateOwner());
|
||||||
Mob* our_ultimate_owner = GetUltimateOwner();
|
Mob* our_ultimate_owner = (IsBot() ? CastToBot()->GetBotOwner() : GetUltimateOwner());
|
||||||
|
|
||||||
if (target_owner && target_owner == this) {
|
if (target_owner && target_owner == this) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user