From 29130131541c6b9e54a2d784c14e9db9ebec7336 Mon Sep 17 00:00:00 2001 From: RoTPvP <77220477+RoT-PvP@users.noreply.github.com> Date: Fri, 28 May 2021 19:58:00 -0700 Subject: [PATCH] Revert "Bracket fix" This reverts commit 3deb3e0cade7bbb48946f394b96b6c98911b3ae8. --- zone/spells.cpp | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 645629f3b..f645b4749 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2044,32 +2044,12 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui if(!IsValidSpell(spell_id)) return false; - //Guard Assist Code - if (RuleB(Character, PVPEnableGuardFactionAssist) && IsDetrimentalSpell(spell_id) && spell_target != this) { - if (IsClient() || HasOwner() && GetOwner()->IsClient()) { - auto& mob_list = entity_list.GetCloseMobList(spell_target); - for (auto& e : mob_list) { - auto mob = e.second; - if (mob->IsNPC() && mob->CastToNPC()->IsGuard()) { - float distance = Distance(spell_target->GetPosition(), mob->GetPosition()); - if ((mob->CheckLosFN(spell_target) || mob->CheckLosFN(this)) && distance <= 70) { - auto petorowner = this->GetOwnerOrSelf(); - if (spell_target->GetReverseFactionCon(mob) <= petorowner->GetReverseFactionCon(mob)) { - mob->AddToHateList(this); - } - } - } - } - } - } - - //Death Touch targets the pet owner instead of the pet when said pet is tanking. + //Cazic Touch targets the pet owner instead of the pet when said pet is tanking. if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target->HasOwner()) && spell_id == DB_SPELL_CAZIC_TOUCH || spell_id == DB_SPELL_TOUCH_OF_VINITRAS) { Mob* owner = spell_target->GetOwner(); - if (owner) { + if (owner) spell_target = owner; - } } if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()){