From eb26f27a21a74bd6db8251a62bc7483a4027b5f6 Mon Sep 17 00:00:00 2001 From: KiriX Date: Thu, 22 Oct 2009 14:10:27 +0200 Subject: [PATCH] [8708] Fixed damage from spell 1120 and ranks when target below or equal 25% of health. Signed-off-by: ApoC --- sql/mangos_spell_check.sql | 1 + src/game/SpellAuras.cpp | 11 +++++++++++ src/shared/revision_nr.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index aa401c50f..3bcb54084 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -345,6 +345,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas /*id fm familyMaskA fmMaskB icon vis cat eff aur ef name code */ ( 0, 3,0x0000000020000000,0x00000000, -1, -1, -1, 2, -1,-1,'Arcane Blast', 'Spell::EffectSchoolDMG'), ( 0, 9,0x0000000000000800,0x00000000, -1, -1, -1, 2, -1,-1,'Arcane Shot', 'Spell::EffectSchoolDMG'), +( 0, 5,0x0000000000004000,0x00000000, -1, -1, -1, -1, -1,-1,'Drain Soul', 'Aura::HandlePeriodicDamage'), ( 0,10,0x0000000000004000,0x00000000, -1, -1, -1, 2, -1,-1,'Avenger\'s Shield', 'Spell::EffectSchoolDMG'), ( 0, 4,0x0000040000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Bloodthirst', 'Spell::EffectSchoolDMG'), (0, 4,0x0000000000000001,0x00000000, -1, 867, -1, 3, -1,-1,'Charge', 'Spell::EffectDummy'), diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index afed0ac18..75a166efb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4509,6 +4509,17 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) } break; } + case SPELLFAMILY_WARLOCK: + { + // Drain Soul + if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000)) + { + if (m_target->GetHealth() * 100 / m_target->GetMaxHealth() <= 25) + m_modifier.m_amount *= 4; + return; + } + break; + } case SPELLFAMILY_DRUID: { // Rake diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 57918381f..ccc294964 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8707" + #define REVISION_NR "8708" #endif // __REVISION_NR_H__