From c08200188f3742637e6e27d78a6834bd6bbcccc7 Mon Sep 17 00:00:00 2001 From: Fryguy Date: Sun, 7 Jan 2024 12:12:21 -0500 Subject: [PATCH] [Bug Fix] Harm Touch Unholy Disc Type (#3874) * [Bug Fix] Harm Touch Unholy Disc Type Added an small if block in the ResistSpell() function to set the correct resist type, disease,when HT is casted while the Unholy Disc is up. * Remove Extra Space --- common/spdat.h | 3 +++ zone/spells.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/common/spdat.h b/common/spdat.h index a427a1126..10c8f8103 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -205,6 +205,9 @@ #define SPELL_VAMPIRIC_EMBRACE 821 #define SPELL_VAMPIRIC_EMBRACE_OF_SHADOW 822 +// discipline IDs. +#define DISC_UNHOLY_AURA 4520 + //spellgroup ids #define SPELLGROUP_FRENZIED_BURNOUT 2754 #define SPELLGROUP_ILLUSION_OF_GRANDEUR 38603 diff --git a/zone/spells.cpp b/zone/spells.cpp index 612aae0d3..0ea0c5108 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5127,6 +5127,12 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use } } + // Special case. If the caster has the Unholy Aura Discipline activated and the spell is HT, + // or improved HT then the resist type is disease. + if ((spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2 || spell_id == SPELL_IMP_HARM_TOUCH) && caster->IsClient() && caster->CastToClient()->FindBuff(DISC_UNHOLY_AURA)) { + resist_type = RESIST_DISEASE; + } + //Get the resist chance for the target if(resist_type == RESIST_NONE || spells[spell_id].no_resist) {