From 727a2cc0cc3d5a11ff0cedd3c6d6a87eb7b370a1 Mon Sep 17 00:00:00 2001 From: ProducerZekServer Date: Thu, 27 May 2021 02:54:55 +0000 Subject: [PATCH] Removed Magic Numbers --- common/eq_constants.h | 2 ++ zone/spells.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/eq_constants.h b/common/eq_constants.h index a585bdd87..b4aba72b4 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -437,6 +437,8 @@ static const uint8 SkillDamageTypes[EQ::skills::HIGHEST_SKILL + 1] = // change t #define INVALID_INDEX -1 static const uint32 MAX_SPELL_DB_ID_VAL = 65535; +static const uint32 DB_SPELL_CAZIC_TOUCH = 982; +static const uint32 DB_SPELL_TOUCH_OF_VINITRAS = 2859; enum ChatChannelNames : uint16 { diff --git a/zone/spells.cpp b/zone/spells.cpp index 3b1a6b271..f645b4749 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2045,9 +2045,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui return false; //Cazic Touch targets the pet owner instead of the pet when said pet is tanking. - if (RuleB(Spells,CazicTouchTargetsPetOwner) && spell_id == 982 && spell_target->HasOwner()) { + 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) spell_target = owner; }