Commit 02e210c493054a3dfaf32b6b99fa89da7b1ffe65

Authored by 熊润斐
2 parents 85def47e 39aebe0b

Merge branch 'tr/bugfix' into tr/publish/qa-out

src/actions/ActivityAction.lua
@@ -1391,6 +1391,9 @@ function _M.returnerTaskRpc(agent, data) @@ -1391,6 +1391,9 @@ function _M.returnerTaskRpc(agent, data)
1391 local status = returner.status or {} 1391 local status = returner.status or {}
1392 if status[taskId] then return 3 end 1392 if status[taskId] then return 3 end
1393 1393
  1394 + status[taskId] = 1
  1395 + returner.status = status
  1396 +
1394 local done = true 1397 local done = true
1395 for _, data in pairs(TaskCsv) do 1398 for _, data in pairs(TaskCsv) do
1396 if not status[data.id] then 1399 if not status[data.id] then
@@ -1399,15 +1402,12 @@ function _M.returnerTaskRpc(agent, data) @@ -1399,15 +1402,12 @@ function _M.returnerTaskRpc(agent, data)
1399 end 1402 end
1400 end 1403 end
1401 1404
1402 - status[taskId] = 1  
1403 - returner.status = status  
1404 -  
1405 - local reward, change = role:award(taskData.reward, {log = {desc = "returner", int1 = taskData.day, int2 = taskId}})  
1406 -  
1407 if done then 1405 if done then
1408 returner = {} 1406 returner = {}
1409 end 1407 end
1410 1408
  1409 + local reward, change = role:award(taskData.reward, {log = {desc = "returner", int1 = taskData.day, int2 = taskId}})
  1410 +
1411 local pack = globalCsv.returner_pack:toArray(true,"=") 1411 local pack = globalCsv.returner_pack:toArray(true,"=")
1412 if pack[1] == taskData.id then 1412 if pack[1] == taskData.id then
1413 role:checkTaskEnter("Appoint", {id = pack[2]}) 1413 role:checkTaskEnter("Appoint", {id = pack[2]})
src/models/HeroPlugin.lua
@@ -232,8 +232,8 @@ function HeroPlugin.bind(Hero) @@ -232,8 +232,8 @@ function HeroPlugin.bind(Hero)
232 for _, attName in pairs(AttsEnumEx) do 232 for _, attName in pairs(AttsEnumEx) do
233 attrs[attName] = 0 233 attrs[attName] = 0
234 end 234 end
235 - for _, data in pairs(self.spark or {}) do  
236 - for k, v in pairs(data.attrs:toNumMap()) do 235 + for _, data in pairs(self:getProperty("spark") or {}) do
  236 + for k, v in pairs(data.attrs) do
237 attrs[AttsEnumEx[k]] = attrs[AttsEnumEx[k]] + v 237 attrs[AttsEnumEx[k]] = attrs[AttsEnumEx[k]] + v
238 end 238 end
239 end 239 end
src/shared/ModelBase.lua
@@ -178,7 +178,7 @@ function ModelBase:loadProperties(properties) @@ -178,7 +178,7 @@ function ModelBase:loadProperties(properties)
178 properties[field] = MsgPack.unpack(properties[field]) 178 properties[field] = MsgPack.unpack(properties[field])
179 end 179 end
180 180
181 - local val = properties[field] or def 181 + local val = properties[field] or clone(def)
182 if val ~= nil then 182 if val ~= nil then
183 if typ == "number" then val = tonumber(val) end 183 if typ == "number" then val = tonumber(val) end
184 assert(type(val) == typ, 184 assert(type(val) == typ,