mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Scripts: Fix Blood summon position (#23088)
* Core/Scripts: Fix Blood summon position
Updates #13162
(cherry picked from commit cc3293c002)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_spawn_blood_pool';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(63471, 'spell_spawn_blood_pool');
|
||||
@@ -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->GetPhaseShift(), caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), map_liquidHeaderTypeFlags::AllLiquids, &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);
|
||||
@@ -4378,6 +4400,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);
|
||||
|
||||
Reference in New Issue
Block a user