Commit fd4e7761cc8dd7bc025de9be594531cbaec5c213

Authored by zhouhaihai
2 parents b32cb70f 9e91460a

Merge branch 'bugfix' into tr/ob

* bugfix:
  appid
  讨伐电台日志增加 开始结束
Showing 1 changed file with 13 additions and 6 deletions   Show diff stats
src/models/RoleLog.lua
... ... @@ -511,6 +511,7 @@ local MethodType = {
511 511 mission_reward = "json", -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5}
512 512 mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败)
513 513 mission_roundtime = true, -- 完成耗时(秒)
  514 + mission_cleartype = true, -- 1-开始; 2-完成(领取奖励时)
514 515 },
515 516 hero_talent = { --英雄精进(原英雄天赋升级) TODO
516 517 hero_id = true, --英雄ID
... ... @@ -542,20 +543,26 @@ local function isIos(self)
542 543 return sid == 2
543 544 end
544 545  
545   -local appid, sdkId
  546 +local sdkId
  547 +local AppId = {
  548 + [1] = 4787,
  549 + [2] = 4788,
  550 + [3] = 4789,
  551 +}
546 552 local function getBaseLog(self)
547 553 local uid = self:getProperty("uid")
548   - if not appid then
549   - appid, sdkId = string.match(uid, "(.*)_(.*)")
550   - if not appid then
  554 + local sid = self:getProperty("sid")
  555 + if not sdkId then
  556 + _, sdkId = string.match(uid, "(.*)_(.*)")
  557 + if not _ then
551 558 sdkId = uid
552   - appid = 0
553 559 end
554 560 end
  561 +
555 562 local log = {
556 563 server_id = server_id,
557 564 timestamp = skynet.timex(),
558   - app_id = appid,
  565 + app_id = AppId[sid] or 0,
559 566 plat_id = isIos(self) and 0 or 1,
560 567 sdk_uid = sdkId,
561 568 account_id = uid,
... ...