[Rule] Add a rule to disable the Pet Resist buff (#1337)

Spells:July242002PetResists defaults to true
This commit is contained in:
Michael Cook (mackal) 2021-04-27 19:52:39 -04:00 committed by GitHub
parent 39de9c04f6
commit c063d9512e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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));