diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-11-24 12:07:19 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-11-24 12:07:19 +0100 |
| commit | 95ca7148246ab28d9b860cc20443121eb3ca499f (patch) | |
| tree | d5f1ff5e10abf01a3ab5976e91376669a6943c49 /src/server/scripts | |
| parent | ed599208ea8492319dd748daa1151318fd3ba03b (diff) | |
Core/Movement: Replace MotionMaster::MoveJumpWithGravity with new jump height based MoveJump
Diffstat (limited to 'src/server/scripts')
6 files changed, 15 insertions, 38 deletions
diff --git a/src/server/scripts/BrokenIsles/MawOfSouls/boss_ymiron_the_fallen_king.cpp b/src/server/scripts/BrokenIsles/MawOfSouls/boss_ymiron_the_fallen_king.cpp index b6ca8109f40..96ee6e52dd9 100644 --- a/src/server/scripts/BrokenIsles/MawOfSouls/boss_ymiron_the_fallen_king.cpp +++ b/src/server/scripts/BrokenIsles/MawOfSouls/boss_ymiron_the_fallen_king.cpp @@ -246,7 +246,7 @@ struct boss_ymiron_the_fallen_king : public BossAI me->RemoveAurasDueToSpell(SPELL_KNEELING); scheduler.Schedule(2s, [this](TaskContext /*task*/) { - me->GetMotionMaster()->MoveJumpWithGravity(YmironIntroJumpPos, 24.0f, 25.31545448303222656, EVENT_JUMP); + me->GetMotionMaster()->MoveJump(EVENT_JUMP, YmironIntroJumpPos, 24.0f, 2.0f); }); } diff --git a/src/server/scripts/BrokenIsles/zone_mardum.cpp b/src/server/scripts/BrokenIsles/zone_mardum.cpp index 2f0cdd852c5..adba190c0e4 100644 --- a/src/server/scripts/BrokenIsles/zone_mardum.cpp +++ b/src/server/scripts/BrokenIsles/zone_mardum.cpp @@ -216,7 +216,7 @@ struct npc_kayn_sunfury_invasion_begins : public ScriptedAI me->SendPlaySpellVisualKit(SPELL_VISUAL_KIT_KAYN_WINGS, 4, 3000); me->PlayObjectSound(SOUND_SPELL_DOUBLE_JUMP, me->GetGUID(), summonerPlayer); me->SendPlaySpellVisualKit(SPELL_VISUAL_KIT_KAYN_DOUBLE_JUMP, 0, 0); - me->GetMotionMaster()->MoveJumpWithGravity(KaynDoubleJumpPosition, 24.0, 0.9874f, POINT_KAYN_MOVE_TO_DEMON); + me->GetMotionMaster()->MoveJump(POINT_KAYN_MOVE_TO_DEMON, KaynDoubleJumpPosition, 24.0f, {}, 1.5f); } else if (pointId == POINT_KAYN_MOVE_TO_DEMON) { @@ -244,7 +244,7 @@ struct npc_jayce_darkweaver_invasion_begins : public ScriptedAI if (pathId == PATH_JAYCE_INVASION_BEGINS) { me->CastSpell(nullptr, SPELL_DEMON_HUNTER_GLIDE_STATE, true); - me->GetMotionMaster()->MoveJumpWithGravity(JayceJumpPos, 12.0f, 15.2792f, POINT_ILLIDARI_LAND_POS); + me->GetMotionMaster()->MoveJump(POINT_ILLIDARI_LAND_POS, JayceJumpPos, 12.0f, {}, 5.0f); } else if (pathId == PATH_JAYCE_JUMP_INVASION_BEGINS) me->DespawnOrUnsummon(); @@ -273,7 +273,7 @@ struct npc_allari_the_souleater_invasion_begins : public ScriptedAI if (pathId == PATH_ALLARI_INVASION_BEGINS) { me->CastSpell(nullptr, SPELL_DEMON_HUNTER_GLIDE_STATE, true); - me->GetMotionMaster()->MoveJumpWithGravity(AllariJumpPos, 12.0f, 9.2722f, POINT_ILLIDARI_LAND_POS); + me->GetMotionMaster()->MoveJump(POINT_ILLIDARI_LAND_POS, AllariJumpPos, 12.0f, {}, 5.0f); } else if (pathId == PATH_ALLARI_JUMP_INVASION_BEGINS) me->DespawnOrUnsummon(); @@ -302,7 +302,7 @@ struct npc_korvas_bloodthorn_invasion_begins : public ScriptedAI if (pathId == PATH_KORVAS_INVASION_BEGINS) { me->SendPlaySpellVisualKit(SPELL_VISUAL_KIT_KORVAS_JUMP, 4, 2000); - me->GetMotionMaster()->MoveJumpWithGravity(KorvasJumpPos, 24.0f, 19.2911f, POINT_ILLIDARI_LAND_POS); + me->GetMotionMaster()->MoveJump(POINT_ILLIDARI_LAND_POS, KorvasJumpPos, 24.0f, {}, 5.0f); } else if (pathId == PATH_KORVAS_JUMP_INVASION_BEGINS) me->DespawnOrUnsummon(); @@ -331,7 +331,7 @@ struct npc_sevis_brightflame_invasion_begins : public ScriptedAI if (pathId == PATH_SEVIS_INVASION_BEGINS) { me->CastSpell(nullptr, SPELL_DEMON_HUNTER_GLIDE_STATE, true); - me->GetMotionMaster()->MoveJumpWithGravity(SevisJumpPos, 12.0f, 13.3033f, POINT_ILLIDARI_LAND_POS); + me->GetMotionMaster()->MoveJump(POINT_ILLIDARI_LAND_POS, SevisJumpPos, 12.0f, {}, 5.0f); } else if (pathId == PATH_SEVIS_JUMP_INVASION_BEGINS) me->DespawnOrUnsummon(); @@ -360,7 +360,7 @@ struct npc_cyana_nightglaive_invasion_begins : public ScriptedAI if (pathId == PATH_CYANA_INVASION_BEGINS) { me->CastSpell(nullptr, SPELL_DEMON_HUNTER_GLIDE_STATE, true); - me->GetMotionMaster()->MoveJumpWithGravity(CyanaJumpPos, 12.0f, 8.4555f, POINT_ILLIDARI_LAND_POS); + me->GetMotionMaster()->MoveJump(POINT_ILLIDARI_LAND_POS, CyanaJumpPos, 12.0f, {}, 5.0f); } else if (pathId == PATH_CYANA_JUMP_INVASION_BEGINS) me->DespawnOrUnsummon(); @@ -501,7 +501,7 @@ public: kaynClone->PlayObjectSound(SOUND_METAL_WEAPON_UNSHEATH, kaynClone->GetGUID(), player); kaynClone->SendPlaySpellVisualKit(SPELL_VISUAL_KIT_KAYN_GLIDE, 4, 3000); kaynClone->SendPlaySpellVisualKit(SPELL_VISUAL_KIT_KAYN_WINGS, 4, 4000); - kaynClone->GetMotionMaster()->MoveJumpWithGravity(KaynJumpPos, 20.5f, 396.3535f, POINT_KAYN_TRIGGER_DOUBLE_JUMP); + kaynClone->GetMotionMaster()->MoveJump(POINT_KAYN_TRIGGER_DOUBLE_JUMP, KaynJumpPos, 23.0f, 1.5f); kaynClone->SetSheath(SHEATH_STATE_MELEE); kaynClone->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER); @@ -1850,7 +1850,7 @@ struct npc_jayce_darkweaver_cryptic_hollow_private : public ScriptedAI return; if (pointId == POINT_JAYCE_DARKWEAVER_PREPARE_JUMP) - me->GetMotionMaster()->MoveJumpWithGravity(JayceJumpPosition, 19.880844f, 32.78205f, POINT_JAYCE_DARKWEAVER_JUMP_TO_CAVE); + me->GetMotionMaster()->MoveJump(POINT_JAYCE_DARKWEAVER_JUMP_TO_CAVE, JayceJumpPosition, 20.0f, 4.0f); else if (pointId == POINT_JAYCE_DARKWEAVER_JUMP_TO_CAVE) { me->GetMotionMaster()->MovePath(PATH_JAYCE_DARKWEAVER_RUN_INTO_CAVE, false); diff --git a/src/server/scripts/Kalimdor/RagefireChasm/boss_lava_guard_gordoth.cpp b/src/server/scripts/Kalimdor/RagefireChasm/boss_lava_guard_gordoth.cpp index 965bc6660c0..0cb2926943c 100644 --- a/src/server/scripts/Kalimdor/RagefireChasm/boss_lava_guard_gordoth.cpp +++ b/src/server/scripts/Kalimdor/RagefireChasm/boss_lava_guard_gordoth.cpp @@ -148,7 +148,7 @@ struct boss_lava_guard_gordoth : public BossAI me->SetAIAnimKitId(ANIMKIT_GORDOTH_NONE); DoCastSelf(SPELL_JAIL_BREAK); - me->GetMotionMaster()->MoveJumpWithGravity(GordothJumpPos, 50.0f, 55.5477f, POINT_JUMP, GordothJumpPos.GetOrientation()); + me->GetMotionMaster()->MoveJump(POINT_JUMP, GordothJumpPos, 50.0f, 4.0f); scheduler.Schedule(30ms, [this](TaskContext /*task*/) { @@ -166,6 +166,7 @@ struct boss_lava_guard_gordoth : public BossAI { DoCast(SPELL_GROUND_SLAM); me->SetHomePosition(GordothJumpPos); + me->SetFacingTo(GordothJumpPos.GetOrientation()); std::vector<GameObject*> labVialsList; GetGameObjectListWithEntryInGrid(labVialsList, me, GO_LAB_VIAL, 25.0f); diff --git a/src/server/scripts/KulTiras/WaycrestManor/boss_lord_and_lady_waycrest.cpp b/src/server/scripts/KulTiras/WaycrestManor/boss_lord_and_lady_waycrest.cpp index 0886cd7b232..1b169d3d5f1 100644 --- a/src/server/scripts/KulTiras/WaycrestManor/boss_lord_and_lady_waycrest.cpp +++ b/src/server/scripts/KulTiras/WaycrestManor/boss_lord_and_lady_waycrest.cpp @@ -156,7 +156,7 @@ struct boss_lord_waycrest : public BossAI void JustEngagedWith(Unit* /*who*/) override { DoCastSelf(SPELL_LORD_WAYCREST_DUMMY_ABSORB); - me->GetMotionMaster()->MoveJumpWithGravity(LordWaycrestCombatPosition, 20.0f, 15.1852f); + me->GetMotionMaster()->MoveJump(EVENT_JUMP, LordWaycrestCombatPosition, 20.0f, 5.0f); instance->SetBossState(DATA_LORD_AND_LADY_WAYCREST, IN_PROGRESS); instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me); diff --git a/src/server/scripts/Pandaria/zone_the_wandering_isle.cpp b/src/server/scripts/Pandaria/zone_the_wandering_isle.cpp index 9518d6e832b..665369e33ef 100644 --- a/src/server/scripts/Pandaria/zone_the_wandering_isle.cpp +++ b/src/server/scripts/Pandaria/zone_the_wandering_isle.cpp @@ -866,15 +866,15 @@ struct npc_aysa_cloudsinger_summon : public ScriptedAI _scheduler.Schedule(3s, [this](TaskContext task) { - me->GetMotionMaster()->MoveJumpWithGravity(aysaJumpPos[0], 12.0f, 17.4735f); + me->GetMotionMaster()->MoveJump(EVENT_JUMP, aysaJumpPos[0], 12.0f, {}, 5.0f); task.Schedule(1700ms, [this](TaskContext task) { - me->GetMotionMaster()->MoveJumpWithGravity(aysaJumpPos[1], 12.0f, 10.7163f); + me->GetMotionMaster()->MoveJump(EVENT_JUMP, aysaJumpPos[1], 12.0f, {}, 5.0f); task.Schedule(2s, [this](TaskContext /*task*/) { - me->GetMotionMaster()->MoveJumpWithGravity(aysaJumpPos[2], 12.0f, 14.6923f, POINT_JUMP); + me->GetMotionMaster()->MoveJump(POINT_JUMP, aysaJumpPos[2], 12.0f, {}, 5.0f); }); }); }); diff --git a/src/server/scripts/Zandalar/AtalDazar/boss_volkaal.cpp b/src/server/scripts/Zandalar/AtalDazar/boss_volkaal.cpp index 5aad4c12b4a..e09a06c665c 100644 --- a/src/server/scripts/Zandalar/AtalDazar/boss_volkaal.cpp +++ b/src/server/scripts/Zandalar/AtalDazar/boss_volkaal.cpp @@ -320,29 +320,6 @@ class spell_volkaal_toxic_leap_selector : public SpellScript } }; -// 250258 - Toxic Leap -class spell_volkaal_toxic_leap : public SpellScript -{ - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_TOXIC_LEAP }); - } - - void HandleHit(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - - float dist = GetCaster()->GetExactDist(GetHitDest()); - float jumpGravity = 159500.0f / (dist * dist); // constant based on calculating avg of inverse from multiple leaps - GetCaster()->GetMotionMaster()->MoveJumpWithGravity(*GetHitDest(), 50, jumpGravity, EVENT_JUMP); - } - - void Register() override - { - OnEffectHit += SpellEffectFn(spell_volkaal_toxic_leap::HandleHit, EFFECT_1, SPELL_EFFECT_JUMP_CHARGE); - } -}; - // 250229 - Soul Anchor class spell_volkaal_soul_anchor : public SpellScript { @@ -448,7 +425,6 @@ void AddSC_boss_volkaal() RegisterSpellScript(spell_volkaal_lingering_nausea); RegisterSpellScript(spell_volkaal_noxious_stench); RegisterSpellScript(spell_volkaal_toxic_leap_selector); - RegisterSpellScript(spell_volkaal_toxic_leap); RegisterSpellScript(spell_volkaal_soul_anchor); RegisterSpellScript(spell_volkaal_reanimate); RegisterSpellScript(spell_volkaal_rapid_decay); |
