Core/Movement: add a velocity argument for the spline chain meta table (PR #23575)

(cherry picked from commit 3f7b2252a1)
This commit is contained in:
Ovah
2019-07-18 15:52:03 +02:00
committed by Shauren
parent 65abf9b482
commit a24a5e7778
5 changed files with 17 additions and 11 deletions

View File

@@ -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;