aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp19
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp28
2 files changed, 28 insertions, 19 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 9fd56495db3..a42501a8ac5 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5928,25 +5928,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
break;
}
- case SPELLFAMILY_PRIEST:
- {
- switch(m_spellInfo->Id)
- {
- // Pain and Suffering
- case 47948:
- {
- if (!unitTarget)
- return;
- // Refresh Shadow Word: Pain on target
- if (AuraEffect * aur = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x8000, 0, 0, m_caster->GetGUID()))
- aur->GetBase()->RefreshDuration();
- return;
- }
- default:
- break;
- }
- break;
- }
case SPELLFAMILY_HUNTER:
{
switch(m_spellInfo->Id)
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index c78efc15a22..8c2fffa9c5b 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -22,6 +22,7 @@
*/
#include "ScriptPCH.h"
+#include "SpellAuraEffects.h"
enum PriestSpells
{
@@ -30,6 +31,28 @@ enum PriestSpells
PRIEST_SPELL_PENANCE_R1_HEAL = 47757,
};
+// 47948 Pain and Suffering (proc)
+class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
+{
+ void HandleEffectScriptEffect(SpellEffIndex effIndex)
+ {
+ // Refresh Shadow Word: Pain on target
+ if (Unit *unitTarget = GetHitUnit())
+ if (AuraEffect* aur = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x8000, 0, 0, GetCaster()->GetGUID()))
+ aur->GetBase()->RefreshDuration();
+ }
+
+ void Register()
+ {
+ EffectHandlers += EffectHandlerFn(spell_pri_pain_and_suffering_proc_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+SpellScript *GetSpellScript_spell_pri_pain_and_suffering_proc()
+{
+ return new spell_pri_pain_and_suffering_proc_SpellScript();
+}
+
class spell_pri_penance_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
@@ -82,6 +105,11 @@ void AddSC_priest_spell_scripts()
Script *newscript;
newscript = new Script;
+ newscript->Name = "spell_pri_pain_and_suffering_proc";
+ newscript->GetSpellScript = &GetSpellScript_spell_pri_pain_and_suffering_proc;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
newscript->Name = "spell_pri_penance";
newscript->GetSpellScript = &GetSpellScript_spell_pri_penance;
newscript->RegisterSelf();