Commit 62c5e2f042271486eaf191160cf8699ea2c76d1c
1 parent
f699d337
海港贸易活动自动领取结算奖励时,增加条件,要进行过捐赠
Showing
3 changed files
with
8 additions
and
2 deletions
Show diff stats
src/actions/SeaportAction.lua
| ... | ... | @@ -59,6 +59,12 @@ function _M.donateRpc(agent, data) |
| 59 | 59 | redisproxy:hincrby(SEAPORT_TRADE_TASK_2,id,itemCount) |
| 60 | 60 | end |
| 61 | 61 | |
| 62 | + local seaport = role:getProperty("seaport") or {} | |
| 63 | + if not seaport.join then | |
| 64 | + seaport.join = 1 | |
| 65 | + role:updateProperty({field = "seaport", value = seaport}) | |
| 66 | + end | |
| 67 | + | |
| 62 | 68 | role:costItems({[itemId] = itemCount}, {log = {desc = "seaportDonate", int1 = phase, int2 = id}}) |
| 63 | 69 | local reward, change = role:award(rewards, {log = {desc = "seaportDonate", int1 = ddata.phase, int2 = ddata.id}}) |
| 64 | 70 | ... | ... |
src/models/Role.lua
| ... | ... | @@ -198,7 +198,7 @@ Role.schema = { |
| 198 | 198 | nbTask = {"table", {}}, -- 新用户活动 |
| 199 | 199 | radioTask = {"table", {}}, -- 电台任务 {id = {time=end_ts,heros=heros}} 表crusadeCsv |
| 200 | 200 | |
| 201 | - seaport = {"table", {}}, -- 海岛贸易季 {time = 1234567890, donate = {}, collect = {[1] = {team = "1=2=3", time = 1234567890}}, shop = {}} | |
| 201 | + seaport = {"table", {}}, -- 海岛贸易季 {time = 1234567890, donate = {}, collect = {[1] = {team = "1=2=3", time = 1234567890}}, shop = {}, join = 1} | |
| 202 | 202 | |
| 203 | 203 | returner = {"table", {}}, -- 回归者 {time = 12334233423, [1] = 1, [2] = 2, status = {[1] = 1}} |
| 204 | 204 | ... | ... |
src/models/RolePlugin.lua
| ... | ... | @@ -1370,7 +1370,7 @@ function RolePlugin.bind(Role) |
| 1370 | 1370 | local function getReward(reset) |
| 1371 | 1371 | -- 全服捐赠奖励 |
| 1372 | 1372 | local donate = seaport.donate or {} |
| 1373 | - if not reset and (not donate[1] or not donate[2]) then | |
| 1373 | + if not reset and seaport.join and (not donate[1] or not donate[2]) then | |
| 1374 | 1374 | local result = self:getSeaportServerProgress() |
| 1375 | 1375 | for idx, set in ipairs(csvdb["seaport_purchaseCsv"]) do |
| 1376 | 1376 | local done = true | ... | ... |