diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-09-20 20:19:15 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-03-02 20:47:29 +0100 |
commit | 205ec4c3bf26d74fefa2452baae714c56d956956 (patch) | |
tree | 0841a7c4bcf3e13bfa6df282520898960b9009f5 /src/server/game/Scripting/ScriptSystem.cpp | |
parent | b94642fb49305192f44387e520d1410b1552094f (diff) |
Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.
(cherry picked from commit 2170541a51ced3c15675b8854e0ae49461884f8c)
Code style follow-up, I blame Notepad++.
(cherry picked from commit 7860da0de6e53c7740862cae18840c9d399dda7f)
Diffstat (limited to 'src/server/game/Scripting/ScriptSystem.cpp')
-rw-r--r-- | src/server/game/Scripting/ScriptSystem.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 6cae097c8c4..3e67a44384c 100644 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -106,7 +106,8 @@ void SystemMgr::LoadScriptSplineChains() { Field* fieldsMeta = resultMeta->Fetch(); uint32 entry = fieldsMeta[0].GetUInt32(); - uint8 chainId = fieldsMeta[1].GetUInt8(), splineId = fieldsMeta[2].GetUInt8(); + uint16 chainId = fieldsMeta[1].GetUInt16(); + uint8 splineId = fieldsMeta[2].GetUInt8(); SplineChain& chain = m_mSplineChainsMap[{entry,chainId}]; if (splineId != chain.size()) @@ -127,7 +128,8 @@ void SystemMgr::LoadScriptSplineChains() { Field* fieldsWP = resultWP->Fetch(); uint32 entry = fieldsWP[0].GetUInt32(); - uint8 chainId = fieldsWP[1].GetUInt8(), splineId = fieldsWP[2].GetUInt8(), wpId = fieldsWP[3].GetUInt8(); + uint16 chainId = fieldsWP[1].GetUInt16(); + uint8 splineId = fieldsWP[2].GetUInt8(), wpId = fieldsWP[3].GetUInt8(); float posX = fieldsWP[4].GetFloat(), posY = fieldsWP[5].GetFloat(), posZ = fieldsWP[6].GetFloat(); auto it = m_mSplineChainsMap.find({entry,chainId}); if (it == m_mSplineChainsMap.end()) |