[Bug Fix] IsDamage test for lifetap was not complete. (#2213)

* [Bug Fix] IsDamage test for lifetap was not complete.

* Fix magic # and formatting as per Kingly

* Added #define
This commit is contained in:
Paul Coene 2022-05-27 15:30:38 -04:00 committed by GitHub
parent d7f38361f2
commit aaaee6c6a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View File

@ -101,12 +101,16 @@ bool IsSacrificeSpell(uint16 spell_id)
bool IsLifetapSpell(uint16 spell_id) bool IsLifetapSpell(uint16 spell_id)
{ {
// Ancient Lifebane: 2115 if (
if (IsValidSpell(spell_id) && IsValidSpell(spell_id) &&
(spells[spell_id].target_type == ST_Tap || (
spells[spell_id].target_type == ST_Tap ||
spells[spell_id].target_type == ST_TargetAETap || spells[spell_id].target_type == ST_TargetAETap ||
spell_id == 2115)) spell_id == SPELL_ANCIENT_LIFEBANE
)
) {
return true; return true;
}
return false; return false;
} }
@ -139,7 +143,7 @@ bool IsEvacSpell(uint16 spellid)
bool IsDamageSpell(uint16 spellid) bool IsDamageSpell(uint16 spellid)
{ {
if (spells[spellid].target_type == ST_Tap) if (IsLifetapSpell(spellid))
return false; return false;
for (int o = 0; o < EFFECT_COUNT; o++) { for (int o = 0; o < EFFECT_COUNT; o++) {

View File

@ -169,6 +169,7 @@
#define SPELL_ILLUSION_FEMALE 1731 #define SPELL_ILLUSION_FEMALE 1731
#define SPELL_ILLUSION_MALE 1732 #define SPELL_ILLUSION_MALE 1732
#define SPELL_UNSUMMON_SELF 892 #define SPELL_UNSUMMON_SELF 892
#define SPELL_ANCIENT_LIFEBANE 2115
//spellgroup ids //spellgroup ids
#define SPELLGROUP_FRENZIED_BURNOUT 2754 #define SPELLGROUP_FRENZIED_BURNOUT 2754