diff --git a/src/actions/DinerAction.lua b/src/actions/DinerAction.lua index fe6698a..022aeac 100644 --- a/src/actions/DinerAction.lua +++ b/src/actions/DinerAction.lua @@ -832,6 +832,8 @@ function _M.entrustRpc(agent , data) role:log("diner_action", {desc = "entrus", short1 = ctype, int1 = entrustId}) + role:finishGuide(26) + SendPacket(actionCodes.Diner_entrustRpc, MsgPack.pack({reward = reward, change = change})) return true end diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 7663ba6..d71fed4 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -1030,12 +1030,6 @@ function _M.guideRpc(agent, data) if master < 0 or slave < 0 then return end role:saveGuide(master, slave) - funcGuide = funcGuide:setv(master * 1000 + slave, 1) - if funcGuide:getv(master * 1000,0) == 0 then - funcGuide = funcGuide:setv(master * 1000, 1) - end - role:updateProperty({field = "funcGuide", value = funcGuide}) - role:log("onGuidePoint", {guild_type = 0, guild_id = master, guild_point = slave, guild_pass = 0}) elseif cmdType == 2 then -- 系统引导(玩家可选择是否进行) if not msg.skip then return end diff --git a/src/models/Diner.lua b/src/models/Diner.lua index df4be01..8bb6e9a 100644 --- a/src/models/Diner.lua +++ b/src/models/Diner.lua @@ -70,12 +70,10 @@ function Diner:refreshDailyData(notify) end end - local guide = self.owner:getProperty("newerGuide") - local master, slave = string.match(guide,"(%d+)=(%d+)") - if self.owner:getProperty("funcGuide"):getv(51,0) == 0 or tonumber(master) <= 26 then + if self.owner:checkOverGuide(26) and not self.owner:checkOverGuide(27) then entrust[1] = 1001 entrust[2] = 1 - elseif tonumber(master) <= 29 then + elseif self.owner:checkOverGuide(29) then local temp = entrust[1] entrust[1] = 1 entrust[2] = temp diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index bb78dd6..b39f1ba 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -1576,7 +1576,13 @@ function RolePlugin.bind(Role) if not force and master < sMaster then return end if not force and master <= sMaster and slave < sSlave then return end - self:log("guide", {desc = "guide_new",int1 = master*1000+slave}) + local funcGuide = self:getProperty("funcGuide") + funcGuide = funcGuide:setv(master * 1000 + slave, 1) + if funcGuide:getv(master * 1000,0) == 0 then + funcGuide = funcGuide:setv(master * 1000, 1) + end + self:updateProperty({field = "funcGuide", value = funcGuide}) + self:log("onGuidePoint", {guild_type = 0, guild_id = master, guild_point = slave, guild_pass = 0}) newerGuide = string.format("%d=%d",master,slave) self:updateProperty({field = "newerGuide", value = newerGuide}) -- libgit2 0.21.2