Commit a7b824ac7715cc7bfe02360ca50967a3a2fd9b0f

Authored by chenyueqi
1 parent 1e9cb217

记录新手引导步骤的代码存在bug

src/actions/DinerAction.lua
@@ -832,6 +832,8 @@ function _M.entrustRpc(agent , data) @@ -832,6 +832,8 @@ function _M.entrustRpc(agent , data)
832 832
833 role:log("diner_action", {desc = "entrus", short1 = ctype, int1 = entrustId}) 833 role:log("diner_action", {desc = "entrus", short1 = ctype, int1 = entrustId})
834 834
  835 + role:finishGuide(26)
  836 +
835 SendPacket(actionCodes.Diner_entrustRpc, MsgPack.pack({reward = reward, change = change})) 837 SendPacket(actionCodes.Diner_entrustRpc, MsgPack.pack({reward = reward, change = change}))
836 return true 838 return true
837 end 839 end
src/actions/RoleAction.lua
@@ -1030,12 +1030,6 @@ function _M.guideRpc(agent, data) @@ -1030,12 +1030,6 @@ function _M.guideRpc(agent, data)
1030 if master < 0 or slave < 0 then return end 1030 if master < 0 or slave < 0 then return end
1031 1031
1032 role:saveGuide(master, slave) 1032 role:saveGuide(master, slave)
1033 - funcGuide = funcGuide:setv(master * 1000 + slave, 1)  
1034 - if funcGuide:getv(master * 1000,0) == 0 then  
1035 - funcGuide = funcGuide:setv(master * 1000, 1)  
1036 - end  
1037 - role:updateProperty({field = "funcGuide", value = funcGuide})  
1038 - role:log("onGuidePoint", {guild_type = 0, guild_id = master, guild_point = slave, guild_pass = 0})  
1039 elseif cmdType == 2 then 1033 elseif cmdType == 2 then
1040 -- 系统引导(玩家可选择是否进行) 1034 -- 系统引导(玩家可选择是否进行)
1041 if not msg.skip then return end 1035 if not msg.skip then return end
src/models/Diner.lua
@@ -70,12 +70,10 @@ function Diner:refreshDailyData(notify) @@ -70,12 +70,10 @@ function Diner:refreshDailyData(notify)
70 end 70 end
71 end 71 end
72 72
73 - local guide = self.owner:getProperty("newerGuide")  
74 - local master, slave = string.match(guide,"(%d+)=(%d+)")  
75 - if self.owner:getProperty("funcGuide"):getv(51,0) == 0 or tonumber(master) <= 26 then 73 + if self.owner:checkOverGuide(26) and not self.owner:checkOverGuide(27) then
76 entrust[1] = 1001 74 entrust[1] = 1001
77 entrust[2] = 1 75 entrust[2] = 1
78 - elseif tonumber(master) <= 29 then 76 + elseif self.owner:checkOverGuide(29) then
79 local temp = entrust[1] 77 local temp = entrust[1]
80 entrust[1] = 1 78 entrust[1] = 1
81 entrust[2] = temp 79 entrust[2] = temp
src/models/RolePlugin.lua
@@ -1576,7 +1576,13 @@ function RolePlugin.bind(Role) @@ -1576,7 +1576,13 @@ function RolePlugin.bind(Role)
1576 if not force and master < sMaster then return end 1576 if not force and master < sMaster then return end
1577 if not force and master <= sMaster and slave < sSlave then return end 1577 if not force and master <= sMaster and slave < sSlave then return end
1578 1578
1579 - self:log("guide", {desc = "guide_new",int1 = master*1000+slave}) 1579 + local funcGuide = self:getProperty("funcGuide")
  1580 + funcGuide = funcGuide:setv(master * 1000 + slave, 1)
  1581 + if funcGuide:getv(master * 1000,0) == 0 then
  1582 + funcGuide = funcGuide:setv(master * 1000, 1)
  1583 + end
  1584 + self:updateProperty({field = "funcGuide", value = funcGuide})
  1585 + self:log("onGuidePoint", {guild_type = 0, guild_id = master, guild_point = slave, guild_pass = 0})
1580 1586
1581 newerGuide = string.format("%d=%d",master,slave) 1587 newerGuide = string.format("%d=%d",master,slave)
1582 self:updateProperty({field = "newerGuide", value = newerGuide}) 1588 self:updateProperty({field = "newerGuide", value = newerGuide})