diff --git a/sql/updates/world/custom/custom_2019_08_15_00_world.sql b/sql/updates/world/custom/custom_2019_08_15_00_world.sql new file mode 100644 index 00000000000..0a03fc94587 --- /dev/null +++ b/sql/updates/world/custom/custom_2019_08_15_00_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_vp_catch_fall'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(89522, 'spell_vp_catch_fall'); + +DELETE FROM `spell_target_position` WHERE `ID`= 89526; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`) VALUES +(89526, 0, 657, -361.0174, -6.359375, 632.7807, 0.0); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 29a9e055bf7..efe10b2c7f7 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4291,6 +4291,18 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_DEST_DB); }); + // Catch Fall + ApplySpellFix({ 89526 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_DEST_DB); + }); + + // Catch Fall + ApplySpellFix({ 89522 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER); + }); + // Summon Skyfall Star ApplySpellFix({ 96260 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp index 05d12b8274a..e24d736a7ec 100644 --- a/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp +++ b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp @@ -1035,36 +1035,14 @@ class spell_vp_catch_fall : public SpellScript void SetDest(SpellDestination& dest) { - InstanceScript* instance = GetCaster()->GetInstanceScript(); - Creature* slipstream = GetCaster()->FindNearestCreature(NPC_SLIPSTREAM, 300.0f); - if (!slipstream || !instance) - { - dest.Relocate(EntranceTeleportPos); - return; - } + float zOffset = 650.0f - GetCaster()->GetPositionZ(); - ObjectGuid guid = slipstream->GetGUID(); - if (guid == instance->GetGuidData(DATA_SLIPSTREAM_ERTAN_1) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ERTAN_2) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ERTAN_3) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ENTRANCE_1) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ENTRANCE_2)) - dest.Relocate(EntranceTeleportPos); - else if (guid == instance->GetGuidData(DATA_SLIPSTREAM_ALTAIRUS_1) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ALTAIRUS_2) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ALTAIRUS_3) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ALTAIRUS_4) || - guid == instance->GetGuidData(DATA_SLIPSTREAM_ALTAIRUS_5)) - dest.Relocate(AltairusTeleportPos); - else if (guid == instance->GetGuidData(DATA_SLIPSTREAM_ASAAD_1)) - dest.Relocate(AsaadTeleportPos); - else // Safeguard to prevent any fall to death case - dest.Relocate(EntranceTeleportPos); + dest.RelocateOffset({ 0.0f, 0.0f, zOffset, 0.0f }); } void Register() { - OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_vp_catch_fall::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY); + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_vp_catch_fall::SetDest, EFFECT_0, TARGET_DEST_CASTER); } };