From c063d9512ed3d6320647b0ce6c891243fa305f6e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 27 Apr 2021 19:52:39 -0400 Subject: [PATCH] [Rule] Add a rule to disable the Pet Resist buff (#1337) Spells:July242002PetResists defaults to true --- common/ruletypes.h | 1 + zone/spells.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 15cc43575..5a30bfc2c 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -368,6 +368,7 @@ RULE_BOOL(Spells, AllowItemTGB, false, "Target group buff (/tgb) doesn't work wi RULE_BOOL(Spells, NPCInnateProcOverride, true, "NPC innate procs override the target type to single target") RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximum targets for rains") 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_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/spells.cpp b/zone/spells.cpp index ed4c6c57a..13c7ff1cf 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4531,7 +4531,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use // JULY 24, 2002 changes int level = GetLevel(); - if (IsPetOwnerClient() && caster->IsNPC() && !caster->IsPetOwnerClient()) { + if (RuleB(Spells,July242002PetResists) && IsPetOwnerClient() && caster->IsNPC() && !caster->IsPetOwnerClient()) { auto owner = GetOwner(); if (owner != nullptr) { target_resist = std::max(target_resist, owner->GetResist(resist_type));