Commit 8c20d812309fd409b8b59b478253cf9077d5f7ac

Authored by zhouhaihai
1 parent f5207098

pvp bUg

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
src/actions/PvpAction.lua
@@ -269,7 +269,7 @@ function _M.endBattleRpc(agent, data) @@ -269,7 +269,7 @@ function _M.endBattleRpc(agent, data)
269 video = video, 269 video = video,
270 sdelta = myScore - oldmyScore, 270 sdelta = myScore - oldmyScore,
271 })) 271 }))
272 - red:trim(dbKey, 0, 9) 272 + red:ltrim(dbKey, 0, 9)
273 -- 对方加入战斗记录 273 -- 对方加入战斗记录
274 if match.t == 1 then 274 if match.t == 1 then
275 dbKey = string.format(RECORD_PVP_COMMON, match.id) 275 dbKey = string.format(RECORD_PVP_COMMON, match.id)
@@ -281,7 +281,7 @@ function _M.endBattleRpc(agent, data) @@ -281,7 +281,7 @@ function _M.endBattleRpc(agent, data)
281 video = video, 281 video = video,
282 sdelta = matchScore - oldMatchScore, 282 sdelta = matchScore - oldMatchScore,
283 })) 283 }))
284 - red:trim(dbKey, 0, 9) 284 + red:ltrim(dbKey, 0, 9)
285 end 285 end
286 end) 286 end)
287 287
@@ -346,6 +346,7 @@ end @@ -346,6 +346,7 @@ end
346 function _M.recordListRpc(agent, data) 346 function _M.recordListRpc(agent, data)
347 local role = agent.role 347 local role = agent.role
348 local roleId = role:getProperty("id") 348 local roleId = role:getProperty("id")
  349 + local msg = MsgPack.unpack(data)
349 local ptype = msg.ptype or 1 350 local ptype = msg.ptype or 1
350 351
351 local recordList = {} 352 local recordList = {}