aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Pet
diff options
context:
space:
mode:
authorTeleqraph <nyrdeveloper@gmail.com>2023-08-11 10:59:39 +0200
committerGitHub <noreply@github.com>2023-08-11 10:59:39 +0200
commit8161bce524d4efd3bb30ee15fdce720215c66cc9 (patch)
tree297b31a44b95eb8b8019cdc07715c25908973129 /src/server/scripts/Pet
parent3a93e5c9888524646aafa69625c14efe3151439c (diff)
Scripts/Spells: Implement Atonement (Passive, pet), Power Leech (Passive, pet) and Essence Devourer (#29170)
Diffstat (limited to 'src/server/scripts/Pet')
-rw-r--r--src/server/scripts/Pet/pet_priest.cpp60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp
index e8304045dbd..a6c9940527e 100644
--- a/src/server/scripts/Pet/pet_priest.cpp
+++ b/src/server/scripts/Pet/pet_priest.cpp
@@ -28,11 +28,31 @@
enum PriestSpells
{
- SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228,
- SPELL_PRIEST_SHADOWFIEND_DEATH = 57989,
- SPELL_PRIEST_LIGHTWELL_CHARGES = 59907,
+ SPELL_PRIEST_ATONEMENT = 81749,
+ SPELL_PRIEST_ATONEMENT_PASSIVE = 195178,
+ SPELL_PRIEST_DIVINE_IMAGE_SPELL_CHECK = 405216,
SPELL_PRIEST_INVOKE_THE_NAARU = 196687,
- SPELL_PRIEST_DIVINE_IMAGE_SPELL_CHECK = 405216
+ SPELL_PRIEST_LIGHTWELL_CHARGES = 59907
+};
+
+// 198236 - Divine Image
+struct npc_pet_pri_divine_image : public PassiveAI
+{
+ npc_pet_pri_divine_image(Creature* creature) : PassiveAI(creature) { }
+
+ void IsSummonedBy(WorldObject* summoner) override
+ {
+ me->CastSpell(me, SPELL_PRIEST_INVOKE_THE_NAARU);
+
+ if (me->ToTempSummon()->IsGuardian() && summoner->IsUnit())
+ static_cast<Guardian*>(me)->SetBonusDamage(summoner->ToUnit()->SpellBaseHealingBonusDone(SPELL_SCHOOL_MASK_HOLY));
+ }
+
+ void OnDespawn() override
+ {
+ if (Unit* owner = me->GetOwner())
+ owner->RemoveAura(SPELL_PRIEST_DIVINE_IMAGE_SPELL_CHECK);
+ }
};
// 189820 - Lightwell
@@ -55,9 +75,10 @@ struct npc_pet_pri_lightwell : public PassiveAI
};
// 19668 - Shadowfiend
-struct npc_pet_pri_shadowfiend : public PetAI
+// 62982 - Mindbender
+struct npc_pet_pri_shadowfiend_mindbender : public PetAI
{
- npc_pet_pri_shadowfiend(Creature* creature) : PetAI(creature) { }
+ npc_pet_pri_shadowfiend_mindbender(Creature* creature) : PetAI(creature) { }
void IsSummonedBy(WorldObject* summonerWO) override
{
@@ -65,33 +86,14 @@ struct npc_pet_pri_shadowfiend : public PetAI
if (!summoner)
return;
- if (summoner->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOWFIEND))
- DoCastAOE(SPELL_PRIEST_SHADOWFIEND_DEATH);
- }
-};
-
-// 198236 - Divine Image
-struct npc_pet_pri_divine_image : public PassiveAI
-{
- npc_pet_pri_divine_image(Creature* creature) : PassiveAI(creature) { }
-
- void IsSummonedBy(WorldObject* summoner) override
- {
- me->CastSpell(me, SPELL_PRIEST_INVOKE_THE_NAARU);
- if (me->ToTempSummon()->IsGuardian() && summoner->IsUnit())
- static_cast<Guardian*>(me)->SetBonusDamage(summoner->ToUnit()->SpellBaseHealingBonusDone(SPELL_SCHOOL_MASK_HOLY));
- }
-
- void OnDespawn() override
- {
- if (Unit* owner = me->GetOwner())
- owner->RemoveAura(SPELL_PRIEST_DIVINE_IMAGE_SPELL_CHECK);
+ if (summoner->HasAura(SPELL_PRIEST_ATONEMENT))
+ DoCastSelf(SPELL_PRIEST_ATONEMENT_PASSIVE, TRIGGERED_FULL_MASK);
}
};
void AddSC_priest_pet_scripts()
{
- RegisterCreatureAI(npc_pet_pri_lightwell);
- RegisterCreatureAI(npc_pet_pri_shadowfiend);
RegisterCreatureAI(npc_pet_pri_divine_image);
+ RegisterCreatureAI(npc_pet_pri_lightwell);
+ RegisterCreatureAI(npc_pet_pri_shadowfiend_mindbender);
}