Commit 7cd7fd530359f3fefcb722d53ff5e8435e3b0fcf

Authored by 熊润斐
2 parents 2bf99d62 6e2961fa

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

# Conflicts:
#	src/csvdata
src/actions/GmAction.lua
@@ -247,6 +247,7 @@ table.insert(helpDes, {"获得所有零件", "get", "RUNE"}) @@ -247,6 +247,7 @@ table.insert(helpDes, {"获得所有零件", "get", "RUNE"})
247 table.insert(helpDes, {"获得所有碎片", "get", "FRAG"}) 247 table.insert(helpDes, {"获得所有碎片", "get", "FRAG"})
248 table.insert(helpDes, {"获得所有食物", "get", "FOOD"}) 248 table.insert(helpDes, {"获得所有食物", "get", "FOOD"})
249 table.insert(helpDes, {"获得所有角色", "get", "HERO"}) 249 table.insert(helpDes, {"获得所有角色", "get", "HERO"})
  250 +table.insert(helpDes, {"获得满级满觉醒角色,满级满精进铭文", "get", "MAXHERO"})
250 function _M.get(role, pms) 251 function _M.get(role, pms)
251 if pms.pm1 == "ALL" then 252 if pms.pm1 == "ALL" then
252 local reward = {} 253 local reward = {}
@@ -263,7 +264,7 @@ function _M.get(role, pms) @@ -263,7 +264,7 @@ function _M.get(role, pms)
263 end 264 end
264 end 265 end
265 elseif pms.pm1 == "RUNE" then 266 elseif pms.pm1 == "RUNE" then
266 - for itemId = 2000 , 3000 do 267 + for itemId = 10000 , 20000 do
267 if csvdb["itemCsv"][itemId] then 268 if csvdb["itemCsv"][itemId] then
268 role:award({[itemId] = 1}, {log = {desc = "gm"}}) 269 role:award({[itemId] = 1}, {log = {desc = "gm"}})
269 end 270 end
@@ -286,6 +287,36 @@ function _M.get(role, pms) @@ -286,6 +287,36 @@ function _M.get(role, pms)
286 role:award({[itemId] = 1}, {log = {desc = "gm"}}) 287 role:award({[itemId] = 1}, {log = {desc = "gm"}})
287 end 288 end
288 end 289 end
  290 + elseif pms.pm1 == "MAXHERO" then
  291 + -- 给英雄
  292 + for itemId = 400 , 700 do
  293 + if csvdb["itemCsv"][itemId] then
  294 + role:award({[itemId] = 1}, {log = {desc = "gm"}})
  295 + end
  296 + end
  297 + -- 升满级
  298 + for _, hero in ipairs(role.heros) do
  299 + hero:updateProperty({field = "level", value = 140})
  300 + hero:updateProperty({field = "wakeL", value = #csvdb["unit_wakeCsv"]})
  301 + end
  302 +
  303 + -- 添加铭文
  304 + for itemId = 10000 , 20000 do
  305 + if csvdb["itemCsv"][itemId] then
  306 + role:award({[itemId] = 1}, {log = {desc = "gm"}})
  307 + end
  308 + end
  309 + for _, rune in ipairs(role.runeBag) do
  310 + local typ = rune:getProperty("type")
  311 + local id = rune:getProperty("id")
  312 +
  313 + local runeSet = csvdb["runeCsv"][typ]
  314 + if not runeSet then break end
  315 + local runeData = runeSet[id]
  316 + if not runeData then break end
  317 +
  318 + rune:updateProperty({field = "level",value = runeData.lvLimit})
  319 + end
289 else 320 else
290 local itemId = tonum(pms.pm1) 321 local itemId = tonum(pms.pm1)
291 if not csvdb["itemCsv"][itemId] then 322 if not csvdb["itemCsv"][itemId] then
src/actions/RoleAction.lua
@@ -157,6 +157,7 @@ function _M.loginRpc( agent, data ) @@ -157,6 +157,7 @@ function _M.loginRpc( agent, data )
157 SERV_OPEN = redisproxy:hget("autoincrement_set", "server_start") 157 SERV_OPEN = redisproxy:hget("autoincrement_set", "server_start")
158 158
159 role:changeStructVersion() -- 数据结构 版本更新 159 role:changeStructVersion() -- 数据结构 版本更新
  160 + role:getAdvData(true) -- 清掉不合格的数据
160 role:advEndlessSeasonCheck(true) -- 冒险赛季更新检查 161 role:advEndlessSeasonCheck(true) -- 冒险赛季更新检查
161 162
162 -- 跨天登陆事件 163 -- 跨天登陆事件
@@ -20,8 +20,6 @@ function Adv:ctor(owner) @@ -20,8 +20,6 @@ function Adv:ctor(owner)
20 self.advTask = self.owner:getProperty("advTask") 20 self.advTask = self.owner:getProperty("advTask")
21 self.advMTask = self.owner:getProperty("advMTask") 21 self.advMTask = self.owner:getProperty("advMTask")
22 self.advTaskChange = false -- 任务改变才更新 22 self.advTaskChange = false -- 任务改变才更新
23 -  
24 - self:initByInfo(self.owner:getProperty("advInfo"))  
25 end 23 end
26 24
27 function Adv:mylog(contents) 25 function Adv:mylog(contents)
@@ -36,7 +34,8 @@ function Adv:mylog(contents) @@ -36,7 +34,8 @@ function Adv:mylog(contents)
36 end 34 end
37 35
38 --初始化adv 信息 36 --初始化adv 信息
39 -function Adv:initByInfo(advInfo) 37 +function Adv:initByInfo()
  38 + local advInfo = self.owner:getProperty("advInfo")
40 if not next(advInfo) then return end --还没有 开始新地图 39 if not next(advInfo) then return end --还没有 开始新地图
41 40
42 self.chapterId = advInfo.chapterId 41 self.chapterId = advInfo.chapterId
@@ -402,10 +401,9 @@ function Adv:isRunning() @@ -402,10 +401,9 @@ function Adv:isRunning()
402 return false 401 return false
403 end 402 end
404 403
405 --- 强制结束  
406 -function Adv:forceOver(notNotify)  
407 - if self:isRunning() then  
408 - 404 +-- 强制结束 逻辑和adv内部无关
  405 +function Adv:forceOver(notNotify, force)
  406 + if self:isRunning() or force then
409 local advTeam = self.owner:getProperty("advTeam") 407 local advTeam = self.owner:getProperty("advTeam")
410 advTeam.player = nil 408 advTeam.player = nil
411 409
src/models/RolePlugin.lua
@@ -838,9 +838,16 @@ function RolePlugin.bind(Role) @@ -838,9 +838,16 @@ function RolePlugin.bind(Role)
838 return runeSet 838 return runeSet
839 end 839 end
840 840
841 - function Role:getAdvData() 841 + function Role:getAdvData(notNotify)
842 if not self.advData then 842 if not self.advData then
843 self.advData = require("adv.Adv").new(self) 843 self.advData = require("adv.Adv").new(self)
  844 + local status, err = pcall(function()
  845 + self.advData:initByInfo()
  846 + end)
  847 + if not status then
  848 + self.advData:forceOver(notNotify, true)
  849 + skynet.error("getAdvData error adv initByInfo " .. err)
  850 + end
844 end 851 end
845 return self.advData 852 return self.advData
846 end 853 end