aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Pet
diff options
context:
space:
mode:
authorTeleqraph <nyrdeveloper@gmail.com>2023-08-10 11:00:06 +0200
committerGitHub <noreply@github.com>2023-08-10 11:00:06 +0200
commit6e42596374ef7e530055fcdba82a63cb6ffb311e (patch)
treebfb316bb393277a1b91bd0386ea3966dd30ec832 /src/server/scripts/Pet
parent0d8221d558fc81031bd8f66f4bb83629653f2809 (diff)
Scripts/Spells: Implement Divine Image (#29034)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/scripts/Pet')
-rw-r--r--src/server/scripts/Pet/pet_priest.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp
index 7dae5899a51..e8304045dbd 100644
--- a/src/server/scripts/Pet/pet_priest.cpp
+++ b/src/server/scripts/Pet/pet_priest.cpp
@@ -24,14 +24,18 @@
#include "Creature.h"
#include "PassiveAI.h"
#include "PetAI.h"
+#include "TemporarySummon.h"
enum PriestSpells
{
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228,
SPELL_PRIEST_SHADOWFIEND_DEATH = 57989,
- SPELL_PRIEST_LIGHTWELL_CHARGES = 59907
+ SPELL_PRIEST_LIGHTWELL_CHARGES = 59907,
+ SPELL_PRIEST_INVOKE_THE_NAARU = 196687,
+ SPELL_PRIEST_DIVINE_IMAGE_SPELL_CHECK = 405216
};
+// 189820 - Lightwell
struct npc_pet_pri_lightwell : public PassiveAI
{
npc_pet_pri_lightwell(Creature* creature) : PassiveAI(creature)
@@ -50,6 +54,7 @@ struct npc_pet_pri_lightwell : public PassiveAI
}
};
+// 19668 - Shadowfiend
struct npc_pet_pri_shadowfiend : public PetAI
{
npc_pet_pri_shadowfiend(Creature* creature) : PetAI(creature) { }
@@ -65,8 +70,28 @@ struct npc_pet_pri_shadowfiend : public PetAI
}
};
+// 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);
+ }
+};
+
void AddSC_priest_pet_scripts()
{
RegisterCreatureAI(npc_pet_pri_lightwell);
RegisterCreatureAI(npc_pet_pri_shadowfiend);
+ RegisterCreatureAI(npc_pet_pri_divine_image);
}