diff --git a/src/actions/DinerAction.lua b/src/actions/DinerAction.lua index f10bf53..040d856 100644 --- a/src/actions/DinerAction.lua +++ b/src/actions/DinerAction.lua @@ -609,10 +609,10 @@ function _M.refreshTaskRpc( agent, data ) local role = agent.role local msg = MsgPack.unpack(data) - local cost = {[ItemId.Diamond] = 40} - if not role:checkItemEnough(cost) then - return 1 - end + --local cost = {[ItemId.Diamond] = 40} + --if not role:checkItemEnough(cost) then + -- return 1 + --end local orders = json.decode(role.dinerData:getProperty("order")) diff --git a/src/actions/RadioAction.lua b/src/actions/RadioAction.lua index e3f46a9..dfb0beb 100644 --- a/src/actions/RadioAction.lua +++ b/src/actions/RadioAction.lua @@ -121,10 +121,15 @@ function _M.finishQuestRpc(agent, data) if not carbonData then return 4 end -- get heros local totalCoef = 0 + local exp = config.time / 60 + heroFaithMap = {} for _, heroId in ipairs(task.heros) do local hero = role.heros[heroId] if hero then totalCoef = totalCoef + getHeroCoef(hero, config.success) + -- 增加英雄信赖 + hero:addHeroFaith(exp) + heroFaithMap[heroId] = hero:getProperty("faith") end end -- send award @@ -152,6 +157,7 @@ function _M.finishQuestRpc(agent, data) local msg = role:packReward(r, change) msg["big"] = bigSuccess msg["id"] = id + msg["heroFaith"] = heroFaithMap SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg)) return true end diff --git a/src/csvdata b/src/csvdata index b4c54b2..a259823 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit b4c54b229a7ac8c5ac938e72bd6cc4870a264c58 +Subproject commit a2598231ccc5e16da1a27f976602871f30fcd035 diff --git a/src/models/HeroPlugin.lua b/src/models/HeroPlugin.lua index 234715c..bb3abd7 100644 --- a/src/models/HeroPlugin.lua +++ b/src/models/HeroPlugin.lua @@ -74,7 +74,7 @@ function HeroPlugin.bind(Hero) for _, attrName in pairs(AttsEnumEx) do if talentAttrS[attrName] then - talentAttrS[attrName] = addAttr(unitData[attrName], talentAttrS[attrName], 0, attrName) + talentAttrS[attrName] = addAttr(unitData[attrName], talentAttrS[attrName], 1, attrName) end end @@ -88,6 +88,11 @@ function HeroPlugin.bind(Hero) faithAttr[add[1]] = (faithAttr[add[1]] or 0) + add[2] end end + for _, attrName in pairs(AttsEnumEx) do + if faithAttr[attrName] then + faithAttr[attrName] = addAttr(unitData[attrName], faithAttr[attrName], 1, attrName) + end + end local attrs = {} for _, attName in pairs(AttsEnumEx) do -- libgit2 0.21.2