[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
This commit is contained in:
Fryguy 2024-01-07 12:12:21 -05:00 committed by GitHub
parent 41d9a15c74
commit c08200188f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

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

View File

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