aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 48ab431147a..861bf997a99 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -171,6 +171,7 @@ enum AnimalBloodPoolSpell
SPELL_SPAWN_BLOOD_POOL = 63471
};
+// 46221 - Animal Blood
class spell_gen_animal_blood : public AuraScript
{
PrepareAuraScript(spell_gen_animal_blood);
@@ -201,6 +202,27 @@ class spell_gen_animal_blood : public AuraScript
}
};
+// 63471 -Spawn Blood Pool
+class spell_spawn_blood_pool : public SpellScript
+{
+ PrepareSpellScript(spell_spawn_blood_pool);
+
+ void SetDest(SpellDestination& dest)
+ {
+ Unit* caster = GetCaster();
+ Position summonPos = caster->GetPosition();
+ LiquidData liquidStatus;
+ if (caster->GetMap()->GetLiquidStatus(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), MAP_ALL_LIQUIDS, &liquidStatus, caster->GetCollisionHeight()))
+ summonPos.m_positionZ = liquidStatus.level;
+ dest.Relocate(summonPos);
+ }
+
+ void Register() override
+ {
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_spawn_blood_pool::SetDest, EFFECT_0, TARGET_DEST_CASTER);
+ }
+};
+
class spell_gen_arcane_charge : public SpellScript
{
PrepareSpellScript(spell_gen_arcane_charge);
@@ -4195,6 +4217,7 @@ void AddSC_generic_spell_scripts()
RegisterAuraScript(spell_gen_adaptive_warding);
RegisterSpellScript(spell_gen_allow_cast_from_item_only);
RegisterAuraScript(spell_gen_animal_blood);
+ RegisterSpellScript(spell_spawn_blood_pool);
RegisterSpellScript(spell_gen_arcane_charge);
RegisterAuraScript(spell_gen_arena_drink);
RegisterAuraScript(spell_gen_aura_of_anger);