aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-11-25 13:39:25 +0100
committerShauren <shauren.trinity@gmail.com>2025-11-25 13:39:25 +0100
commit645da5a3f9baf6c8f8d106f2c975686f2f90f62b (patch)
tree221b563e9af2742435b223ea54e1246e6112a774 /src/server/game/AI
parent95ca7148246ab28d9b860cc20443121eb3ca499f (diff)
Core/Movement: Remove deprecated jump functions and update SAI scripts using them
Diffstat (limited to 'src/server/game/AI')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp13
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h6
2 files changed, 7 insertions, 12 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1f25f2d2d6b..28ee26256ed 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1923,15 +1923,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (waitEvent)
actionResultSetter = Scripting::v2::ActionResult<MovementStopReason>::GetResultSetter(waitEvent);
- if (e.action.jump.Gravity || e.action.jump.UseDefaultGravity)
- {
- float gravity = e.action.jump.UseDefaultGravity ? Movement::gravity : e.action.jump.Gravity;
- me->GetMotionMaster()->MoveJumpWithGravity_OLD_DEPRECATED(pos, float(e.action.jump.SpeedXY), gravity, e.action.jump.PointId,
- {}, false, nullptr, nullptr, std::move(actionResultSetter));
- }
- else
- me->GetMotionMaster()->MoveJump_OLD_DEPRECATED(pos, float(e.action.jump.SpeedXY), float(e.action.jump.SpeedZ), e.action.jump.PointId,
- {}, false, nullptr, nullptr, std::move(actionResultSetter));
+ me->GetMotionMaster()->MoveJump(e.action.jump.PointId, pos, float(e.action.jump.SpeedXY),
+ e.action.jump.minHeight ? Optional<float>(e.action.jump.minHeight) : std::nullopt,
+ e.action.jump.maxHeight ? Optional<float>(e.action.jump.maxHeight) : std::nullopt,
+ {}, false, false, {}, nullptr, nullptr, std::move(actionResultSetter));
mTimedActionWaitEvent = std::move(waitEvent);
break;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index a9127a33f8a..65098245dbd 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1005,9 +1005,9 @@ struct SmartAction
struct
{
uint32 SpeedXY;
- uint32 SpeedZ;
- uint32 Gravity;
- SAIBool UseDefaultGravity;
+ uint32 minHeight;
+ uint32 maxHeight;
+ uint32 unused;
uint32 PointId;
uint32 ContactDistance;
} jump;