aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 4b0547e6d3b..9a2062a475d 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -27,6 +27,7 @@
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
#include "SpellScript.h"
+#include "TemporarySummon.h"
enum PriestSpells
{
@@ -38,6 +39,7 @@ enum PriestSpells
SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL = 56161,
SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL = 48153,
SPELL_PRIEST_ITEM_EFFICIENCY = 37595,
+ SPELL_PRIEST_LIGHTWELL_CHARGES = 59907,
SPELL_PRIEST_MANA_LEECH_PROC = 34650,
SPELL_PRIEST_PENANCE_R1 = 47540,
SPELL_PRIEST_PENANCE_R1_DAMAGE = 47758,
@@ -70,6 +72,16 @@ enum PriestSpellIcons
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874,
};
+enum Mics
+{
+ PRIEST_LIGHTWELL_NPC_1 = 31897,
+ PRIEST_LIGHTWELL_NPC_2 = 31896,
+ PRIEST_LIGHTWELL_NPC_3 = 31895,
+ PRIEST_LIGHTWELL_NPC_4 = 31894,
+ PRIEST_LIGHTWELL_NPC_5 = 31893,
+ PRIEST_LIGHTWELL_NPC_6 = 31883
+};
+
class PowerCheck
{
public:
@@ -678,6 +690,48 @@ class spell_pri_item_t6_trinket : public SpellScriptLoader
}
};
+// 60123 - Lightwell
+class spell_pri_lightwell : public SpellScript
+{
+ PrepareSpellScript(spell_pri_lightwell);
+
+ bool Load() override
+ {
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /* effIndex */)
+ {
+ Creature* caster = GetCaster()->ToCreature();
+ if (!caster || !caster->IsSummon())
+ return;
+
+ uint32 lightwellRenew = 0;
+ switch (caster->GetEntry())
+ {
+ case PRIEST_LIGHTWELL_NPC_1: lightwellRenew = 7001; break;
+ case PRIEST_LIGHTWELL_NPC_2: lightwellRenew = 27873; break;
+ case PRIEST_LIGHTWELL_NPC_3: lightwellRenew = 27874; break;
+ case PRIEST_LIGHTWELL_NPC_4: lightwellRenew = 28276; break;
+ case PRIEST_LIGHTWELL_NPC_5: lightwellRenew = 48084; break;
+ case PRIEST_LIGHTWELL_NPC_6: lightwellRenew = 48085; break;
+ }
+
+ // proc a spellcast
+ if (Aura* chargesAura = caster->GetAura(SPELL_PRIEST_LIGHTWELL_CHARGES))
+ {
+ caster->CastSpell(GetHitUnit(), lightwellRenew, caster->ToTempSummon()->GetSummonerGUID());
+ if (chargesAura->ModCharges(-1))
+ caster->ToTempSummon()->UnSummon();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_pri_lightwell::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
// -7001 - Lightwell Renew
class spell_pri_lightwell_renew : public SpellScriptLoader
{
@@ -1467,6 +1521,7 @@ void AddSC_priest_spell_scripts()
new spell_pri_imp_shadowform();
new spell_pri_improved_spirit_tap();
new spell_pri_item_t6_trinket();
+ RegisterSpellScript(spell_pri_lightwell);
new spell_pri_lightwell_renew();
new spell_pri_mana_leech();
new spell_pri_mind_sear();