Commit 8efb24c972ef586a551d36d817cc4d54993fdd4a

Authored by 测试
1 parent 42dcb7da

天赋系统属性加成改为百分比

src/actions/DinerAction.lua
... ... @@ -609,10 +609,10 @@ function _M.refreshTaskRpc( agent, data )
609 609 local role = agent.role
610 610 local msg = MsgPack.unpack(data)
611 611  
612   - local cost = {[ItemId.Diamond] = 40}
613   - if not role:checkItemEnough(cost) then
614   - return 1
615   - end
  612 + --local cost = {[ItemId.Diamond] = 40}
  613 + --if not role:checkItemEnough(cost) then
  614 + -- return 1
  615 + --end
616 616  
617 617 local orders = json.decode(role.dinerData:getProperty("order"))
618 618  
... ...
src/actions/RadioAction.lua
... ... @@ -121,10 +121,15 @@ function _M.finishQuestRpc(agent, data)
121 121 if not carbonData then return 4 end
122 122 -- get heros
123 123 local totalCoef = 0
  124 + local exp = config.time / 60
  125 + heroFaithMap = {}
124 126 for _, heroId in ipairs(task.heros) do
125 127 local hero = role.heros[heroId]
126 128 if hero then
127 129 totalCoef = totalCoef + getHeroCoef(hero, config.success)
  130 + -- 增加英雄信赖
  131 + hero:addHeroFaith(exp)
  132 + heroFaithMap[heroId] = hero:getProperty("faith")
128 133 end
129 134 end
130 135 -- send award
... ... @@ -152,6 +157,7 @@ function _M.finishQuestRpc(agent, data)
152 157 local msg = role:packReward(r, change)
153 158 msg["big"] = bigSuccess
154 159 msg["id"] = id
  160 + msg["heroFaith"] = heroFaithMap
155 161 SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg))
156 162 return true
157 163 end
... ...
1   -Subproject commit b4c54b229a7ac8c5ac938e72bd6cc4870a264c58
  1 +Subproject commit a2598231ccc5e16da1a27f976602871f30fcd035
... ...
src/models/HeroPlugin.lua
... ... @@ -74,7 +74,7 @@ function HeroPlugin.bind(Hero)
74 74  
75 75 for _, attrName in pairs(AttsEnumEx) do
76 76 if talentAttrS[attrName] then
77   - talentAttrS[attrName] = addAttr(unitData[attrName], talentAttrS[attrName], 0, attrName)
  77 + talentAttrS[attrName] = addAttr(unitData[attrName], talentAttrS[attrName], 1, attrName)
78 78 end
79 79 end
80 80  
... ... @@ -88,6 +88,11 @@ function HeroPlugin.bind(Hero)
88 88 faithAttr[add[1]] = (faithAttr[add[1]] or 0) + add[2]
89 89 end
90 90 end
  91 + for _, attrName in pairs(AttsEnumEx) do
  92 + if faithAttr[attrName] then
  93 + faithAttr[attrName] = addAttr(unitData[attrName], faithAttr[attrName], 1, attrName)
  94 + end
  95 + end
91 96  
92 97 local attrs = {}
93 98 for _, attName in pairs(AttsEnumEx) do
... ...