mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Movement: Defined and implemented new spline flag - JumpOrientationFixed
This commit is contained in:
@@ -846,16 +846,16 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
|
||||
MoveJump(x, y, z, speedXY, speedZ);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id/* = EVENT_JUMP*/, MovementFacingTarget const& facing/* = {}*/,
|
||||
JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
void MotionMaster::MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id /*= EVENT_JUMP*/, MovementFacingTarget const& facing /*= {}*/,
|
||||
bool orientationFixed /*= false*/, JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult /*= {}*/)
|
||||
{
|
||||
MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ, id, facing, arrivalCast,
|
||||
MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ, id, facing, orientationFixed, arrivalCast,
|
||||
spellEffectExtraData, std::move(scriptResult));
|
||||
}
|
||||
|
||||
void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id /*= EVENT_JUMP*/, MovementFacingTarget const& facing /* = {}*/,
|
||||
JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
bool orientationFixed /*= false*/, JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult /*= {}*/)
|
||||
{
|
||||
TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveJump: '{}', jumps to point Id: {} (X: {}, Y: {}, Z: {})", _owner->GetGUID(), id, x, y, z);
|
||||
@@ -875,6 +875,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
|
||||
init.SetParabolic(max_height, 0);
|
||||
init.SetVelocity(speedXY);
|
||||
std::visit(Movement::MoveSplineInitFacingVisitor(init), facing);
|
||||
init.SetJumpOrientationFixed(orientationFixed);
|
||||
if (effect)
|
||||
init.SetSpellEffectExtraData(*effect);
|
||||
};
|
||||
@@ -895,7 +896,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
|
||||
}
|
||||
|
||||
void MotionMaster::MoveJumpWithGravity(Position const& pos, float speedXY, float gravity, uint32 id/* = EVENT_JUMP*/, MovementFacingTarget const& facing/* = {}*/,
|
||||
JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
bool orientationFixed /*= false*/, JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
|
||||
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult /*= {}*/)
|
||||
{
|
||||
TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveJumpWithGravity: '{}', jumps to point Id: {} ({})", _owner->GetGUID(), id, pos.ToString());
|
||||
@@ -914,6 +915,7 @@ void MotionMaster::MoveJumpWithGravity(Position const& pos, float speedXY, float
|
||||
init.SetVelocity(speedXY);
|
||||
init.SetUnlimitedSpeed();
|
||||
std::visit(Movement::MoveSplineInitFacingVisitor(init), facing);
|
||||
init.SetJumpOrientationFixed(orientationFixed);
|
||||
if (effect)
|
||||
init.SetSpellEffectExtraData(*effect);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user