diff --git a/common/eq_constants.h b/common/eq_constants.h index 057051ff6..1a4f3c462 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -440,10 +440,9 @@ 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; - -static const uint32 DB_FACTION_GEM_CHOPPERS = 255; -static const uint32 DB_FACTION_HERETICS = 265; -static const uint32 DB_FACTION_KING_AKANON = 333; +static const uint32 DB_FACTION_GEM_CHOPPERS = 255; +static const uint32 DB_FACTION_HERETICS = 265; +static const uint32 DB_FACTION_KING_AKANON = 333; enum ChatChannelNames : uint16 { diff --git a/common/ruletypes.h b/common/ruletypes.h index c9989383c..ae1625ef5 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -372,6 +372,7 @@ RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximu RULE_BOOL(Spells, NPCSpellPush, false, "Enable spell push on NPCs") RULE_BOOL(Spells, July242002PetResists, true, "Enable Pets using PCs resist change from July 24 2002") RULE_INT(Spells, AOEMaxTargets, 0, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.") +RULE_BOOL(Spells, CazicTouchTargetsPetOwner, true, "If True, causes Cazic Touch to swap targets from pet to pet owner if a pet is tanking.") RULE_BOOL(Spells, PreventFactionWarOnCharmBreak, false, "Enable spell interupts and dot removal on charm break to prevent faction wars.") RULE_BOOL(Spells, AllowDoubleInvis, false, "Allows you to cast invisibility spells on a player that is already invisible") RULE_BOOL(Spells, AllowSpellMemorizeFromItem, false, "Allows players to memorize spells by right-clicking spell scrolls") diff --git a/zone/spells.cpp b/zone/spells.cpp index ec5a2c978..0197d35c6 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2046,7 +2046,16 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui if(!IsValidSpell(spell_id)) return false; - //Guard Assist Code + //Death 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) { + spell_target = owner; + } + } + + //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); @@ -2062,8 +2071,8 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui } } } - } - } + } + } if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()){ if(IsClient()){