mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Movement: Change MoveJump to use min/max height argument instead of vertical speed
This commit is contained in:
@@ -286,7 +286,7 @@ struct boss_guarm : public BossAI
|
||||
events.CancelEvent(EVENT_LICK);
|
||||
me->GetMotionMaster()->Clear(); // remove ChaseMovementGen
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->GetMotionMaster()->MoveJump(BerserkerPair.JumpPos, 42.0f, 21.5f, POINT_BERSERK_JUMP);
|
||||
me->GetMotionMaster()->MoveJump(POINT_BERSERK_JUMP, BerserkerPair.JumpPos, {}, 12.0f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -642,7 +642,7 @@ class spell_headlong_charge_trigger : public SpellScript
|
||||
uint8 pairId = urand(0, 3);
|
||||
caster->GetMotionMaster()->Clear(); // remove ChaseMovementGen
|
||||
caster->SetReactState(REACT_PASSIVE);
|
||||
caster->GetMotionMaster()->MoveJump(HeadlongChargePairs[pairId].JumpPos, 42.0f, 21.5f, POINT_HEADLONG_CHARGE + pairId);
|
||||
caster->GetMotionMaster()->MoveJump(POINT_HEADLONG_CHARGE + pairId, HeadlongChargePairs[pairId].JumpPos, {}, 12.0f);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -593,13 +593,7 @@ struct npc_valkyr_of_odyn : public ScriptedAI
|
||||
case POINT_JUMP:
|
||||
_scheduler.Schedule(250ms, [this](TaskContext /*context*/)
|
||||
{
|
||||
/*
|
||||
* (MovementMonsterSpline) (MovementSpline) MoveTime: 3111
|
||||
* (MovementMonsterSpline) (MovementSpline) JumpGravity: 19.2911 -> +-Movement::gravity
|
||||
* 1.4125f is guessed value. Which makes the JumpGravity way closer to the intended one. Not sure how to do it 100% blizzlike.
|
||||
* Also the MoveTime is not correct but I don't know how to set it here.
|
||||
*/
|
||||
me->GetMotionMaster()->MoveJump({ 1107.84f, 7222.57f, 38.9725f, me->GetOrientation() }, me->GetSpeed(MOVE_RUN), Movement::gravity * 1.4125f, POINT_DESPAWN_JUMP);
|
||||
me->GetMotionMaster()->MoveJump(POINT_DESPAWN_JUMP, { 1107.84f, 7222.57f, 38.9725f, me->GetOrientation() });
|
||||
});
|
||||
break;
|
||||
case POINT_DESPAWN:
|
||||
@@ -610,12 +604,13 @@ struct npc_valkyr_of_odyn : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 id) override
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case POINT_DESPAWN_JUMP:
|
||||
me->DespawnOrUnsummon();
|
||||
if (type == EFFECT_MOTION_TYPE)
|
||||
me->DespawnOrUnsummon();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -177,7 +177,7 @@ struct npc_koltira_deathweaver : public ScriptedAI
|
||||
_events.ScheduleEvent(EVENT_INTRO_2, 2s);
|
||||
break;
|
||||
case EVENT_INTRO_2:
|
||||
me->GetMotionMaster()->MoveJump(koltiraPos[0], 25.0f, 15.0f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, koltiraPos[0], 12.0f, 1.0f);
|
||||
|
||||
_events.ScheduleEvent(EVENT_INTRO_3, 2s);
|
||||
break;
|
||||
|
||||
@@ -480,7 +480,7 @@ struct npc_silverpine_grand_executor_mortuus : public ScriptedAI
|
||||
{
|
||||
if (Creature* garrosh = ObjectAccessor::GetCreature(*me, _garroshGUID))
|
||||
{
|
||||
garrosh->GetMotionMaster()->MoveJump(GarroshJumpPos, 15.595897f, 15.595897f);
|
||||
garrosh->GetMotionMaster()->MoveJump(EVENT_JUMP, GarroshJumpPos, 16.0f);
|
||||
|
||||
_events.ScheduleEvent(EVENT_SCENE_TALK_COMETH + 3, 2s + 500ms);
|
||||
}
|
||||
|
||||
@@ -1519,7 +1519,7 @@ struct npc_murloc_spearhunter_watershaper_higher_ground : public ScriptedAI
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
me->GetMotionMaster()->MoveJump(who->GetPosition(), 16.0f, 6.2f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, who->GetPosition(), 16.0f, 0.1f);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4423,7 +4423,7 @@ struct npc_briarpatch_prisoner : public ScriptedAI
|
||||
me->RemoveAllAuras();
|
||||
me->SetDisableGravity(false);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->GetMotionMaster()->MoveJump(BriarpatchPrisonerJumpToPosition, 7.9894905f, 19.29110336303710937f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, BriarpatchPrisonerJumpToPosition, 8.0f);
|
||||
Talk(SAY_GET_OUT_OF_HERE);
|
||||
_events.ScheduleEvent(EVENT_RUN_TO_PLAINS, 4s);
|
||||
}
|
||||
@@ -4778,7 +4778,7 @@ struct npc_gnome_goblin_plains_make_copter_private : public ScriptedAI
|
||||
}
|
||||
|
||||
if (Creature* copter = ObjectAccessor::GetCreature(*me, _copterGUID))
|
||||
copter->GetMotionMaster()->MoveJump(MiniChopperJumpPosition, 19.29f, 6.99f);
|
||||
copter->GetMotionMaster()->MoveJump(EVENT_JUMP, MiniChopperJumpPosition, 7.0f, 6.99f);
|
||||
|
||||
_events.ScheduleEvent(EVENT_RESIZE_COPTER_1, 6s);
|
||||
break;
|
||||
|
||||
@@ -221,7 +221,7 @@ class boss_high_priestess_azil : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_INTRO_MOVE:
|
||||
me->GetMotionMaster()->MoveJump(GroundPos, me->GetSpeed(MOVE_FLIGHT), 1.918408f, POINT_INTRO_MOVE);
|
||||
me->GetMotionMaster()->MoveJump(POINT_INTRO_MOVE, GroundPos, 5.0f, {}, 3.0f);
|
||||
break;
|
||||
case EVENT_CURSE_OF_BLOOD:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
|
||||
@@ -473,7 +473,7 @@ struct npc_anubarak_anub_ar_assassin : public npc_anubarak_pet_template
|
||||
do
|
||||
jumpTo = GetRandomPositionAround(anubarak);
|
||||
while (!CreatureAI::IsInBounds(*boundary, &jumpTo));
|
||||
me->GetMotionMaster()->MoveJump(jumpTo, 40.0f, 40.0f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, jumpTo, 24.0f, 20.0f, 30.0f);
|
||||
DoCastSelf(SPELL_ASSASSIN_VISUAL, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ struct boss_icehowl : public boss_northrend_beastsAI
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
events.SetPhase(PHASE_CHARGE);
|
||||
me->GetMotionMaster()->MoveJump(ToCCommonLoc[1], 20.0f, 20.0f, POINT_MIDDLE);
|
||||
me->GetMotionMaster()->MoveJump(POINT_MIDDLE, ToCCommonLoc[1], 50.0f, 2.0f);
|
||||
break;
|
||||
case EVENT_SELECT_CHARGE_TARGET:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
|
||||
@@ -221,9 +221,9 @@ struct boss_garfrost : public BossAI
|
||||
case EVENT_FORGE_JUMP:
|
||||
me->AttackStop();
|
||||
if (events.IsInPhase(PHASE_TWO))
|
||||
me->GetMotionMaster()->MoveJump(northForgePos, 25.0f, 15.0f, POINT_FORGE);
|
||||
me->GetMotionMaster()->MoveJump(POINT_FORGE, northForgePos, 40.0f);
|
||||
else if (events.IsInPhase(PHASE_THREE))
|
||||
me->GetMotionMaster()->MoveJump(southForgePos, 25.0f, 15.0f, POINT_FORGE);
|
||||
me->GetMotionMaster()->MoveJump(POINT_FORGE, southForgePos, 40.0f);
|
||||
break;
|
||||
case EVENT_RESUME_ATTACK:
|
||||
if (events.IsInPhase(PHASE_TWO))
|
||||
|
||||
@@ -1751,7 +1751,7 @@ class spell_vehicle_throw_passenger : public SpellScriptLoader
|
||||
else
|
||||
{
|
||||
passenger->ExitVehicle();
|
||||
passenger->GetMotionMaster()->MoveJump(*targets.GetDstPos(), targets.GetSpeedXY(), targets.GetSpeedZ());
|
||||
passenger->GetMotionMaster()->MoveJump(EVENT_JUMP, *targets.GetDstPos(), targets.GetSpeedXY());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ class boss_mimiron : public CreatureScript
|
||||
DoCastAOE(SPELL_DESPAWN_ASSAULT_BOTS);
|
||||
me->ExitVehicle();
|
||||
// ExitVehicle() offset position is not implemented, so we make up for that with MoveJump()...
|
||||
me->GetMotionMaster()->MoveJump(me->GetPositionWithOffset({ 10.0f, 0.0f }), 10.f, 5.f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, me->GetPositionWithOffset({ 10.0f, 0.0f }), 10.f);
|
||||
events.ScheduleEvent(EVENT_OUTTRO_1, 7s);
|
||||
}
|
||||
|
||||
|
||||
@@ -701,7 +701,7 @@ class boss_thorim : public CreatureScript
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->GetMotionMaster()->MoveJump({ 2134.8f, -263.056f, 419.983f }, 30.0f, 20.0f);
|
||||
me->GetMotionMaster()->MoveJump(EVENT_JUMP, { 2134.8f, -263.056f, 419.983f }, {}, 5.0f);
|
||||
events.ScheduleEvent(EVENT_START_PERIODIC_CHARGE, 2s, 0, PHASE_2);
|
||||
events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 15s, 0, PHASE_2);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 20s, 0, PHASE_2);
|
||||
|
||||
@@ -920,7 +920,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
task.Schedule(Seconds(6), [this](TaskContext task)
|
||||
{
|
||||
if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
|
||||
cyanigosa->GetMotionMaster()->MoveJump(CyanigosaJumpLocation, 10.0f, 27.44744f);
|
||||
cyanigosa->GetMotionMaster()->MoveJump(EVENT_JUMP, CyanigosaJumpLocation, {}, 8.0f);
|
||||
|
||||
task.Schedule(Seconds(7), [this](TaskContext /*task*/)
|
||||
{
|
||||
|
||||
@@ -1920,7 +1920,7 @@ class npc_train_wrecker : public CreatureScript
|
||||
{
|
||||
case EVENT_DO_JUMP:
|
||||
if (GameObject* target = VerifyTarget())
|
||||
me->GetMotionMaster()->MoveJump(*target, 5.0, 10.0, MOVEID_JUMP);
|
||||
me->GetMotionMaster()->MoveJump(MOVEID_JUMP, *target, 3.0f, 1.0f);
|
||||
_nextAction = 0;
|
||||
break;
|
||||
case EVENT_DO_WRECK:
|
||||
|
||||
Reference in New Issue
Block a user