From 25c6b055a4230ce3c9c55bf97c6170b63bf40d72 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" <277429+mackal@users.noreply.github.com> Date: Thu, 18 Aug 2022 12:34:37 -0400 Subject: [PATCH] Fix issue with trap auras casting on caster (#2378) Unsure if something changed or I just failed to test correctly --- zone/aura.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/aura.cpp b/zone/aura.cpp index 302e4e02e..8a9d62cb4 100644 --- a/zone/aura.cpp +++ b/zone/aura.cpp @@ -628,7 +628,7 @@ void Aura::ProcessEnterTrap(Mob *owner) continue; } // might need more checks ... - if (owner->IsAttackAllowed(mob) && DistanceSquared(GetPosition(), mob->GetPosition()) <= distance) { + if (mob != owner && owner->IsAttackAllowed(mob) && DistanceSquared(GetPosition(), mob->GetPosition()) <= distance) { SpellFinished(spell_id, mob); owner->RemoveAura(GetID(), false); // if we're a buff (ex. NEC) we don't want to strip :P break; @@ -646,7 +646,7 @@ void Aura::ProcessExitTrap(Mob *owner) continue; } // might need more checks ... - if (owner->IsAttackAllowed(mob)) { + if (mob != owner && owner->IsAttackAllowed(mob)) { bool in_range = DistanceSquared(GetPosition(), mob->GetPosition()) <= distance; auto it = casted_on.find(mob->GetID()); if (it != casted_on.end()) {