aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptSystem.cpp
diff options
context:
space:
mode:
authorOvah <dreadkiller@gmx.de>2019-07-18 15:52:03 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-16 22:03:35 +0100
commita24a5e77786266ee9456fa8c422a173168804a1f (patch)
tree9aa3abeab23e00c62f2c143e215082f5baff4549 /src/server/game/Scripting/ScriptSystem.cpp
parent65abf9b48285f91aca89025a4ec3778533a00d15 (diff)
Core/Movement: add a velocity argument for the spline chain meta table (PR #23575)
(cherry picked from commit 3f7b2252a1d7d89d3b5e6a43aa10692c2bc8c457)
Diffstat (limited to 'src/server/game/Scripting/ScriptSystem.cpp')
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index 90f01de55fb..33fbd62e244 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -94,9 +94,9 @@ void SystemMgr::LoadScriptSplineChains()
m_mSplineChainsMap.clear();
- // 0 1 2 3 4
- QueryResult resultMeta = WorldDatabase.Query("SELECT entry, chainId, splineId, expectedDuration, msUntilNext FROM script_spline_chain_meta ORDER BY entry asc, chainId asc, splineId asc");
- // 0 1 2 3 4 5 6
+ // 0 1 2 3 4 5
+ QueryResult resultMeta = WorldDatabase.Query("SELECT entry, chainId, splineId, expectedDuration, msUntilNext, velocity FROM script_spline_chain_meta ORDER BY entry asc, chainId asc, splineId asc");
+ // 0 1 2 3 4 5 6
QueryResult resultWP = WorldDatabase.Query("SELECT entry, chainId, splineId, wpId, x, y, z FROM script_spline_chain_waypoints ORDER BY entry asc, chainId asc, splineId asc, wpId asc");
if (!resultMeta || !resultWP)
{
@@ -121,7 +121,8 @@ void SystemMgr::LoadScriptSplineChains()
uint32 expectedDuration = fieldsMeta[3].GetUInt32();
uint32 msUntilNext = fieldsMeta[4].GetUInt32();
- chain.emplace_back(expectedDuration, msUntilNext);
+ float velocity = fieldsMeta[5].GetFloat();
+ chain.emplace_back(expectedDuration, msUntilNext, velocity);
if (splineId == 0)
++chainCount;