Commit 862d69a600c0083d801fa016d256affb0dba8c74
Merge branch 'bugfix' into tr/ob
* bugfix: (37 commits) 活动卡池保底出指定英雄 拆解术式充能的时候领取道具,获得个数计算错误 新手卡池限制30抽 给保底抽配置加默认值10 cb 返利 重写拆解室功能 拆解室功能重写 去除globald中发放活动排行奖励 世界Boss 增加行动点 物资危机bug 物资危机 冒险bug 宝藏怪活动 世界boss翻牌奖励 活动卡池保底单独记录 充值 天赋升级写日志报错 活动剧情解锁 充值重复 bug 下一关提前 ... # Conflicts: # src/csvdata
Showing
31 changed files
with
736 additions
and
242 deletions
Show diff stats
robot/robot.lua
robot/robot_config.lua
@@ -18,21 +18,21 @@ return { | @@ -18,21 +18,21 @@ return { | ||
18 | online = 100, -- 稳定状态在线人数 | 18 | online = 100, -- 稳定状态在线人数 |
19 | inpre = 10, -- 稳定前每秒进入人数 -- 必须小于online数 | 19 | inpre = 10, -- 稳定前每秒进入人数 -- 必须小于online数 |
20 | max = 200, -- 最大玩家数 必须大于 online 数 | 20 | max = 200, -- 最大玩家数 必须大于 online 数 |
21 | - online_time = {10, 60}, -- 在线时间控制 秒 | 21 | + online_time = {10 * 60, 20 * 60}, -- 在线时间控制 秒 |
22 | 22 | ||
23 | uname_prefix = "robothehe", --机器名称前缀 | 23 | uname_prefix = "robothehe", --机器名称前缀 |
24 | 24 | ||
25 | 25 | ||
26 | -- 机器上线后的行为 | 26 | -- 机器上线后的行为 |
27 | units = { | 27 | units = { |
28 | - chat = {weight = 1}, -- 聊天 | ||
29 | - item = {weight = 1}, -- 物品操作 | ||
30 | - hero = {weight = 1}, -- 英雄 | ||
31 | - hang = {weight = 1}, -- 挂机战斗 | ||
32 | - tower = {weight = 1}, -- 爬塔 | ||
33 | - car = {weight = 1}, -- 爬塔 | ||
34 | - pvp = {weight = 1}, -- pvp | ||
35 | - email = {weight = 1}, -- 邮件 | ||
36 | - adv = {weight = 1}, -- 冒险 | 28 | + chat = {weight = 100}, -- 聊天 |
29 | + item = {weight = 100}, -- 物品操作 | ||
30 | + hero = {weight = 500}, -- 英雄 | ||
31 | + hang = {weight = 1000}, -- 挂机战斗 | ||
32 | + tower = {weight = 500}, -- 爬塔 | ||
33 | + car = {weight = 100}, -- 爬塔 | ||
34 | + pvp = {weight = 500}, -- pvp | ||
35 | + email = {weight = 100}, -- 邮件 | ||
36 | + adv = {weight = 200}, -- 冒险 | ||
37 | } | 37 | } |
38 | } | 38 | } |
robot/start.lua
@@ -25,7 +25,6 @@ end | @@ -25,7 +25,6 @@ end | ||
25 | function MSG.close(fd) | 25 | function MSG.close(fd) |
26 | if fd2serv[fd] and not fd2serv[fd].closing then | 26 | if fd2serv[fd] and not fd2serv[fd].closing then |
27 | fd2serv[fd].closing = true | 27 | fd2serv[fd].closing = true |
28 | - print(fd2serv[fd].agent) | ||
29 | skynet.call(fd2serv[fd].agent, "lua", "exit") | 28 | skynet.call(fd2serv[fd].agent, "lua", "exit") |
30 | pcall(skynet.send, poold, "lua", "feed") | 29 | pcall(skynet.send, poold, "lua", "feed") |
31 | 30 | ||
@@ -131,6 +130,9 @@ local function start(pooldp, pooldObj, onlineCountp, startIdp, endIdp, inprep) | @@ -131,6 +130,9 @@ local function start(pooldp, pooldObj, onlineCountp, startIdp, endIdp, inprep) | ||
131 | 130 | ||
132 | for i = 1, onlineCount, inpre do | 131 | for i = 1, onlineCount, inpre do |
133 | for j = 1, inpre do | 132 | for j = 1, inpre do |
133 | + if i + j - 1 > onlineCount then | ||
134 | + break | ||
135 | + end | ||
134 | add_robot() | 136 | add_robot() |
135 | end | 137 | end |
136 | skynet.sleep(100) | 138 | skynet.sleep(100) |
src/GlobalVar.lua
@@ -134,8 +134,8 @@ ItemId = { | @@ -134,8 +134,8 @@ ItemId = { | ||
134 | RuneFragment = 24, | 134 | RuneFragment = 24, |
135 | HeroFC = {700, 701, 702, 703}, --通用角色碎片 | 135 | HeroFC = {700, 701, 702, 703}, --通用角色碎片 |
136 | AdvKey = 80, -- 冒险钥匙 | 136 | AdvKey = 80, -- 冒险钥匙 |
137 | - BoxKey = 60, -- 拆解工具 | ||
138 | AdvPower = 4701, -- 拾荒体力 | 137 | AdvPower = 4701, -- 拾荒体力 |
138 | + CrisisScore = 8010, -- 积分 | ||
139 | } | 139 | } |
140 | 140 | ||
141 | TimeReset = { | 141 | TimeReset = { |
@@ -292,6 +292,10 @@ CardType = { | @@ -292,6 +292,10 @@ CardType = { | ||
292 | BattlePassCard = 7, -- 探索指令 | 292 | BattlePassCard = 7, -- 探索指令 |
293 | } | 293 | } |
294 | 294 | ||
295 | +ShopPackType = { | ||
296 | + ActShopPack = 5, -- 活动礼包 | ||
297 | +} | ||
298 | + | ||
295 | HeroQuality = { | 299 | HeroQuality = { |
296 | N = 1, | 300 | N = 1, |
297 | R = 2, | 301 | R = 2, |
@@ -318,6 +322,7 @@ MailId = { | @@ -318,6 +322,7 @@ MailId = { | ||
318 | 322 | ||
319 | PaySignAward = 241, | 323 | PaySignAward = 241, |
320 | PayBackAward = 242, | 324 | PayBackAward = 242, |
325 | + CBBackAward = 243, | ||
321 | } | 326 | } |
322 | 327 | ||
323 | TriggerEventType = { | 328 | TriggerEventType = { |
src/ProtocolCode.lua
@@ -227,6 +227,8 @@ actionCodes = { | @@ -227,6 +227,8 @@ actionCodes = { | ||
227 | Activity_endBattleRpc = 661, | 227 | Activity_endBattleRpc = 661, |
228 | Activity_battleRankRpc = 662, | 228 | Activity_battleRankRpc = 662, |
229 | Activity_battleMilestoneRpc = 663, | 229 | Activity_battleMilestoneRpc = 663, |
230 | + Activity_bossRewardRpc = 664, | ||
231 | + Activity_crisisMilestoneRpc = 665, | ||
230 | 232 | ||
231 | Radio_startQuestRpc = 700, | 233 | Radio_startQuestRpc = 700, |
232 | Radio_finishQuestRpc = 701, | 234 | Radio_finishQuestRpc = 701, |
src/RedisKeys.lua
@@ -19,6 +19,7 @@ R_ORDER = "order:%d:%d" | @@ -19,6 +19,7 @@ R_ORDER = "order:%d:%d" | ||
19 | RANK_COMMON = "rank:common:" | 19 | RANK_COMMON = "rank:common:" |
20 | RANK_TYPE = { | 20 | RANK_TYPE = { |
21 | ActBattleBoss = "act_battle_boss", | 21 | ActBattleBoss = "act_battle_boss", |
22 | + ActCrisis = "crisis", | ||
22 | } | 23 | } |
23 | 24 | ||
24 | -- rank | 25 | -- rank |
src/actions/ActivityAction.lua
@@ -268,7 +268,8 @@ function _M.exchangeRpc(agent, data) | @@ -268,7 +268,8 @@ function _M.exchangeRpc(agent, data) | ||
268 | local msg = MsgPack.unpack(data) | 268 | local msg = MsgPack.unpack(data) |
269 | local actid = msg.actid | 269 | local actid = msg.actid |
270 | local id = msg.id | 270 | local id = msg.id |
271 | - if not role.activity:isOpenById(actid) then return 1 end | 271 | + local count = msg.count |
272 | + if not role.activity:isOpenById(actid, "Exchange") then return 1 end | ||
272 | 273 | ||
273 | local exchangeCfg = csvdb["activity_exchangeCsv"][actid] | 274 | local exchangeCfg = csvdb["activity_exchangeCsv"][actid] |
274 | if not exchangeCfg then return 2 end | 275 | if not exchangeCfg then return 2 end |
@@ -278,18 +279,26 @@ function _M.exchangeRpc(agent, data) | @@ -278,18 +279,26 @@ function _M.exchangeRpc(agent, data) | ||
278 | local curCount = exchangeData[id] or 0 | 279 | local curCount = exchangeData[id] or 0 |
279 | local actCfg = exchangeCfg[id] | 280 | local actCfg = exchangeCfg[id] |
280 | local limitArr = actCfg.limit:toArray(true, "=") | 281 | local limitArr = actCfg.limit:toArray(true, "=") |
281 | - if curCount >= limitArr[2] then return 4 end | 282 | + if curCount + count > limitArr[2] then return 4 end |
282 | 283 | ||
283 | local costs = actCfg.goods:toNumMap() | 284 | local costs = actCfg.goods:toNumMap() |
285 | + for k,v in pairs(costs) do | ||
286 | + costs[k] = v * count | ||
287 | + end | ||
284 | if not role:checkItemEnough(costs) then return 5 end | 288 | if not role:checkItemEnough(costs) then return 5 end |
285 | role:costItems(costs, {log = {desc = "actExchange", int1 = actid, int2 = id}}) | 289 | role:costItems(costs, {log = {desc = "actExchange", int1 = actid, int2 = id}}) |
286 | 290 | ||
287 | - curCount = curCount + 1 | 291 | + curCount = curCount + count |
288 | exchangeData[id] = curCount | 292 | exchangeData[id] = curCount |
289 | curData[actid] = exchangeData | 293 | curData[actid] = exchangeData |
290 | role.activity:updateActData("Exchange", curData) | 294 | role.activity:updateActData("Exchange", curData) |
291 | 295 | ||
292 | - local reward, change = role:award(actCfg.award, {log = {desc = "actExchange", int1 = actid, int2 = id}}) | 296 | + local award = actCfg.award:toNumMap() |
297 | + for k,v in pairs(award) do | ||
298 | + award[k] = v * count | ||
299 | + end | ||
300 | + | ||
301 | + local reward, change = role:award(award, {log = {desc = "actExchange", int1 = actid, int2 = id}}) | ||
293 | 302 | ||
294 | 303 | ||
295 | SendPacket(actionCodes.Activity_exchangeRpc, MsgPack.pack(role:packReward(reward, change))) | 304 | SendPacket(actionCodes.Activity_exchangeRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -304,7 +313,7 @@ function _M.gachakonRpc(agent, data) | @@ -304,7 +313,7 @@ function _M.gachakonRpc(agent, data) | ||
304 | 313 | ||
305 | if count > 10 then return end | 314 | if count > 10 then return end |
306 | 315 | ||
307 | - if not role.activity:isOpenById(actid) then return 1 end | 316 | + if not role.activity:isOpenById(actid, "Gachakon") then return 1 end |
308 | 317 | ||
309 | local actCtrlData = csvdb["activity_ctrlCsv"][actid] | 318 | local actCtrlData = csvdb["activity_ctrlCsv"][actid] |
310 | if not actCtrlData then return 2 end | 319 | if not actCtrlData then return 2 end |
@@ -316,6 +325,7 @@ function _M.gachakonRpc(agent, data) | @@ -316,6 +325,7 @@ function _M.gachakonRpc(agent, data) | ||
316 | local gachakonInfo = role.activity:getActData("Gachakon") or {} | 325 | local gachakonInfo = role.activity:getActData("Gachakon") or {} |
317 | local award = {} | 326 | local award = {} |
318 | local remain = 0 | 327 | local remain = 0 |
328 | + local showAward = {} | ||
319 | for i = 1, count do | 329 | for i = 1, count do |
320 | local tmpCfg = clone(actCfg) | 330 | local tmpCfg = clone(actCfg) |
321 | remain = 0 | 331 | remain = 0 |
@@ -335,6 +345,7 @@ function _M.gachakonRpc(agent, data) | @@ -335,6 +345,7 @@ function _M.gachakonRpc(agent, data) | ||
335 | if not id then return 4 end | 345 | if not id then return 4 end |
336 | gachakonInfo[id] = (gachakonInfo[id] or 0) + 1 | 346 | gachakonInfo[id] = (gachakonInfo[id] or 0) + 1 |
337 | local curAward = tmpCfg[id].award:toNumMap() | 347 | local curAward = tmpCfg[id].award:toNumMap() |
348 | + table.insert(showAward, curAward) | ||
338 | for k, v in pairs(curAward) do | 349 | for k, v in pairs(curAward) do |
339 | award[k] = (award[k] or 0) + v | 350 | award[k] = (award[k] or 0) + v |
340 | end | 351 | end |
@@ -355,7 +366,7 @@ function _M.gachakonRpc(agent, data) | @@ -355,7 +366,7 @@ function _M.gachakonRpc(agent, data) | ||
355 | end | 366 | end |
356 | role.activity:updateActData("Gachakon", gachakonInfo) | 367 | role.activity:updateActData("Gachakon", gachakonInfo) |
357 | 368 | ||
358 | - SendPacket(actionCodes.Activity_gachakonRpc, MsgPack.pack(role:packReward(reward, change))) | 369 | + SendPacket(actionCodes.Activity_gachakonRpc, MsgPack.pack(showAward)) |
359 | return true | 370 | return true |
360 | end | 371 | end |
361 | 372 | ||
@@ -363,7 +374,7 @@ function _M.hangDropRpc(agent, data) | @@ -363,7 +374,7 @@ function _M.hangDropRpc(agent, data) | ||
363 | local role = agent.role | 374 | local role = agent.role |
364 | local msg = MsgPack.unpack(data) | 375 | local msg = MsgPack.unpack(data) |
365 | local actid = msg.actid | 376 | local actid = msg.actid |
366 | - if not role.activity:isOpenById(actid) then return 1 end | 377 | + if not role.activity:isOpenById(actid, "HangDrop") then return 1 end |
367 | 378 | ||
368 | local actCfg = csvdb["activity_putCsv"][actid] | 379 | local actCfg = csvdb["activity_putCsv"][actid] |
369 | if not actCfg then return 2 end | 380 | if not actCfg then return 2 end |
@@ -380,7 +391,7 @@ function _M.hangDropRpc(agent, data) | @@ -380,7 +391,7 @@ function _M.hangDropRpc(agent, data) | ||
380 | if type == 1 then | 391 | if type == 1 then |
381 | local actId = arr[2] | 392 | local actId = arr[2] |
382 | local carbonId = arr[3] | 393 | local carbonId = arr[3] |
383 | - if not role.activity:isOpenById(actid) then return 3 end | 394 | + if not role.activity:isOpenById(actId, "ChallengeLevel") then return 3 end |
384 | local clInfo = role.activity:getActData("ChallengeLevel") or {} | 395 | local clInfo = role.activity:getActData("ChallengeLevel") or {} |
385 | if not clInfo[carbonId] then | 396 | if not clInfo[carbonId] then |
386 | break | 397 | break |
@@ -437,7 +448,7 @@ function _M.startBattleRpc(agent, data) | @@ -437,7 +448,7 @@ function _M.startBattleRpc(agent, data) | ||
437 | local actid = msg.actid | 448 | local actid = msg.actid |
438 | local id = msg.id | 449 | local id = msg.id |
439 | local count = msg.count | 450 | local count = msg.count |
440 | - if not role.activity:isOpenById(actid) then return 1 end | 451 | + if not role.activity:isOpenById(actid, "ChallengeLevel") then return 1 end |
441 | 452 | ||
442 | local actCfg = csvdb["activity_battleCsv"][actid] | 453 | local actCfg = csvdb["activity_battleCsv"][actid] |
443 | if not actCfg then return 2 end | 454 | if not actCfg then return 2 end |
@@ -461,9 +472,10 @@ function _M.startBattleRpc(agent, data) | @@ -461,9 +472,10 @@ function _M.startBattleRpc(agent, data) | ||
461 | -- check cost | 472 | -- check cost |
462 | local changeFlag = false | 473 | local changeFlag = false |
463 | local ticket = actData["ticket"] | 474 | local ticket = actData["ticket"] |
475 | + local num = 0 -- cost num | ||
464 | if battleCfg.type ~= "" then | 476 | if battleCfg.type ~= "" then |
465 | role.activity:getBattleTicket(actid) | 477 | role.activity:getBattleTicket(actid) |
466 | - local num = battleCfg.type:toArray(true, "=")[3] | 478 | + num = battleCfg.type:toArray(true, "=")[3] |
467 | if count and count > 0 then | 479 | if count and count > 0 then |
468 | if battleCfg.rank == 0 then | 480 | if battleCfg.rank == 0 then |
469 | return 7 | 481 | return 7 |
@@ -479,9 +491,10 @@ function _M.startBattleRpc(agent, data) | @@ -479,9 +491,10 @@ function _M.startBattleRpc(agent, data) | ||
479 | if ticket < num then | 491 | if ticket < num then |
480 | return 6 | 492 | return 6 |
481 | end | 493 | end |
482 | - actData["ticket"] = ticket - num | ||
483 | changeFlag = true | 494 | changeFlag = true |
484 | end | 495 | end |
496 | + -- 解锁活动剧情 | ||
497 | + role:checkStoryStatus(false, 5, id) | ||
485 | 498 | ||
486 | if not count then | 499 | if not count then |
487 | role.__actBattleCache = { | 500 | role.__actBattleCache = { |
@@ -513,6 +526,7 @@ function _M.startBattleRpc(agent, data) | @@ -513,6 +526,7 @@ function _M.startBattleRpc(agent, data) | ||
513 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) | 526 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) |
514 | 527 | ||
515 | bi["sum"] = bi["sum"] + bi["top"] | 528 | bi["sum"] = bi["sum"] + bi["top"] |
529 | + actData["ticket"] = ticket - num | ||
516 | actData[id] = bi | 530 | actData[id] = bi |
517 | changeFlag = true | 531 | changeFlag = true |
518 | 532 | ||
@@ -540,7 +554,7 @@ function _M.endBattleRpc(agent, data) | @@ -540,7 +554,7 @@ function _M.endBattleRpc(agent, data) | ||
540 | local isWin = msg.isWin | 554 | local isWin = msg.isWin |
541 | local heros = msg.heros | 555 | local heros = msg.heros |
542 | local support = msg.support | 556 | local support = msg.support |
543 | - if not role.activity:isOpenById(actid) then return 1 end | 557 | + if not role.activity:isOpenById(actid, "ChallengeLevel") then return 1 end |
544 | 558 | ||
545 | if not role.__actBattleCache then return 2 end | 559 | if not role.__actBattleCache then return 2 end |
546 | 560 | ||
@@ -556,6 +570,14 @@ function _M.endBattleRpc(agent, data) | @@ -556,6 +570,14 @@ function _M.endBattleRpc(agent, data) | ||
556 | 570 | ||
557 | local actData = role.activity:getActData("ChallengeLevel") or {} | 571 | local actData = role.activity:getActData("ChallengeLevel") or {} |
558 | 572 | ||
573 | + -- 总输出 | ||
574 | + local dmg = 0 | ||
575 | + for k, v in pairs(msg.info.damage) do | ||
576 | + if k % 100 == 2 then | ||
577 | + dmg = dmg + v | ||
578 | + end | ||
579 | + end | ||
580 | + | ||
559 | local reward, change = {}, nil | 581 | local reward, change = {}, nil |
560 | 582 | ||
561 | local battleInfo = actData[id] or {} | 583 | local battleInfo = actData[id] or {} |
@@ -611,6 +633,10 @@ function _M.endBattleRpc(agent, data) | @@ -611,6 +633,10 @@ function _M.endBattleRpc(agent, data) | ||
611 | check[7] = function(_, cond) | 633 | check[7] = function(_, cond) |
612 | return msg.info.atime and msg.info.atime <= cond | 634 | return msg.info.atime and msg.info.atime <= cond |
613 | end | 635 | end |
636 | + -- 8 总输出值 msg.info.atime | ||
637 | + check[8] = function(_, cond) | ||
638 | + return dmg >= cond | ||
639 | + end | ||
614 | curStar = 0 | 640 | curStar = 0 |
615 | local sweepConds = battleCfg.sweep_condition:toTableArray(true) | 641 | local sweepConds = battleCfg.sweep_condition:toTableArray(true) |
616 | for i, cond in ipairs(sweepConds) do | 642 | for i, cond in ipairs(sweepConds) do |
@@ -618,8 +644,11 @@ function _M.endBattleRpc(agent, data) | @@ -618,8 +644,11 @@ function _M.endBattleRpc(agent, data) | ||
618 | curStar = curStar + (1 << (i - 1)) | 644 | curStar = curStar + (1 << (i - 1)) |
619 | end | 645 | end |
620 | end | 646 | end |
621 | - else | ||
622 | - curStar = 0 | 647 | + else |
648 | + curStar = 0 | ||
649 | + if battleCfg.rank ~= 0 then | ||
650 | + curStar = 1 | ||
651 | + end | ||
623 | end | 652 | end |
624 | local oldStarNum = getStarCount(battleCfg, battleInfo["star"] or 0) | 653 | local oldStarNum = getStarCount(battleCfg, battleInfo["star"] or 0) |
625 | local newStarNum = getStarCount(battleCfg, curStar) | 654 | local newStarNum = getStarCount(battleCfg, curStar) |
@@ -628,13 +657,12 @@ function _M.endBattleRpc(agent, data) | @@ -628,13 +657,12 @@ function _M.endBattleRpc(agent, data) | ||
628 | end | 657 | end |
629 | 658 | ||
630 | if battleCfg.rank ~= 0 then | 659 | if battleCfg.rank ~= 0 then |
660 | + -- 消耗门票 | ||
661 | + role.activity:getBattleTicket(actid) | ||
662 | + local num = battleCfg.type:toArray(true, "=")[3] | ||
663 | + actData["ticket"] = math.max(actData["ticket"] - num, 0) | ||
664 | + | ||
631 | -- 更新排行榜 最高伤害 | 665 | -- 更新排行榜 最高伤害 |
632 | - local dmg = 0 | ||
633 | - for k, v in pairs(msg.info.damage) do | ||
634 | - if k % 100 == 2 then | ||
635 | - dmg = dmg + v | ||
636 | - end | ||
637 | - end | ||
638 | battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) | 666 | battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) |
639 | battleInfo["sum"] = (battleInfo["sum"] or 0) + dmg | 667 | battleInfo["sum"] = (battleInfo["sum"] or 0) + dmg |
640 | local rankVal = 0 | 668 | local rankVal = 0 |
@@ -650,10 +678,10 @@ function _M.endBattleRpc(agent, data) | @@ -650,10 +678,10 @@ function _M.endBattleRpc(agent, data) | ||
650 | actData[id] = battleInfo | 678 | actData[id] = battleInfo |
651 | role.activity:updateActData("ChallengeLevel", actData) | 679 | role.activity:updateActData("ChallengeLevel", actData) |
652 | 680 | ||
653 | - if oldStarNum == 0 or battleCfg.rank ~= 0 then | 681 | + if (oldStarNum == 0 and newStarNum > 0) or battleCfg.rank ~= 0 then |
654 | reward = battleCfg.item_clear:toNumMap() | 682 | reward = battleCfg.item_clear:toNumMap() |
655 | end | 683 | end |
656 | - if (oldStarNum < 3 and newStarNum == 3) or battleCfg.rank ~= 0 then | 684 | + if (oldStarNum < 3 and newStarNum == 3) or (battleCfg.rank ~= 0 and newStarNum == 3) then |
657 | local aw = battleCfg.perfect_reward:toNumMap() | 685 | local aw = battleCfg.perfect_reward:toNumMap() |
658 | for k, v in pairs(aw) do | 686 | for k, v in pairs(aw) do |
659 | reward[k] = (reward[k] or 0) + v | 687 | reward[k] = (reward[k] or 0) + v |
@@ -670,6 +698,15 @@ function _M.endBattleRpc(agent, data) | @@ -670,6 +698,15 @@ function _M.endBattleRpc(agent, data) | ||
670 | supports = support, | 698 | supports = support, |
671 | }) | 699 | }) |
672 | 700 | ||
701 | + -- 解锁活动剧情 | ||
702 | + if newStarNum >= 3 then | ||
703 | + role:checkStoryStatus(false, 5, id) | ||
704 | + end | ||
705 | + | ||
706 | + if battleCfg.worldBoss_award ~= 0 and msg.point then | ||
707 | + battleInfo["bossP"] = (battleInfo["bossP"] or 0) + msg.point | ||
708 | + end | ||
709 | + | ||
673 | reward, change = role:award(reward, {log = {desc = "actBattle", int1 = actid, int2 = newStarNum}}) | 710 | reward, change = role:award(reward, {log = {desc = "actBattle", int1 = actid, int2 = newStarNum}}) |
674 | 711 | ||
675 | SendPacket(actionCodes.Activity_endBattleRpc, MsgPack.pack({ | 712 | SendPacket(actionCodes.Activity_endBattleRpc, MsgPack.pack({ |
@@ -684,10 +721,15 @@ function _M.battleRankRpc(agent, data) | @@ -684,10 +721,15 @@ function _M.battleRankRpc(agent, data) | ||
684 | local role = agent.role | 721 | local role = agent.role |
685 | local msg = MsgPack.unpack(data) | 722 | local msg = MsgPack.unpack(data) |
686 | local actid = msg.actid | 723 | local actid = msg.actid |
687 | - if not role.activity:isOpenById(actid) then return 1 end | ||
688 | - | ||
689 | - local rankInfo = role:getRankInfoCommon(RANK_TYPE.ActBattleBoss) | ||
690 | - | 724 | + local cfg = csvdb["activity_ctrlCsv"][actid] |
725 | + if not cfg then return 1 end | ||
726 | + if not role.activity:isOpen(cfg.showType) then return 2 end | ||
727 | + local actTypeToRank = { | ||
728 | + [role.activity.ActivityType.ChallengeLevel] = RANK_TYPE.ActBattleBoss, | ||
729 | + [role.activity.ActivityType.Crisis] = RANK_TYPE.ActCrisis, | ||
730 | + } | ||
731 | + if not actTypeToRank[cfg.showType] then return end | ||
732 | + local rankInfo = role:getRankInfoCommon(actTypeToRank[cfg.showType]) | ||
691 | SendPacket(actionCodes.Activity_battleRankRpc, MsgPack.pack(rankInfo)) | 733 | SendPacket(actionCodes.Activity_battleRankRpc, MsgPack.pack(rankInfo)) |
692 | return true | 734 | return true |
693 | end | 735 | end |
@@ -699,7 +741,7 @@ function _M.battleMilestoneRpc(agent, data) | @@ -699,7 +741,7 @@ function _M.battleMilestoneRpc(agent, data) | ||
699 | local id = msg.id | 741 | local id = msg.id |
700 | local index = msg.index | 742 | local index = msg.index |
701 | 743 | ||
702 | - if not role.activity:isOpenById(actid) then return 1 end | 744 | + if not role.activity:isOpenById(actid, "ChallengeLevel") then return 1 end |
703 | 745 | ||
704 | local actCfg = csvdb["activity_mileageCsv"][actid] | 746 | local actCfg = csvdb["activity_mileageCsv"][actid] |
705 | if not actCfg then return 3 end | 747 | if not actCfg then return 3 end |
@@ -732,4 +774,88 @@ function _M.battleMilestoneRpc(agent, data) | @@ -732,4 +774,88 @@ function _M.battleMilestoneRpc(agent, data) | ||
732 | return true | 774 | return true |
733 | end | 775 | end |
734 | 776 | ||
777 | +function _M.crisisMilestoneRpc(agent, data) | ||
778 | + local role = agent.role | ||
779 | + local msg = MsgPack.unpack(data) | ||
780 | + local actid = msg.actid | ||
781 | + local id = msg.id | ||
782 | + if not role.activity:isOpenById(actid, "Crisis") then return 1 end | ||
783 | + local actCfg = csvdb["activity_mileageCsv"][actid] | ||
784 | + if not actCfg then return 3 end | ||
785 | + | ||
786 | + local curCsv = actCfg[id] | ||
787 | + if not curCsv then return 4 end | ||
788 | + | ||
789 | + if role:getItemCount(ItemId.CrisisScore) < curCsv.condition then | ||
790 | + return 5 | ||
791 | + end | ||
792 | + | ||
793 | + local actData = role.activity:getActData("Crisis") or {} | ||
794 | + actData.score = actData.score or {} | ||
795 | + if actData.score[id] then | ||
796 | + return 6 | ||
797 | + end | ||
798 | + actData.score[id] = -1 | ||
799 | + role.activity:updateActData("Crisis", actData) | ||
800 | + | ||
801 | + local reward, change = role:award(curCsv.reward, {log = {desc = "actMilecrisis", int1 = actid}}) | ||
802 | + SendPacket(actionCodes.Activity_crisisMilestoneRpc, MsgPack.pack(role:packReward(reward, change))) | ||
803 | + return true | ||
804 | +end | ||
805 | + | ||
806 | + | ||
807 | +function _M.bossRewardRpc(agent, data) | ||
808 | + local role = agent.role | ||
809 | + local msg = MsgPack.unpack(data) | ||
810 | + local actid = msg.actid | ||
811 | + local id = msg.id | ||
812 | + local index = msg.index | ||
813 | + | ||
814 | + if not role.activity:isOpenById(actid, "ChallengeLevel") then return 1 end | ||
815 | + | ||
816 | + local actCfg = csvdb["activity_battleCsv"][actid] | ||
817 | + if not actCfg then return 2 end | ||
818 | + | ||
819 | + local battleCfg = actCfg[id] | ||
820 | + if not battleCfg then return 3 end | ||
821 | + | ||
822 | + if battleCfg.worldBoss_award == 0 then return 4 end | ||
823 | + | ||
824 | + actCfg = csvdb["activity_wordboss_awardCsv"][battleCfg.worldBoss_award] | ||
825 | + if not actCfg then return 5 end | ||
826 | + local awardCfg = actCfg[index] | ||
827 | + if not awardCfg then return 6 end | ||
828 | + | ||
829 | + local preList = awardCfg.condition1:toArray(true, "=") | ||
830 | + | ||
831 | + local actData = role.activity:getActData("ChallengeLevel") or {} | ||
832 | + local battleInfo = actData[id] or {} | ||
833 | + local bossPoint = battleInfo["bossP"] or 0 | ||
834 | + if bossPoint < 1 then return 7 end | ||
835 | + | ||
836 | + local bossRecord = battleInfo["bossR"] or "" | ||
837 | + local ok = false | ||
838 | + if #preList == 0 then | ||
839 | + ok = true | ||
840 | + else | ||
841 | + for _, i in ipairs(preList) do | ||
842 | + local flag = string.char(string.getbit(bossRecord, i)) | ||
843 | + if flag == "1" then | ||
844 | + ok = true | ||
845 | + break | ||
846 | + end | ||
847 | + end | ||
848 | + end | ||
849 | + if not ok then return 8 end | ||
850 | + | ||
851 | + battleInfo["bossR"] = string.setbit(bossRecord, index) | ||
852 | + actData[id] = battleInfo | ||
853 | + role.activity:updateActData("ChallengeLevel", actData) | ||
854 | + | ||
855 | + local award = awardCfg.reward:toNumMap() | ||
856 | + local reward, change = role:award(award, {log = {desc = "worldBossReward", int1 = actid, int2 = index}}) | ||
857 | + SendPacket(actionCodes.Activity_bossRewardRpc, MsgPack.pack(role:packReward(reward, change))) | ||
858 | + return true | ||
859 | +end | ||
860 | + | ||
735 | return _M | 861 | return _M |
736 | \ No newline at end of file | 862 | \ No newline at end of file |
src/actions/DinerAction.lua
@@ -598,6 +598,7 @@ function _M.updateTaskRpc( agent, data ) | @@ -598,6 +598,7 @@ function _M.updateTaskRpc( agent, data ) | ||
598 | restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | 598 | restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
599 | restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 599 | restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
600 | restaurant_order_lv = taskData.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | 600 | restaurant_order_lv = taskData.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
601 | + restaurant_order_type = 1, -- 订单任务类型,0:特殊顾客,1:特别订单 | ||
601 | }) | 602 | }) |
602 | 603 | ||
603 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) | 604 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) |
@@ -896,6 +897,14 @@ function _M.entrustRpc(agent , data) | @@ -896,6 +897,14 @@ function _M.entrustRpc(agent , data) | ||
896 | 897 | ||
897 | reward, change = role:award(curData.reward, {log = {desc = "dinerEntrus", int1 = entrustId}}) | 898 | reward, change = role:award(curData.reward, {log = {desc = "dinerEntrus", int1 = entrustId}}) |
898 | table.remove(entrust, 1) | 899 | table.remove(entrust, 1) |
900 | + | ||
901 | + role:log("restaurant_order", { | ||
902 | + restaurant_order_id = entrustId, -- 订单任务ID | ||
903 | + restaurant_order_status = 2, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | ||
904 | + restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | ||
905 | + restaurant_order_lv = curData.type, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | ||
906 | + restaurant_order_type = 0, -- 订单任务类型,0:特殊顾客,1:特别订单 | ||
907 | + }) | ||
899 | elseif ctype == 2 then -- 放弃 | 908 | elseif ctype == 2 then -- 放弃 |
900 | table.remove(entrust, 1) | 909 | table.remove(entrust, 1) |
901 | else | 910 | else |
src/actions/GmAction.lua
@@ -529,6 +529,16 @@ function _M.guide(role, pms) | @@ -529,6 +529,16 @@ function _M.guide(role, pms) | ||
529 | return "成功" | 529 | return "成功" |
530 | end | 530 | end |
531 | 531 | ||
532 | +table.insert(helpDes, {"挑战关卡次数", "actbattle"}) | ||
533 | +function _M.actbattle(role, pms) | ||
534 | + if not role.activity:isOpen("ChallengeLevel") then return end | ||
535 | + local actData = role.activity:getActData("ChallengeLevel") | ||
536 | + actData["ticket"] = 100 | ||
537 | + role.activity:updateActData("ChallengeLevel", actData) | ||
538 | + | ||
539 | + return "成功" | ||
540 | +end | ||
541 | + | ||
532 | function _M.helpRpc(agent, data) | 542 | function _M.helpRpc(agent, data) |
533 | SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) | 543 | SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) |
534 | return true | 544 | return true |
src/actions/HangAction.lua
@@ -498,46 +498,49 @@ function _M.buyBonusCountRpc(agent, data) | @@ -498,46 +498,49 @@ function _M.buyBonusCountRpc(agent, data) | ||
498 | return true | 498 | return true |
499 | end | 499 | end |
500 | 500 | ||
501 | -local function bonusWinReward(role, bonusData, bwin, count) | 501 | +local function bonusWinReward(role, bonusData, rewardType, count) |
502 | count = count or 1 | 502 | count = count or 1 |
503 | - local open, actId = role.activity:isOpen("BonusDouble") | ||
504 | - local actData = csvdb["activity_ctrlCsv"][actId] | ||
505 | - local extraCnt = role.storeData:getBonusExtraFightCount() | ||
506 | - | ||
507 | - local coef = 1 | ||
508 | - if open and actData then | ||
509 | - coef = tonumber(actData.condition2) | ||
510 | - end | ||
511 | - local bonusC = role.dailyData:getProperty("bonusC") | ||
512 | - bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | ||
513 | - if globalCsv.bonus_daily_count * coef + extraCnt - bonusC[bonusData.type]["c"] < count then return false, 1 end | ||
514 | - bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + count | ||
515 | - role.dailyData:updateProperty({field = "bonusC", value = bonusC}) | ||
516 | 503 | ||
517 | - local reward, change | ||
518 | - reward = bonusData.reward:toNumMap() | ||
519 | - for itemId, c in pairs(reward) do | ||
520 | - reward[itemId] = c * count | ||
521 | - end | ||
522 | - for i = 1, count do | ||
523 | - local chance = bonusData.chance:randWeight(true) | ||
524 | - if chance[1] ~= 0 then | ||
525 | - reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] | 504 | + local reward, change = {} |
505 | + if rewardType == 1 or rewardType == 4 then | ||
506 | + for k, v in pairs(bonusData.clear_reward:toNumMap()) do | ||
507 | + reward[k] = (reward[k] or 0) + v | ||
526 | end | 508 | end |
527 | end | 509 | end |
528 | 510 | ||
529 | - for k, v in pairs(reward) do | ||
530 | - reward[k] = v * (coef > 1 and actData.condition or 1) | ||
531 | - end | ||
532 | - | ||
533 | - if bwin then -- 满星 额外奖励 | 511 | + if rewardType == 2 or rewardType == 4 then |
534 | for k, v in pairs(bonusData.perfect_reward:toNumMap()) do | 512 | for k, v in pairs(bonusData.perfect_reward:toNumMap()) do |
535 | reward[k] = (reward[k] or 0) + v | 513 | reward[k] = (reward[k] or 0) + v |
536 | end | 514 | end |
537 | end | 515 | end |
538 | - reward, change = role:award(reward, {log = {desc = "bonusBattle", int1 = id}}) | ||
539 | - role:checkTaskEnter("BonusPass", {id = id, count = count}) | ||
540 | - return true, reward, change | 516 | + |
517 | + if rewardType == 3 then | ||
518 | + local open, actId = role.activity:isOpen("BonusDouble") | ||
519 | + local actData | ||
520 | + if open then | ||
521 | + actData = csvdb["activity_ctrlCsv"][actId] | ||
522 | + end | ||
523 | + | ||
524 | + reward = bonusData.reward:toNumMap() | ||
525 | + for itemId, c in pairs(reward) do | ||
526 | + reward[itemId] = c * count | ||
527 | + end | ||
528 | + for i = 1, count do | ||
529 | + local chance = bonusData.chance:randWeight(true) | ||
530 | + if chance[1] ~= 0 then | ||
531 | + reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] | ||
532 | + end | ||
533 | + end | ||
534 | + if open and actData then | ||
535 | + for k, v in pairs(reward) do | ||
536 | + reward[k] = v * (actData.condition > 1 and actData.condition or 1) | ||
537 | + end | ||
538 | + end | ||
539 | + end | ||
540 | + | ||
541 | + reward, change = role:award(reward, {log = {desc = "bonusBattle", int1 = bonusData.id}}) | ||
542 | + role:checkTaskEnter("BonusPass", {id = bonusData.id, count = count}) | ||
543 | + return reward, change | ||
541 | end | 544 | end |
542 | 545 | ||
543 | function _M.startBonusBattleRpc(agent, data) | 546 | function _M.startBonusBattleRpc(agent, data) |
@@ -559,23 +562,24 @@ function _M.startBonusBattleRpc(agent, data) | @@ -559,23 +562,24 @@ function _M.startBonusBattleRpc(agent, data) | ||
559 | if not bonusData then return 3 end | 562 | if not bonusData then return 3 end |
560 | if not role:checkHangPass(bonusData.unlock) then return 4 end | 563 | if not role:checkHangPass(bonusData.unlock) then return 4 end |
561 | 564 | ||
562 | - local bonusC = role.dailyData:getProperty("bonusC") | ||
563 | - bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | ||
564 | - | ||
565 | - local actData = csvdb["activity_ctrlCsv"][actId] | ||
566 | - | ||
567 | - local extraCnt = role.storeData:getBonusExtraFightCount() | ||
568 | - local coef = 1 | ||
569 | - if open and actData then | ||
570 | - coef = tonumber(actData.condition2) | ||
571 | - end | ||
572 | - | ||
573 | - if math.illegalNum(count, 1, globalCsv.bonus_daily_count * coef + extraCnt - bonusC[bonusData.type]["c"]) then return 7 end | ||
574 | 565 | ||
575 | local bonusStar = role:getProperty("bonusStar") | 566 | local bonusStar = role:getProperty("bonusStar") |
576 | if bonusStar[id] and bonusStar[id] >= (1 << #bonusData.sweep_condition:toTableArray(true)) - 1 then | 567 | if bonusStar[id] and bonusStar[id] >= (1 << #bonusData.sweep_condition:toTableArray(true)) - 1 then |
577 | - local status, reward, change = bonusWinReward(role, bonusData, nil, count) | ||
578 | - if not status then return 10 * (reward or 0) end | 568 | + local bonusC = role.dailyData:getProperty("bonusC") |
569 | + bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | ||
570 | + | ||
571 | + local actData = csvdb["activity_ctrlCsv"][actId] | ||
572 | + local extraCnt = role.storeData:getBonusExtraFightCount() | ||
573 | + local coef = 1 | ||
574 | + if open and actData then | ||
575 | + coef = tonumber(actData.condition2) | ||
576 | + end | ||
577 | + if math.illegalNum(count, 1, globalCsv.bonus_daily_count * coef + extraCnt - bonusC[bonusData.type]["c"]) then return 7 end | ||
578 | + | ||
579 | + bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + count | ||
580 | + role.dailyData:updateProperty({field = "bonusC", value = bonusC}) | ||
581 | + | ||
582 | + local reward, change = bonusWinReward(role, bonusData, 3, count) | ||
579 | SendPacket(actionCodes.Hang_startBonusBattleRpc, MsgPack.pack({reward = reward, change = change})) | 583 | SendPacket(actionCodes.Hang_startBonusBattleRpc, MsgPack.pack({reward = reward, change = change})) |
580 | else | 584 | else |
581 | local bTeam = role:getTeamFormatByType(TeamSystemType.BonusBattle) | 585 | local bTeam = role:getTeamFormatByType(TeamSystemType.BonusBattle) |
@@ -605,15 +609,16 @@ function _M.endBonusBattleRpc(agent, data) | @@ -605,15 +609,16 @@ function _M.endBonusBattleRpc(agent, data) | ||
605 | end | 609 | end |
606 | local bonusData = csvdb["bonus_battleCsv"][id] | 610 | local bonusData = csvdb["bonus_battleCsv"][id] |
607 | 611 | ||
608 | - local reward, change | 612 | + local reward, change = {} |
609 | 613 | ||
610 | local bonusStar = role:getProperty("bonusStar") | 614 | local bonusStar = role:getProperty("bonusStar") |
615 | + local oldStar = bonusStar[id] or 0 | ||
611 | local curStar = 0 | 616 | local curStar = 0 |
612 | if starNum and starNum > 0 then | 617 | if starNum and starNum > 0 then |
613 | -- 胜利扣除次数 | 618 | -- 胜利扣除次数 |
614 | 619 | ||
615 | local bTeam = role:getTeamFormatByType(TeamSystemType.BonusBattle) | 620 | local bTeam = role:getTeamFormatByType(TeamSystemType.BonusBattle) |
616 | - local herosInfo = role:getTeamHerosInfo(bTeam.heros) | 621 | + local herosInfo = role:getTeamHerosInfo(bTeam).heros |
617 | 622 | ||
618 | local check = {} | 623 | local check = {} |
619 | -- 1 通关 | 624 | -- 1 通关 |
@@ -671,12 +676,23 @@ function _M.endBonusBattleRpc(agent, data) | @@ -671,12 +676,23 @@ function _M.endBonusBattleRpc(agent, data) | ||
671 | end | 676 | end |
672 | end | 677 | end |
673 | local status | 678 | local status |
674 | - status, reward, change = bonusWinReward(role, bonusData, curStar >= (1 << #sweepConds) - 1) | ||
675 | - if not status then return 10 + (reward or 0) end | 679 | + local rewardType = 0 |
680 | + if curStar >= (1 << #sweepConds) - 1 then -- 满星 | ||
681 | + rewardType = 2 | ||
682 | + if oldStar == 0 then --通关 | ||
683 | + rewardType = 4 | ||
684 | + end | ||
685 | + elseif oldStar == 0 then --通关 | ||
686 | + rewardType = 1 | ||
687 | + end | ||
688 | + | ||
689 | + if rewardType ~= 0 then | ||
690 | + reward, change = bonusWinReward(role, bonusData, rewardType) | ||
691 | + end | ||
676 | else | 692 | else |
677 | - curStar = 0 | 693 | + curStar = oldStar |
678 | end | 694 | end |
679 | - if curStar ~= bonusStar[id] then | 695 | + if curStar ~= oldStar then |
680 | bonusStar[id] = curStar | 696 | bonusStar[id] = curStar |
681 | role:updateProperty({field = "bonusStar", value = bonusStar}) | 697 | role:updateProperty({field = "bonusStar", value = bonusStar}) |
682 | end | 698 | end |
src/actions/HeroAction.lua
@@ -146,7 +146,9 @@ function _M.talentRpc(agent, data) | @@ -146,7 +146,9 @@ function _M.talentRpc(agent, data) | ||
146 | local talent = hero:getProperty("talent") | 146 | local talent = hero:getProperty("talent") |
147 | local heroCfgId = hero:getProperty("type") | 147 | local heroCfgId = hero:getProperty("type") |
148 | local curStage = talent:getv(0, 1) | 148 | local curStage = talent:getv(0, 1) |
149 | + local oldStage = curStage | ||
149 | local curLevel = talent:getv(1, 1) | 150 | local curLevel = talent:getv(1, 1) |
151 | + local oldLevel = curLevel | ||
150 | local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][curStage] | 152 | local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][curStage] |
151 | if not curData then return 1 end | 153 | if not curData then return 1 end |
152 | local oldSkillLv = hero:getSkillLevel(1) | 154 | local oldSkillLv = hero:getSkillLevel(1) |
@@ -174,13 +176,16 @@ function _M.talentRpc(agent, data) | @@ -174,13 +176,16 @@ function _M.talentRpc(agent, data) | ||
174 | 176 | ||
175 | hero:updateProperty({field = "talent", value = talent}) | 177 | hero:updateProperty({field = "talent", value = talent}) |
176 | 178 | ||
179 | + | ||
177 | role:log("hero_talent", { | 180 | role:log("hero_talent", { |
178 | hero_id = hero:getProperty("type"), --英雄ID | 181 | hero_id = hero:getProperty("type"), --英雄ID |
179 | - hero_talent_id = curStage, --天赋ID | ||
180 | - hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | ||
181 | - hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 | ||
182 | - hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 | 182 | + hero_talent_stagebef = oldStage, --英雄精进升级前停留阶段 |
183 | + hero_talent_stage = curStage, --英雄精进升级后停留阶段 | ||
184 | + hero_talent_cost = cost, --英雄精进升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,….} | ||
185 | + hero_talent_subid = curData[oldLevel].effect, --升级属性ID,生命、攻击、防御、命中、闪避分别对应(0,1,2,3,4) | ||
186 | + hero_talent_sublevel = curData[oldLevel].level, --升级属性等级,如生命升级从1到2,则记录2 | ||
183 | }) | 187 | }) |
188 | + | ||
184 | hero:mylog({desc = "talent", int1 = talent:getv(0, 1), int2 = talent:getv(1, 1)}) | 189 | hero:mylog({desc = "talent", int1 = talent:getv(0, 1), int2 = talent:getv(1, 1)}) |
185 | 190 | ||
186 | SendPacket(actionCodes.Hero_talentRpc, '') | 191 | SendPacket(actionCodes.Hero_talentRpc, '') |
@@ -447,7 +452,6 @@ function _M.referEquipsRpc(agent, data) | @@ -447,7 +452,6 @@ function _M.referEquipsRpc(agent, data) | ||
447 | end | 452 | end |
448 | end | 453 | end |
449 | 454 | ||
450 | - local oldAttr = hero:getTotalAttrs() | ||
451 | local oldBattleV = hero:getProperty("battleV") | 455 | local oldBattleV = hero:getProperty("battleV") |
452 | local wear = {} | 456 | local wear = {} |
453 | 457 | ||
@@ -477,16 +481,14 @@ function _M.referEquipsRpc(agent, data) | @@ -477,16 +481,14 @@ function _M.referEquipsRpc(agent, data) | ||
477 | -- 更新角色 | 481 | -- 更新角色 |
478 | hero:updateProperty({field = "equip", value = curEquip}) | 482 | hero:updateProperty({field = "equip", value = curEquip}) |
479 | 483 | ||
480 | - local curAttr = hero:getTotalAttrs() | ||
481 | - local attrChange = getChangeAttrJson(oldAttr, curAttr) | ||
482 | for typ, data in pairs(wear) do | 484 | for typ, data in pairs(wear) do |
483 | role:log("equip_wear", { | 485 | role:log("equip_wear", { |
484 | hero_id = hero:getProperty("type"), --英雄ID | 486 | hero_id = hero:getProperty("type"), --英雄ID |
485 | equip_id = data.id, --装备ID | 487 | equip_id = data.id, --装备ID |
486 | equip_wear_action = data.act, --装备操作类型:装备:0,卸载:1 | 488 | equip_wear_action = data.act, --装备操作类型:装备:0,卸载:1 |
487 | equip_wear_part = typ, --装备部位,记录部位ID | 489 | equip_wear_part = typ, --装备部位,记录部位ID |
488 | - equip_wear_result = curAttr, --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} | ||
489 | - equip_wear_change = attrChange, --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | 490 | + equip_wear_scorebef = oldBattleV, --装备前英雄评分 |
491 | + equip_wear_score = hero:getProperty("battleV"), --装备后英雄评分 | ||
490 | equip_wear_mode = isAuto and 0 or 1, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 | 492 | equip_wear_mode = isAuto and 0 or 1, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 |
491 | }) | 493 | }) |
492 | end | 494 | end |
@@ -712,6 +714,7 @@ end | @@ -712,6 +714,7 @@ end | ||
712 | function _M.drawHeroRpc(agent, data) | 714 | function _M.drawHeroRpc(agent, data) |
713 | local role = agent.role | 715 | local role = agent.role |
714 | local msg = MsgPack.unpack(data) | 716 | local msg = MsgPack.unpack(data) |
717 | + local actid = msg.actid | ||
715 | 718 | ||
716 | if not role:isFuncUnlock(FuncUnlock.GetHero) then return 1 end | 719 | if not role:isFuncUnlock(FuncUnlock.GetHero) then return 1 end |
717 | local btype = msg.pool -- 1 2 3 4 5 卡池类型 4新手卡池 5心愿卡池 | 720 | local btype = msg.pool -- 1 2 3 4 5 卡池类型 4新手卡池 5心愿卡池 |
@@ -721,14 +724,38 @@ function _M.drawHeroRpc(agent, data) | @@ -721,14 +724,38 @@ function _M.drawHeroRpc(agent, data) | ||
721 | subType = 1 | 724 | subType = 1 |
722 | if btype == 4 and role:getProperty("newerDraw") >= 10 then | 725 | if btype == 4 and role:getProperty("newerDraw") >= 10 then |
723 | subType = 2 | 726 | subType = 2 |
727 | + if(role:getProperty("newerDraw") >= 30) then | ||
728 | + return 30 | ||
729 | + end | ||
724 | end | 730 | end |
725 | end | 731 | end |
726 | 732 | ||
733 | + -- 另开活动卡池 | ||
734 | + if actid then | ||
735 | + if not role.activity:isOpenById(actid, "ActHeroPool") then return end | ||
736 | + local cfg = csvdb["activity_ctrlCsv"][actid] | ||
737 | + if not cfg then return end | ||
738 | + | ||
739 | + btype = cfg.condition | ||
740 | + end | ||
741 | + | ||
727 | if btype == 1 then | 742 | if btype == 1 then |
728 | -- 判断定向卡池活动开启 | 743 | -- 判断定向卡池活动开启 |
729 | if not role.activity:isOpen("RaceDraw") then | 744 | if not role.activity:isOpen("RaceDraw") then |
730 | return | 745 | return |
731 | end | 746 | end |
747 | + elseif btype == 2 then | ||
748 | + if role:getProperty("newerGuide") ~= "8=1" then | ||
749 | + -- 判断普通卡池 | ||
750 | + if role.activity:isOpen("WishHeroPool") then | ||
751 | + return | ||
752 | + end | ||
753 | + end | ||
754 | + elseif btype == 5 then | ||
755 | + -- 判断心愿单卡池 | ||
756 | + if not role.activity:isOpen("WishHeroPool") then | ||
757 | + return | ||
758 | + end | ||
732 | end | 759 | end |
733 | 760 | ||
734 | local buildTypeData = csvdb["build_typeCsv"][btype] | 761 | local buildTypeData = csvdb["build_typeCsv"][btype] |
@@ -737,7 +764,7 @@ function _M.drawHeroRpc(agent, data) | @@ -737,7 +764,7 @@ function _M.drawHeroRpc(agent, data) | ||
737 | local drawCount = {1, 10} -- 抽取次数 | 764 | local drawCount = {1, 10} -- 抽取次数 |
738 | if not drawCount[drawType] then return 3 end | 765 | if not drawCount[drawType] then return 3 end |
739 | 766 | ||
740 | - local draw_floor_back_counts = globalCsv.draw_floor_back_counts[btype] | 767 | + local draw_floor_back_counts = globalCsv.draw_floor_back_counts[btype] or 10 |
741 | local floorHeroCount = role:getProperty("floorHero")[btype] or 0 | 768 | local floorHeroCount = role:getProperty("floorHero")[btype] or 0 |
742 | 769 | ||
743 | -- 计算抽卡消耗品 | 770 | -- 计算抽卡消耗品 |
@@ -945,16 +972,21 @@ function _M.drawHeroRpc(agent, data) | @@ -945,16 +972,21 @@ function _M.drawHeroRpc(agent, data) | ||
945 | gacha_up = 0, -- 卡池UP角色 | 972 | gacha_up = 0, -- 卡池UP角色 |
946 | gacha_times = drawCount[drawType], -- 抽卡次数 | 973 | gacha_times = drawCount[drawType], -- 抽卡次数 |
947 | gacha_reward = logReward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 974 | gacha_reward = logReward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
948 | - currency = cost, -- 购买道具消耗的货币 | 975 | + gacha_cost = cost, -- 购买道具消耗的货币 |
949 | gacha_cnt = floorHeroCount, | 976 | gacha_cnt = floorHeroCount, |
950 | }) | 977 | }) |
951 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 | 978 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 |
952 | 979 | ||
953 | - if btype == 1 or btype == 2 then | 980 | + local feedbackId = buildTypeData["can_feedback"] or 0 |
981 | + if feedbackId ~= 0 then | ||
954 | -- 达到一定次数,给响应奖励 | 982 | -- 达到一定次数,给响应奖励 |
955 | local oldVal = role:getProperty("repayHero") or 0 | 983 | local oldVal = role:getProperty("repayHero") or 0 |
984 | + if actid then | ||
985 | + local actData = role.activity:getActData("ActHeroPool") | ||
986 | + oldVal = actData[btype] or 0 | ||
987 | + end | ||
956 | local newVal = oldVal + drawCount[drawType] | 988 | local newVal = oldVal + drawCount[drawType] |
957 | - local drawCardReward, val = role:getDrawCardExtraReward(oldVal, newVal) | 989 | + local drawCardReward, val = role:getDrawCardExtraReward(feedbackId, oldVal, newVal) |
958 | -- 空字符穿代表直接给英雄 走以前repayHeroRpc | 990 | -- 空字符穿代表直接给英雄 走以前repayHeroRpc |
959 | if drawCardReward == "" then | 991 | if drawCardReward == "" then |
960 | local repayHeroMaxCount = role:getProperty("repayMaxC") or 0 | 992 | local repayHeroMaxCount = role:getProperty("repayMaxC") or 0 |
@@ -964,11 +996,11 @@ function _M.drawHeroRpc(agent, data) | @@ -964,11 +996,11 @@ function _M.drawHeroRpc(agent, data) | ||
964 | local even = repayHeroMaxCount % 2 | 996 | local even = repayHeroMaxCount % 2 |
965 | local id = 0 | 997 | local id = 0 |
966 | if even == 1 then | 998 | if even == 1 then |
967 | - id = math.randWeight(csvdb["build_giftCsv"], "pool_1") | 999 | + id = math.randWeight(csvdb["build_giftCsv"], "pool_"..feedbackId) |
968 | else | 1000 | else |
969 | local giftHeroSet = {} | 1001 | local giftHeroSet = {} |
970 | for gid, cfg in pairs(csvdb["build_giftCsv"]) do | 1002 | for gid, cfg in pairs(csvdb["build_giftCsv"]) do |
971 | - if cfg["pool_1"] ~= 0 and not role:isHaveHero(gid - ItemStartId.Hero) then | 1003 | + if cfg["pool_"..feedbackId] ~= 0 and not role:isHaveHero(gid - ItemStartId.Hero) then |
972 | giftHeroSet[gid] = {1} | 1004 | giftHeroSet[gid] = {1} |
973 | end | 1005 | end |
974 | end | 1006 | end |
@@ -977,7 +1009,7 @@ function _M.drawHeroRpc(agent, data) | @@ -977,7 +1009,7 @@ function _M.drawHeroRpc(agent, data) | ||
977 | end | 1009 | end |
978 | end | 1010 | end |
979 | if id == 0 then | 1011 | if id == 0 then |
980 | - id = math.randWeight(csvdb["build_giftCsv"], "pool_1") | 1012 | + id = math.randWeight(csvdb["build_giftCsv"], "pool_"..feedbackId) |
981 | end | 1013 | end |
982 | 1014 | ||
983 | local r,change = {} | 1015 | local r,change = {} |
@@ -997,7 +1029,13 @@ function _M.drawHeroRpc(agent, data) | @@ -997,7 +1029,13 @@ function _M.drawHeroRpc(agent, data) | ||
997 | r, change = role:award(drawCardReward, {log = {desc = "drawHeroExtraReward", int1 = oldVal, int2 = newVal}}) | 1029 | r, change = role:award(drawCardReward, {log = {desc = "drawHeroExtraReward", int1 = oldVal, int2 = newVal}}) |
998 | SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack(role:packReward(r, change))) | 1030 | SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack(role:packReward(r, change))) |
999 | end | 1031 | end |
1000 | - role:updateProperty({field = "repayHero", value = val}) | 1032 | + if not actid then |
1033 | + role:updateProperty({field = "repayHero", value = val}) | ||
1034 | + else | ||
1035 | + local actData = role.activity:getActData("ActHeroPool") | ||
1036 | + actData[btype] = val | ||
1037 | + role.activity:updateActData("ActHeroPool", actData) | ||
1038 | + end | ||
1001 | end | 1039 | end |
1002 | return true | 1040 | return true |
1003 | end | 1041 | end |
src/actions/PvpAction.lua
@@ -135,7 +135,7 @@ local function getMatchInfo(role, pvpList, battleCache, dbKey, infoFuncName, inf | @@ -135,7 +135,7 @@ local function getMatchInfo(role, pvpList, battleCache, dbKey, infoFuncName, inf | ||
135 | if k == "battleInfo" then | 135 | if k == "battleInfo" then |
136 | battleCache[curInfo.roleId] = v | 136 | battleCache[curInfo.roleId] = v |
137 | else | 137 | else |
138 | - if (k == "heros" or k == "battleV") and infoCache then | 138 | + if (k == "team" or k == "battleV") and infoCache then |
139 | infoCache[curInfo.roleId] = infoCache[curInfo.roleId] or {} | 139 | infoCache[curInfo.roleId] = infoCache[curInfo.roleId] or {} |
140 | infoCache[curInfo.roleId][k] = v | 140 | infoCache[curInfo.roleId][k] = v |
141 | end | 141 | end |
@@ -705,12 +705,12 @@ function _M.endBattleHRpc(agent, data) | @@ -705,12 +705,12 @@ function _M.endBattleHRpc(agent, data) | ||
705 | info.winId = info.isWin and roleId or match.id | 705 | info.winId = info.isWin and roleId or match.id |
706 | info.isWin = nil | 706 | info.isWin = nil |
707 | selfTeam[_idx] = { | 707 | selfTeam[_idx] = { |
708 | - heros = role:getTeamHerosInfo(_pvpStartBattleCacheH.pvpTH[_idx].heros), | 708 | + team = role:getTeamHerosInfo(_pvpStartBattleCacheH.pvpTH[_idx]), |
709 | battleV = role:getTeamBattleValue(_pvpStartBattleCacheH.pvpTH[_idx].heros) | 709 | battleV = role:getTeamBattleValue(_pvpStartBattleCacheH.pvpTH[_idx].heros) |
710 | } | 710 | } |
711 | if match.t == 1 and _pvpStartBattleCacheH.enemyT then | 711 | if match.t == 1 and _pvpStartBattleCacheH.enemyT then |
712 | enemyTeam[_idx] = { | 712 | enemyTeam[_idx] = { |
713 | - heros = _pvpStartBattleCacheH.enemyT["heros"][_idx], | 713 | + team = _pvpStartBattleCacheH.enemyT["team"][_idx], |
714 | battleV = _pvpStartBattleCacheH.enemyT["battleV"][_idx] | 714 | battleV = _pvpStartBattleCacheH.enemyT["battleV"][_idx] |
715 | } | 715 | } |
716 | end | 716 | end |
src/actions/RadioAction.lua
@@ -158,7 +158,27 @@ function _M.finishQuestRpc(agent, data) | @@ -158,7 +158,27 @@ function _M.finishQuestRpc(agent, data) | ||
158 | msg["big"] = bigSuccess | 158 | msg["big"] = bigSuccess |
159 | msg["id"] = id | 159 | msg["id"] = id |
160 | msg["heroFaith"] = heroFaithMap | 160 | msg["heroFaith"] = heroFaithMap |
161 | - SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg)) | 161 | + SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg)) |
162 | + | ||
163 | + | ||
164 | + local herolist = {} | ||
165 | + for _, heroId in ipairs(task.heros) do | ||
166 | + local hero = role.heros[heroId] | ||
167 | + if hero then | ||
168 | + table.insert(herolist, hero:getProperty("type")) | ||
169 | + end | ||
170 | + end | ||
171 | + | ||
172 | + -- 讨伐行动 | ||
173 | + role:log("punitive_action", { | ||
174 | + mission_id = id, --关卡ID | ||
175 | + mission_herolist = herolist, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] | ||
176 | + mission_success_rate = totalCoef, -- 大成功几率 | ||
177 | + mission_reward = r, -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} | ||
178 | + mission_result = 1, -- 战斗结果(0-无效,1-胜利,2-失败) | ||
179 | + mission_roundtime = config.time, -- 完成耗时(秒) | ||
180 | + }) | ||
181 | + | ||
162 | return true | 182 | return true |
163 | end | 183 | end |
164 | 184 |
src/actions/RoleAction.lua
@@ -300,6 +300,7 @@ function _M.loginRpc( agent, data ) | @@ -300,6 +300,7 @@ function _M.loginRpc( agent, data ) | ||
300 | if msg.newdevice then | 300 | if msg.newdevice then |
301 | role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) | 301 | role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) |
302 | end | 302 | end |
303 | + | ||
303 | return true | 304 | return true |
304 | end | 305 | end |
305 | 306 | ||
@@ -372,6 +373,34 @@ function _M.createRpc(agent, data) | @@ -372,6 +373,34 @@ function _M.createRpc(agent, data) | ||
372 | end | 373 | end |
373 | 374 | ||
374 | SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) | 375 | SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) |
376 | + | ||
377 | + -- cb付费返利 | ||
378 | + skynet.timeout(0, function() | ||
379 | + local cbbackd = cluster.query("center", "cbbackd") | ||
380 | + local uid = newRole:getProperty("uid") | ||
381 | + local start = uid:find("_") | ||
382 | + if start then | ||
383 | + uid = uid:sub(start + 1) | ||
384 | + end | ||
385 | + if cbbackd then | ||
386 | + local status, back = pcall(cluster.call, "center", cbbackd, "getCbBack", {uid = uid, id = roleId}) | ||
387 | + if status then | ||
388 | + if back and next(back) then | ||
389 | + local reward = "" | ||
390 | + for itemId, count in pairs(back) do | ||
391 | + reward = reward:setv(itemId, count) | ||
392 | + end | ||
393 | + redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward, createtime = skynet.timex(), attachments = reward}) | ||
394 | + newRole:mylog("cbback", {key1 = uid, int2 = roleId}) | ||
395 | + end | ||
396 | + else | ||
397 | + skynet.error("[ERROR] cbbackd cant call center uid: " .. uid .. " roleId:" .. roleId) | ||
398 | + end | ||
399 | + else | ||
400 | + skynet.error("[ERROR] cbbackd cant call center uid: " .. uid .. " roleId:" .. roleId) | ||
401 | + end | ||
402 | + end) | ||
403 | + | ||
375 | return true | 404 | return true |
376 | end | 405 | end |
377 | 406 | ||
@@ -537,82 +566,131 @@ function _M.openTimeBoxRpc(agent, data) | @@ -537,82 +566,131 @@ function _M.openTimeBoxRpc(agent, data) | ||
537 | local slot = msg.slot -- 位置 1 - 6 | 566 | local slot = msg.slot -- 位置 1 - 6 |
538 | 567 | ||
539 | -- 特权卡时间箱额外栏位 | 568 | -- 特权卡时间箱额外栏位 |
540 | - local privExtraCnt = role.storeData:getTimeBoxSlotExtraCount() | ||
541 | - if oper == 1 then | ||
542 | - if math.illegalNum(slot, 1, role:getFuncLv(FuncOpenType.TimeBoxSlot) + privExtraCnt) then return end | ||
543 | - end | 569 | + -- local privExtraCnt = role.storeData:getTimeBoxSlotExtraCount() |
570 | + -- if oper == 1 then | ||
571 | + -- if math.illegalNum(slot, 1, role:getFuncLv(FuncOpenType.TimeBoxSlot) + privExtraCnt) then return end | ||
572 | + -- end | ||
544 | 573 | ||
545 | local boxL = role:getProperty("boxL") | 574 | local boxL = role:getProperty("boxL") |
546 | - local reward, change = {} | ||
547 | - if oper == 1 then -- 打开 | 575 | + local reward, change |
576 | + if oper == 1 then -- 构建开始(包括切换构建的id) | ||
548 | local itemId = msg.itemId | 577 | local itemId = msg.itemId |
549 | - if role:getItemCount(itemId) < 1 then return end | ||
550 | local itemData = csvdb["itemCsv"][itemId] | 578 | local itemData = csvdb["itemCsv"][itemId] |
551 | - local randomData = csvdb["item_randomCsv"][itemId] | ||
552 | - if not itemData or not randomData or randomData.openTime <= 0 then return end | ||
553 | - | ||
554 | - if boxL[slot] then return end | ||
555 | - role:costItems({[itemId] = 1}, {log = {desc = "openTimeBox"}}) | ||
556 | - boxL[slot] = {id = itemId, time = skynet.timex() + randomData.openTime} | ||
557 | - role:pushMsg({type = "box", slot = slot, time = randomData.openTime}) | ||
558 | - elseif oper == 2 then -- 领取 | 579 | + if not itemData then return 1 end |
580 | + if not boxL[slot] then | ||
581 | + boxL[slot] = {} | ||
582 | + else | ||
583 | + local oldId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time | ||
584 | + local unitTime = globalCsv.box_key_time[oldId] * 60 | ||
585 | + local doneCnt = math.floor((process + skynet.timex() - time) / unitTime) | ||
586 | + if doneCnt > 0 then | ||
587 | + reward = role:award({[oldId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot}}) | ||
588 | + end | ||
589 | + end | ||
590 | + local limit = globalCsv.box_key_max[itemId] or 5 | ||
591 | + if role:getItemCount(itemId) >= limit then return 3 end | ||
592 | + | ||
593 | + boxL[slot] = {id = itemId, process = 0, time = skynet.timex()} | ||
594 | + role:pushMsg({type = "box", slot = slot, time = skynet.timex() + globalCsv.box_productLine_time * 3600}) | ||
595 | + elseif oper == 2 then -- 重置运行时间(可以使用加速) | ||
559 | local quick = msg.quick | 596 | local quick = msg.quick |
560 | - if not boxL[slot] then return end | ||
561 | - local costKey = 0 | ||
562 | - if boxL[slot].time > skynet.timex() then -- 没开完 | ||
563 | - if not quick then return end | 597 | + if not boxL[slot] then return 4 end |
598 | + | ||
599 | + local itemId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time | ||
600 | + local nowTime = skynet.timex() | ||
601 | + local stopTime = nowTime | ||
602 | + local itemData = csvdb["itemCsv"][itemId] | ||
603 | + local unitTime = globalCsv.box_key_time[itemId] * 60 | ||
604 | + if quick then | ||
605 | + stopTime = time + globalCsv.box_productLine_time * 3600 | ||
564 | local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") | 606 | local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") |
565 | - costKey = math.ceil((boxL[slot].time - skynet.timex()) / (cost_pre[1] * 60)) * cost_pre[2] | ||
566 | - if not role:checkItemEnough({[ItemId.BoxKey] = costKey}) then return end | ||
567 | - role:costItems({[ItemId.BoxKey] = costKey}, {log = {desc = "openTimeBox"}}) | ||
568 | - role:pushCancel({type = "box", slot = slot}) | 607 | + local costKey = math.ceil((stopTime - nowTime) / (cost_pre[1] * 60)) * cost_pre[2] |
608 | + if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end | ||
609 | + role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot}}) | ||
610 | + else | ||
611 | + stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600) | ||
612 | + end | ||
613 | + role:pushCancel({type = "box", slot = slot}) | ||
614 | + | ||
615 | + local doneCnt = math.floor((process + stopTime - time) / unitTime) | ||
616 | + if doneCnt > 0 then | ||
617 | + reward = role:award({[itemId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot}}) | ||
618 | + end | ||
619 | + if role:getItemCount(itemId) >= globalCsv.box_key_max[itemId] then | ||
620 | + nowTime = 0 | ||
621 | + end | ||
622 | + | ||
623 | + boxL[slot] = {id = itemId, process = (process + stopTime - time) % unitTime, time = nowTime} | ||
624 | + role:pushMsg({type = "box", slot = slot, time = nowTime + globalCsv.box_productLine_time * 3600}) | ||
625 | + elseif oper == 3 then -- 开箱子 | ||
626 | + local costId = msg.costId | ||
627 | + local costs = (msg.costs or ""):toNumMap() | ||
628 | + if not costId or not csvdb["itemCsv"][costId] or not next(costs) then return 6 end | ||
629 | + | ||
630 | + local costIdData = csvdb["itemCsv"][costId] | ||
631 | + local count = 0 | ||
632 | + for itemId, num in pairs(costs) do | ||
633 | + local itemIdData = csvdb["itemCsv"][itemId] | ||
634 | + if not itemIdData or not csvdb["item_randomCsv"][itemId] or costIdData.quality ~= itemIdData.quality then return 7 end | ||
635 | + count = count + num | ||
569 | end | 636 | end |
570 | - local boxId = boxL[slot].id | ||
571 | - local itemData = csvdb["itemCsv"][boxId] | ||
572 | - local randomData = csvdb["item_randomCsv"][itemData.id] | ||
573 | - local costTime = skynet.timex() - (boxL[slot].time - randomData.openTime) | ||
574 | - -- 随机奖励 | 637 | + |
638 | + if role:getItemCount(costId) < count then return 8 end | ||
639 | + | ||
640 | + role:costItems({[costId] = count}, {log = {desc = "openTimeBox"}}) | ||
641 | + | ||
575 | reward = {} | 642 | reward = {} |
576 | - for i = 1, 10 do | ||
577 | - local num = randomData["num" .. i] | ||
578 | - local gift = randomData["gift" .. i] | ||
579 | - if num and gift and num > 0 and gift ~= "" then | ||
580 | - local pool = {} | ||
581 | - for _, temp in ipairs(gift:toArray()) do | ||
582 | - local set = temp:toArray(true, "=") | ||
583 | - table.insert(pool, set) | 643 | + for itemId, value in pairs(costs) do |
644 | + local tempReward = {} | ||
645 | + local randomData = csvdb["item_randomCsv"][itemId] | ||
646 | + local itemData = csvdb["itemCsv"][itemId] | ||
647 | + role:costItems({[itemId] = value}, {log = {desc = "openTimeBox"}}) | ||
648 | + for _ = 1, value do | ||
649 | + for i = 1, 10 do | ||
650 | + local num = randomData["num" .. i] | ||
651 | + local gift = randomData["gift" .. i] | ||
652 | + if num and gift and num > 0 and gift ~= "" then | ||
653 | + local pool = {} | ||
654 | + for _, temp in ipairs(gift:toArray()) do | ||
655 | + local set = temp:toArray(true, "=") | ||
656 | + table.insert(pool, set) | ||
657 | + end | ||
658 | + | ||
659 | + local needCount = math.min(#pool, num) | ||
660 | + for j = 1, needCount do | ||
661 | + local idx = math.randWeight(pool, 3) | ||
662 | + tempReward[pool[idx][1]] = (tempReward[pool[idx][1]] or 0) + pool[idx][2] | ||
663 | + table.remove(pool, idx) | ||
664 | + end | ||
665 | + end | ||
584 | end | 666 | end |
667 | + end | ||
668 | + tempReward[0] = nil | ||
669 | + role:checkTaskEnter("OpenBox", {id = itemId, count=value, quality=itemData.quality}) | ||
670 | + role:log("carriage_dismantle", { | ||
671 | + item_id = itemId, -- 道具id | ||
672 | + item_type = itemData.type, -- 道具类型,具体见枚举表中道具类型枚举表 | ||
673 | + item_level = 0, -- 道具等级 | ||
674 | + item_number = 1, -- 道具变化数量的绝对值 | ||
675 | + carriage_dismantle_type = 1, -- 拆解方式,时间到期:0,钥匙开启:1 | ||
676 | + carriage_dismantle_time = 0, -- 拆解耗时,填写实际耗时 | ||
677 | + carriage_dismantle_cost = value, -- 拆解花费钥匙数量,未使用填写0 | ||
678 | + carriage_dismantle_rwd = tempReward, -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} | ||
679 | + }) | ||
585 | 680 | ||
586 | - local needCount = math.min(#pool, num) | ||
587 | - for j = 1, needCount do | ||
588 | - local idx = math.randWeight(pool, 3) | ||
589 | - reward[pool[idx][1]] = (reward[pool[idx][1]] or 0) + pool[idx][2] | ||
590 | - table.remove(pool, idx) | ||
591 | - end | 681 | + for id, num in pairs(tempReward) do |
682 | + reward[id] = (reward[id] or 0) + num | ||
592 | end | 683 | end |
593 | end | 684 | end |
594 | - reward[0] = nil | ||
595 | - | ||
596 | - boxL[slot] = nil | ||
597 | - reward, change = role:award(reward, {log = {desc = "openTimeBox", int1 = boxId}}) | ||
598 | - role:checkTaskEnter("OpenBox", {id = boxId, count=1, quality=itemData.quality}) | ||
599 | - | ||
600 | - role:log("carriage_dismantle", { | ||
601 | - item_id = boxId, -- 道具id | ||
602 | - item_type = itemData.type, -- 道具类型,具体见枚举表中道具类型枚举表 | ||
603 | - item_level = 0, -- 道具等级 | ||
604 | - item_number = 1, -- 道具变化数量的绝对值 | ||
605 | - carriage_dismantle_type = quick and 1 or 0, -- 拆解方式,时间到期:0,钥匙开启:1 | ||
606 | - carriage_dismantle_time = costTime, -- 拆解耗时,填写实际耗时 | ||
607 | - carriage_dismantle_cost = costKey, -- 拆解花费钥匙数量,未使用填写0 | ||
608 | - carriage_dismantle_rwd = reward, -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} | ||
609 | - }) | 685 | + reward, change = role:award(reward, {log = {desc = "openTimeBox", int1 = costId}}) |
610 | else | 686 | else |
611 | return | 687 | return |
612 | end | 688 | end |
613 | 689 | ||
614 | - role:setProperty("boxL") --刷新 | ||
615 | - role:changeUpdates({{type = "boxL", field = slot, value = boxL[slot], isOnlyToC = true}}) -- 通知客户端 | 690 | + role:setProperty("boxL",boxL) --刷新 |
691 | + if slot then | ||
692 | + role:changeUpdates({{type = "boxL", field = slot, value = boxL[slot], isOnlyToC = true}}) -- 通知客户端 | ||
693 | + end | ||
616 | SendPacket(actionCodes.Role_openTimeBoxRpc, MsgPack.pack(role:packReward(reward, change))) | 694 | SendPacket(actionCodes.Role_openTimeBoxRpc, MsgPack.pack(role:packReward(reward, change))) |
617 | return true | 695 | return true |
618 | end | 696 | end |
@@ -724,11 +802,12 @@ function _M.unLockStoryBookRpc(agent, data) | @@ -724,11 +802,12 @@ function _M.unLockStoryBookRpc(agent, data) | ||
724 | local storyStatus = role:getProperty("storyB") | 802 | local storyStatus = role:getProperty("storyB") |
725 | if storyStatus[storyId] and storyStatus[storyId].s then return end --不需要解锁 | 803 | if storyStatus[storyId] and storyStatus[storyId].s then return end --不需要解锁 |
726 | 804 | ||
727 | - local cost = storyBookData.lockItem:toNumMap() | ||
728 | - if not cost or not next(cost) then return end | ||
729 | - if not role:checkItemEnough(cost) then return end -- 消耗品不足 | ||
730 | - | ||
731 | - role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) | 805 | + if storyBookData.lockItem ~= "free" then |
806 | + local cost = storyBookData.lockItem:toNumMap() | ||
807 | + if not cost or not next(cost) then return end | ||
808 | + if not role:checkItemEnough(cost) then return end -- 消耗品不足 | ||
809 | + role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) | ||
810 | + end | ||
732 | 811 | ||
733 | -- 解锁 | 812 | -- 解锁 |
734 | storyStatus[storyId] = storyStatus[storyId] or {} | 813 | storyStatus[storyId] = storyStatus[storyId] or {} |
@@ -807,6 +886,12 @@ function _M.taskActiveRpc(agent, data) | @@ -807,6 +886,12 @@ function _M.taskActiveRpc(agent, data) | ||
807 | { type = roleField[taskType], field = {"at", taskId}, value = -1 } | 886 | { type = roleField[taskType], field = {"at", taskId}, value = -1 } |
808 | }) | 887 | }) |
809 | 888 | ||
889 | + role:log("task_reward", { | ||
890 | + task_reward_id = taskId * 100 + taskType, --任务奖励ID | ||
891 | + task_reward_type = 3, --任务奖励类型,见 任务奖励类型枚举表 | ||
892 | + task_reward_detail = reward, --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | ||
893 | + }) | ||
894 | + | ||
810 | SendPacket(actionCodes.Role_taskActiveRpc, MsgPack.pack(role:packReward(reward, change))) | 895 | SendPacket(actionCodes.Role_taskActiveRpc, MsgPack.pack(role:packReward(reward, change))) |
811 | return true | 896 | return true |
812 | end | 897 | end |
src/actions/StoreAction.lua
@@ -14,6 +14,9 @@ function _M.rechargeRpc(agent , data) | @@ -14,6 +14,9 @@ function _M.rechargeRpc(agent , data) | ||
14 | 14 | ||
15 | --创建订单号 | 15 | --创建订单号 |
16 | local partnerOrderId = role:getPurchaseOrder(id) | 16 | local partnerOrderId = role:getPurchaseOrder(id) |
17 | + if partnerOrderId == "" then | ||
18 | + return 1 | ||
19 | + end | ||
17 | SendPacket(actionCodes.Store_rechargeRpc, MsgPack.pack({ order = partnerOrderId })) | 20 | SendPacket(actionCodes.Store_rechargeRpc, MsgPack.pack({ order = partnerOrderId })) |
18 | 21 | ||
19 | -- 测试的 直接发奖励了 | 22 | -- 测试的 直接发奖励了 |
src/adv/Adv.lua
@@ -149,25 +149,15 @@ function Adv:initByChapter(params) | @@ -149,25 +149,15 @@ function Adv:initByChapter(params) | ||
149 | self.maps = {} | 149 | self.maps = {} |
150 | self.maps[1] = AdvMap.new(self, 1, mapId, isEnter, isNewRelay) | 150 | self.maps[1] = AdvMap.new(self, 1, mapId, isEnter, isNewRelay) |
151 | 151 | ||
152 | - self:initBattle(nil) | 152 | + self:initBattle(nil, isToNext) |
153 | 153 | ||
154 | self:initLayerTask() | 154 | self:initLayerTask() |
155 | 155 | ||
156 | - -- 支援效果生效一些 | ||
157 | - self:activeSomeSupport() | 156 | + |
158 | 157 | ||
159 | self:checkTask(Adv.TaskType.Arrive) | 158 | self:checkTask(Adv.TaskType.Arrive) |
160 | self:checkAdvUnlock(1, self.level) | 159 | self:checkAdvUnlock(1, self.level) |
161 | 160 | ||
162 | - if isToNext then | ||
163 | - self.battle.player:afterLayer() -- 玩家的buff 清理一下 | ||
164 | - end | ||
165 | - | ||
166 | - -- 不是中继层 加上 层 和 地图的buff和被动 | ||
167 | - if not self.isRelay then | ||
168 | - self.battle:initMapEffect() | ||
169 | - end | ||
170 | - | ||
171 | -- 中继进入奖励 | 161 | -- 中继进入奖励 |
172 | if relayData and isEnter then | 162 | if relayData and isEnter then |
173 | self:awardRelay(relayData, notNotify) | 163 | self:awardRelay(relayData, notNotify) |
@@ -456,8 +446,20 @@ function Adv:clearAdvUnlockCache() | @@ -456,8 +446,20 @@ function Adv:clearAdvUnlockCache() | ||
456 | self.cacheUnlock = {} | 446 | self.cacheUnlock = {} |
457 | end | 447 | end |
458 | 448 | ||
459 | -function Adv:initBattle(info) | 449 | +function Adv:initBattle(info, isToNext) |
460 | self.battle = require("adv.AdvBattle").new(self) | 450 | self.battle = require("adv.AdvBattle").new(self) |
451 | + -- 支援效果生效一些 | ||
452 | + self:activeSomeSupport() | ||
453 | + | ||
454 | + -- 不是中继层 加上 层 和 地图的buff和被动 | ||
455 | + if not self.isRelay then | ||
456 | + self.battle:initMapEffect() | ||
457 | + end | ||
458 | + | ||
459 | + if isToNext then | ||
460 | + self.battle.player:afterLayer() -- 玩家的buff 清理一下 | ||
461 | + end | ||
462 | + | ||
461 | for _, passiveC in ipairs(self.cachePassiveEvent or {}) do | 463 | for _, passiveC in ipairs(self.cachePassiveEvent or {}) do |
462 | self.battle:triggerPassive(passiveC[1], passiveC[2]) | 464 | self.battle:triggerPassive(passiveC[1], passiveC[2]) |
463 | end | 465 | end |
@@ -468,7 +470,7 @@ function Adv:initBattle(info) | @@ -468,7 +470,7 @@ function Adv:initBattle(info) | ||
468 | map:initBattleAfter() | 470 | map:initBattleAfter() |
469 | end | 471 | end |
470 | --下层 | 472 | --下层 |
471 | - if not info and self.level ~= 1 then | 473 | + if not info and isToNext then |
472 | self.battle.player:attrChangeCondBuffCheck(1) | 474 | self.battle.player:attrChangeCondBuffCheck(1) |
473 | end | 475 | end |
474 | 476 | ||
@@ -820,7 +822,7 @@ function Adv:over(success, rewardRatio, overType) | @@ -820,7 +822,7 @@ function Adv:over(success, rewardRatio, overType) | ||
820 | lv = self.owner:getProperty("level"), | 822 | lv = self.owner:getProperty("level"), |
821 | batteV = self.owner:getTeamBattleValue(team.heros), | 823 | batteV = self.owner:getTeamBattleValue(team.heros), |
822 | chapter = self.chapterId, | 824 | chapter = self.chapterId, |
823 | - format = self.owner:getTeamHerosInfo(team.heros), | 825 | + format = self.owner:getTeamHerosInfo(team).heros, |
824 | } | 826 | } |
825 | redisproxy:pipelining(function (red) | 827 | redisproxy:pipelining(function (red) |
826 | red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 | 828 | red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 |
@@ -1094,10 +1096,10 @@ local function clickOut(self, room, block, params, isExit) | @@ -1094,10 +1096,10 @@ local function clickOut(self, room, block, params, isExit) | ||
1094 | end | 1096 | end |
1095 | 1097 | ||
1096 | if #self.mapStack > 1 then -- 处于夹层中 | 1098 | if #self.mapStack > 1 then -- 处于夹层中 |
1099 | + self:backLayer(-1) | ||
1097 | local oldMapIdx = self:getCurMapIdx() | 1100 | local oldMapIdx = self:getCurMapIdx() |
1098 | table.remove(self.mapStack) --退出夹层 | 1101 | table.remove(self.mapStack) --退出夹层 |
1099 | self.battle:iLayerChange(oldMapIdx) | 1102 | self.battle:iLayerChange(oldMapIdx) |
1100 | - self:backLayer(-1) | ||
1101 | else --处于底层 | 1103 | else --处于底层 |
1102 | 1104 | ||
1103 | local advPass = self.owner:getProperty("advPass") | 1105 | local advPass = self.owner:getProperty("advPass") |
@@ -1129,8 +1131,8 @@ local function clickOut(self, room, block, params, isExit) | @@ -1129,8 +1131,8 @@ local function clickOut(self, room, block, params, isExit) | ||
1129 | if curFloorData then | 1131 | if curFloorData then |
1130 | self:award({[ItemId.AdvPoint] = curFloorData.exp}, {log = {desc = "passReward", int1 = self.chapterId, int2 = self.level}}, {}) | 1132 | self:award({[ItemId.AdvPoint] = curFloorData.exp}, {log = {desc = "passReward", int1 = self.chapterId, int2 = self.level}}, {}) |
1131 | end | 1133 | end |
1134 | + self:backNext() --下一关 | ||
1132 | local isHaveRelay = self:isHaveRelay(self.level) | 1135 | local isHaveRelay = self:isHaveRelay(self.level) |
1133 | - | ||
1134 | if isHaveRelay and not self.isRelay then | 1136 | if isHaveRelay and not self.isRelay then |
1135 | self:initByChapter({ | 1137 | self:initByChapter({ |
1136 | chapterId = self.chapterId, | 1138 | chapterId = self.chapterId, |
@@ -1148,7 +1150,6 @@ local function clickOut(self, room, block, params, isExit) | @@ -1148,7 +1150,6 @@ local function clickOut(self, room, block, params, isExit) | ||
1148 | notNotify = true, | 1150 | notNotify = true, |
1149 | }) | 1151 | }) |
1150 | end | 1152 | end |
1151 | - self:backNext() --下一关 | ||
1152 | end | 1153 | end |
1153 | 1154 | ||
1154 | end | 1155 | end |
@@ -1554,6 +1555,7 @@ local function clickBuild(self, room, block, params) | @@ -1554,6 +1555,7 @@ local function clickBuild(self, room, block, params) | ||
1554 | end | 1555 | end |
1555 | advMine[2].co = mineCo2 | 1556 | advMine[2].co = mineCo2 |
1556 | self.owner:setProperty("advMine", advMine) | 1557 | self.owner:setProperty("advMine", advMine) |
1558 | + self.owner:checkTaskEnter("AdvMineLayer") | ||
1557 | end | 1559 | end |
1558 | 1560 | ||
1559 | self:checkTask(Adv.TaskType.Build, 1, oldId) | 1561 | self:checkTask(Adv.TaskType.Build, 1, oldId) |
@@ -1604,6 +1606,7 @@ end | @@ -1604,6 +1606,7 @@ end | ||
1604 | 1606 | ||
1605 | local function clickLayer(self, room, block, params) | 1607 | local function clickLayer(self, room, block, params) |
1606 | local oldMapIdx = self:getCurMapIdx() | 1608 | local oldMapIdx = self:getCurMapIdx() |
1609 | + self:backLayer(1) | ||
1607 | if block.event.mapIdx then | 1610 | if block.event.mapIdx then |
1608 | table.insert(self.mapStack, block.event.mapIdx) --进入夹层 | 1611 | table.insert(self.mapStack, block.event.mapIdx) --进入夹层 |
1609 | else | 1612 | else |
@@ -1620,7 +1623,6 @@ local function clickLayer(self, room, block, params) | @@ -1620,7 +1623,6 @@ local function clickLayer(self, room, block, params) | ||
1620 | self:checkAchievement(Adv.AchievType.EnterILayer, 1, mapId) | 1623 | self:checkAchievement(Adv.AchievType.EnterILayer, 1, mapId) |
1621 | end | 1624 | end |
1622 | self.battle:iLayerChange(oldMapIdx) | 1625 | self.battle:iLayerChange(oldMapIdx) |
1623 | - self:backLayer(1) | ||
1624 | return true | 1626 | return true |
1625 | end | 1627 | end |
1626 | 1628 | ||
@@ -2051,6 +2053,7 @@ function Adv:enemyDead(enemy, escape) | @@ -2051,6 +2053,7 @@ function Adv:enemyDead(enemy, escape) | ||
2051 | advMine[2].co = mineCo2 | 2053 | advMine[2].co = mineCo2 |
2052 | advMine[2].ch = mineCh | 2054 | advMine[2].ch = mineCh |
2053 | self.owner:setProperty("advMine", advMine) | 2055 | self.owner:setProperty("advMine", advMine) |
2056 | + self.owner:checkTaskEnter("AdvMineKill") | ||
2054 | else | 2057 | else |
2055 | local toClick = enemy:hadBuff(Buff.CHANGE_DROP_TO_CLICK) | 2058 | local toClick = enemy:hadBuff(Buff.CHANGE_DROP_TO_CLICK) |
2056 | if toClick then | 2059 | if toClick then |
src/adv/AdvBuff.lua
@@ -35,7 +35,7 @@ Buff.Buff_NO_PASSIVE_MONSTER = 31 -- 地图被动刷新不出来怪物 | @@ -35,7 +35,7 @@ Buff.Buff_NO_PASSIVE_MONSTER = 31 -- 地图被动刷新不出来怪物 | ||
35 | Buff.SNEAK = 32 --潜行 | 35 | Buff.SNEAK = 32 --潜行 |
36 | Buff.DROP_BUFF_BY_ENEMY = 33 -- 怪物掉落加成 -- 怪物使用 | 36 | Buff.DROP_BUFF_BY_ENEMY = 33 -- 怪物掉落加成 -- 怪物使用 |
37 | Buff.GET_PASSIVE = 34 -- 获得 passive -- 结束失效 | 37 | Buff.GET_PASSIVE = 34 -- 获得 passive -- 结束失效 |
38 | -Buff.OBSTACLE_CHANGE = 35 -- 看守类型改变 -- 怪物使用 0 - 1 | 38 | +Buff.OBSTACLE_CHANGE = 35 -- 看守类型改变 -- 怪物使用 2 - 1 |
39 | Buff.DISABLE_AURA = 36 -- 禁用光环 | 39 | Buff.DISABLE_AURA = 36 -- 禁用光环 |
40 | Buff.GET_AURA = 37 -- 获得光环 | 40 | Buff.GET_AURA = 37 -- 获得光环 |
41 | 41 |
src/adv/AdvPassive.lua
@@ -9,6 +9,7 @@ Filter.BUFF_BY_ID = 6 -- 指定id的buff | @@ -9,6 +9,7 @@ Filter.BUFF_BY_ID = 6 -- 指定id的buff | ||
9 | Filter.CAMP = 7 -- 玩家是指定阵营 | 9 | Filter.CAMP = 7 -- 玩家是指定阵营 |
10 | Filter.RANGE = 8 -- 筛选范围 (触发是地块) | 10 | Filter.RANGE = 8 -- 筛选范围 (触发是地块) |
11 | Filter.CLASSIFY = 9 -- 标签 | 11 | Filter.CLASSIFY = 9 -- 标签 |
12 | +Filter.NO_BUFF_BY_ID = 10 -- 没有指定id的buff | ||
12 | 13 | ||
13 | local FilterFactory = {} | 14 | local FilterFactory = {} |
14 | FilterFactory[Filter.HP_UP_WITH_EQUAL] = function (_Filter) | 15 | FilterFactory[Filter.HP_UP_WITH_EQUAL] = function (_Filter) |
@@ -47,7 +48,6 @@ FilterFactory[Filter.CAMP] = function (_Filter) | @@ -47,7 +48,6 @@ FilterFactory[Filter.CAMP] = function (_Filter) | ||
47 | return role:getHerosCamp(role:getProperty("advTeam").heros) == self.value | 48 | return role:getHerosCamp(role:getProperty("advTeam").heros) == self.value |
48 | end | 49 | end |
49 | end | 50 | end |
50 | - | ||
51 | FilterFactory[Filter.RANGE] = function (_Filter) | 51 | FilterFactory[Filter.RANGE] = function (_Filter) |
52 | _Filter._execute = function (self, target, params) | 52 | _Filter._execute = function (self, target, params) |
53 | if params and self.owner.blockId and self.owner.roomId and params.blockId and params.roomId then | 53 | if params and self.owner.blockId and self.owner.roomId and params.blockId and params.roomId then |
@@ -57,13 +57,18 @@ FilterFactory[Filter.RANGE] = function (_Filter) | @@ -57,13 +57,18 @@ FilterFactory[Filter.RANGE] = function (_Filter) | ||
57 | return false | 57 | return false |
58 | end | 58 | end |
59 | end | 59 | end |
60 | - | ||
61 | FilterFactory[Filter.CLASSIFY] = function (_Filter) | 60 | FilterFactory[Filter.CLASSIFY] = function (_Filter) |
62 | _Filter._execute = function (self, target) | 61 | _Filter._execute = function (self, target) |
63 | return target.isClassify and target:isClassify(self.value) | 62 | return target.isClassify and target:isClassify(self.value) |
64 | end | 63 | end |
65 | end | 64 | end |
66 | 65 | ||
66 | +FilterFactory[Filter.NO_BUFF_BY_ID] = function (_Filter) | ||
67 | + _Filter._execute = function (self, target) | ||
68 | + return not target:hadBuffById(self.value) | ||
69 | + end | ||
70 | +end | ||
71 | + | ||
67 | function Filter:ctor(params) | 72 | function Filter:ctor(params) |
68 | self.owner = params.owner | 73 | self.owner = params.owner |
69 | self.skill = params.skill | 74 | self.skill = params.skill |
@@ -87,6 +92,9 @@ function Filter:getTarget(params) | @@ -87,6 +92,9 @@ function Filter:getTarget(params) | ||
87 | if self.oType == 2 and params.releaser then | 92 | if self.oType == 2 and params.releaser then |
88 | target = params.releaser | 93 | target = params.releaser |
89 | end | 94 | end |
95 | + if self.oType == 3 then | ||
96 | + target = self.owner.battle.player | ||
97 | + end | ||
90 | return target | 98 | return target |
91 | end | 99 | end |
92 | 100 |
src/adv/AdvPlayer.lua
@@ -662,7 +662,7 @@ end | @@ -662,7 +662,7 @@ end | ||
662 | 662 | ||
663 | function Enemy:getObstacle() | 663 | function Enemy:getObstacle() |
664 | local obstacle = csvdb["event_monsterCsv"][self.monsterId].obstacle | 664 | local obstacle = csvdb["event_monsterCsv"][self.monsterId].obstacle |
665 | - if obstacle == 0 and self:hadBuff(Buff.OBSTACLE_CHANGE) then | 665 | + if obstacle == 2 and self:hadBuff(Buff.OBSTACLE_CHANGE) then |
666 | obstacle = 1 | 666 | obstacle = 1 |
667 | end | 667 | end |
668 | return obstacle | 668 | return obstacle |
src/agent.lua
@@ -15,6 +15,7 @@ redisproxy = require "shared.redisproxy" | @@ -15,6 +15,7 @@ redisproxy = require "shared.redisproxy" | ||
15 | datacenter = require "skynet.datacenter" | 15 | datacenter = require "skynet.datacenter" |
16 | mcast_util = require "services/mcast_util" | 16 | mcast_util = require "services/mcast_util" |
17 | csvdb = require "shared.csvdata" | 17 | csvdb = require "shared.csvdata" |
18 | +cluster = require "skynet.cluster" | ||
18 | 19 | ||
19 | local CMD = {} | 20 | local CMD = {} |
20 | local agentInfo = {} -- { client_fd, role, gate_serv, open_timer} | 21 | local agentInfo = {} -- { client_fd, role, gate_serv, open_timer} |
src/main.lua
@@ -23,7 +23,7 @@ skynet.start(function() | @@ -23,7 +23,7 @@ skynet.start(function() | ||
23 | 23 | ||
24 | --启动log | 24 | --启动log |
25 | if use_logd == 1 then | 25 | if use_logd == 1 then |
26 | - for i = 1, work_count do | 26 | + for i = 1, work_count * 2 do |
27 | local logd = skynet.newservice("services/logd", i) | 27 | local logd = skynet.newservice("services/logd", i) |
28 | skynet.call(logd, "lua", "open") | 28 | skynet.call(logd, "lua", "open") |
29 | end | 29 | end |
src/models/Activity.lua
@@ -24,8 +24,13 @@ Activity.ActivityType = { | @@ -24,8 +24,13 @@ Activity.ActivityType = { | ||
24 | Exchange = 18, -- 兑换活动 | 24 | Exchange = 18, -- 兑换活动 |
25 | HangDrop = 19, -- 挂机掉落活动 | 25 | HangDrop = 19, -- 挂机掉落活动 |
26 | Gachakon = 20, -- 扭蛋活动 | 26 | Gachakon = 20, -- 扭蛋活动 |
27 | -} | ||
28 | 27 | ||
28 | + WishHeroPool = 23, -- 心愿卡池 | ||
29 | + ActHeroPool = 24, -- 活动卡池 | ||
30 | + ActShopGoods = 25, -- 活动商品 | ||
31 | + | ||
32 | + Crisis = 26, -- 宝藏怪活动 | ||
33 | +} | ||
29 | 34 | ||
30 | local function checkActivityType(activityType) | 35 | local function checkActivityType(activityType) |
31 | if type(activityType) == "string" then | 36 | if type(activityType) == "string" then |
@@ -41,6 +46,13 @@ function Activity:ctor(properties) | @@ -41,6 +46,13 @@ function Activity:ctor(properties) | ||
41 | self._isOpen = {} | 46 | self._isOpen = {} |
42 | end | 47 | end |
43 | 48 | ||
49 | +function Activity:getType(actType) | ||
50 | + if type(actType) == "string" then | ||
51 | + actType = Activity.ActivityType[actType] | ||
52 | + end | ||
53 | + return actType or 0 | ||
54 | +end | ||
55 | + | ||
44 | 56 | ||
45 | Activity.schema = { | 57 | Activity.schema = { |
46 | actime = {"table", {}}, -- 最近检查某项活动的开始时间 {id = time} | 58 | actime = {"table", {}}, -- 最近检查某项活动的开始时间 {id = time} |
@@ -58,6 +70,9 @@ Activity.schema = { | @@ -58,6 +70,9 @@ Activity.schema = { | ||
58 | act18 = {"table", {}, true}, -- {id=兑换数量} | 70 | act18 = {"table", {}, true}, -- {id=兑换数量} |
59 | act19 = {"number", 0}, -- {挂机信息} | 71 | act19 = {"number", 0}, -- {挂机信息} |
60 | act20 = {"table", {}}, -- {id=扭蛋抽出数量} | 72 | act20 = {"table", {}}, -- {id=扭蛋抽出数量} |
73 | + | ||
74 | + act24 = {"table", {}, true}, -- 活动卡池 {id=repaynum} | ||
75 | + act26 = {"table", {}}, -- {task = {id = count}, socre = {id = status}} | ||
61 | } | 76 | } |
62 | 77 | ||
63 | function Activity:data() | 78 | function Activity:data() |
@@ -76,6 +91,7 @@ function Activity:data() | @@ -76,6 +91,7 @@ function Activity:data() | ||
76 | act18 = self:getProperty("act18"), | 91 | act18 = self:getProperty("act18"), |
77 | act19 = self:getProperty("act19"), | 92 | act19 = self:getProperty("act19"), |
78 | act20 = self:getProperty("act20"), | 93 | act20 = self:getProperty("act20"), |
94 | + act26 = self:getProperty("act26"), | ||
79 | } | 95 | } |
80 | end | 96 | end |
81 | 97 | ||
@@ -153,7 +169,12 @@ function Activity:isOpen(activityType) | @@ -153,7 +169,12 @@ function Activity:isOpen(activityType) | ||
153 | return false | 169 | return false |
154 | end | 170 | end |
155 | 171 | ||
156 | -function Activity:isOpenById(id) | 172 | +function Activity:isOpenById(id, activityType) |
173 | + activityType = checkActivityType(activityType) | ||
174 | + local cfg = csvdb["activity_ctrlCsv"][id] | ||
175 | + if not cfg then return false end | ||
176 | + if activityType ~= 0 and cfg.showType ~= activityType then return false end | ||
177 | + | ||
157 | return self._isOpen[id] | 178 | return self._isOpen[id] |
158 | end | 179 | end |
159 | 180 | ||
@@ -473,6 +494,19 @@ activityFunc[Activity.ActivityType.Gachakon] = { | @@ -473,6 +494,19 @@ activityFunc[Activity.ActivityType.Gachakon] = { | ||
473 | end, | 494 | end, |
474 | } | 495 | } |
475 | 496 | ||
497 | +-- 活动卡池 | ||
498 | +activityFunc[Activity.ActivityType.ActHeroPool] = { | ||
499 | + ["init"] = function(self, actType, isCrossDay, notify, actId) | ||
500 | + end, | ||
501 | + ["close"] = function(self, actType, notify, actId) | ||
502 | + local actData = self:getActData(actType) | ||
503 | + local cfg = csvdb["activity_ctrlCsv"][actId] | ||
504 | + if not cfg then return end | ||
505 | + actData[cfg.condition] = nil | ||
506 | + self:updateActData(actType, actData, not notify) | ||
507 | + end, | ||
508 | +} | ||
509 | + | ||
476 | -- 挂机掉落 | 510 | -- 挂机掉落 |
477 | activityFunc[Activity.ActivityType.HangDrop] = { | 511 | activityFunc[Activity.ActivityType.HangDrop] = { |
478 | ["init"] = function(self, actType, isCrossDay, notify, actId) | 512 | ["init"] = function(self, actType, isCrossDay, notify, actId) |
@@ -524,7 +558,9 @@ function Activity:closeActivity(actId, notify, notUpdateAct) | @@ -524,7 +558,9 @@ function Activity:closeActivity(actId, notify, notUpdateAct) | ||
524 | self:recycleActItem(actId) | 558 | self:recycleActItem(actId) |
525 | end | 559 | end |
526 | if Activity.schema["act".. actType] then | 560 | if Activity.schema["act".. actType] then |
527 | - self:updateActData(actType, Activity.schema["act" .. actType][2], not notify or notUpdateAct) | 561 | + if not Activity.schema["act" .. actType][3] then |
562 | + self:updateActData(actType, Activity.schema["act" .. actType][2], not notify or notUpdateAct) | ||
563 | + end | ||
528 | end | 564 | end |
529 | end | 565 | end |
530 | 566 | ||
@@ -689,5 +725,59 @@ function Activity:getBattleTicket(actId) | @@ -689,5 +725,59 @@ function Activity:getBattleTicket(actId) | ||
689 | end | 725 | end |
690 | end | 726 | end |
691 | 727 | ||
728 | +activityFunc[Activity.ActivityType.ActShopGoods] = { | ||
729 | + ["init"] = function(self, actType, isCrossDay, notify, actId) | ||
730 | + end, | ||
731 | + ["close"] = function(self, actType, notify) | ||
732 | + local rechargeRecord = self.owner.storeData:getProperty("payR") | ||
733 | + for id, cfg in pairs(csvdb["shop_rechargeCsv"]) do | ||
734 | + if cfg.shop == 3 and cfg.type == ShopPackType.ActShopPack then | ||
735 | + rechargeRecord[id] = nil | ||
736 | + end | ||
737 | + end | ||
738 | + self.owner.storeData:updateProperty({field="payR", value=rechargeRecord}) | ||
739 | + end, | ||
740 | +} | ||
741 | + | ||
742 | + | ||
743 | + | ||
744 | +activityFunc[Activity.ActivityType.Crisis] = { | ||
745 | + ["check"] = function(self, actType, notify, atype, count) -- 检查 | ||
746 | + count = count or 1 | ||
747 | + local isOpen, actId = self:isOpen(actType) | ||
748 | + local actData = self:getActData(actType) or {} | ||
749 | + actData.task = actData.task or {} | ||
750 | + local change = false | ||
751 | + local actCsv = csvdb["activity_crisisCsv"][actId] | ||
752 | + for id, actSet in pairs(actCsv) do | ||
753 | + if actSet.type == atype then | ||
754 | + local status = actData.task[id] or 0 | ||
755 | + status = status + count | ||
756 | + if status >= actSet.condition1 then | ||
757 | + local reward | ||
758 | + if actSet.loop == 1 then | ||
759 | + local rcount = math.floor(status / actSet.condition1) | ||
760 | + local reward = actSet.reward:toNumMap() | ||
761 | + for itemId, itemC in pairs(reward) do | ||
762 | + reward[itemId] = itemC * rcount | ||
763 | + end | ||
764 | + status = status % actSet.condition1 | ||
765 | + else | ||
766 | + reward = actSet.reward | ||
767 | + status = -1 | ||
768 | + end | ||
769 | + self.owner:award(reward, {log = {desc = "activity_crisis"}, notNotify = not notify}) | ||
770 | + end | ||
771 | + actData.task[id] = status | ||
772 | + change = true | ||
773 | + end | ||
774 | + end | ||
775 | + if change then | ||
776 | + -- 更新下排行榜 | ||
777 | + self.owner:updateRankCommon(RANK_TYPE.ActCrisis, self.owner:getItemCount(ItemId.CrisisScore)) | ||
778 | + self:updateActData(actType, actData) | ||
779 | + end | ||
780 | + end, | ||
781 | +} | ||
692 | 782 | ||
693 | return Activity | 783 | return Activity |
src/models/RoleBattle.lua
@@ -44,7 +44,7 @@ function Role:checkBattle(battleType, params) | @@ -44,7 +44,7 @@ function Role:checkBattle(battleType, params) | ||
44 | 44 | ||
45 | local fixData = { | 45 | local fixData = { |
46 | hang = function() | 46 | hang = function() |
47 | - for slot, hero in pairs(self:getProperty("hangTS")) do | 47 | + for slot, hero in pairs(self:getProperty("hangTS").heros) do |
48 | selflist[slot] = hero.type | 48 | selflist[slot] = hero.type |
49 | end | 49 | end |
50 | heroscore = self:getProperty("hangTBV") | 50 | heroscore = self:getProperty("hangTBV") |
@@ -59,7 +59,7 @@ function Role:checkBattle(battleType, params) | @@ -59,7 +59,7 @@ function Role:checkBattle(battleType, params) | ||
59 | end, | 59 | end, |
60 | tower = function() | 60 | tower = function() |
61 | local towerF = self:getTeamFormatByType(TeamSystemType.Tower) | 61 | local towerF = self:getTeamFormatByType(TeamSystemType.Tower) |
62 | - for slot, hero in pairs(self:getTeamHerosInfo(towerF.heros)) do | 62 | + for slot, hero in pairs(self:getTeamHerosInfo(towerF).heros) do |
63 | selflist[slot] = hero.type | 63 | selflist[slot] = hero.type |
64 | end | 64 | end |
65 | heroscore = self:getTeamBattleValue(towerF.heros) | 65 | heroscore = self:getTeamBattleValue(towerF.heros) |
@@ -74,7 +74,7 @@ function Role:checkBattle(battleType, params) | @@ -74,7 +74,7 @@ function Role:checkBattle(battleType, params) | ||
74 | end, | 74 | end, |
75 | bonus = function() | 75 | bonus = function() |
76 | local bTeam = self:getTeamFormatByType(TeamSystemType.BonusBattle) | 76 | local bTeam = self:getTeamFormatByType(TeamSystemType.BonusBattle) |
77 | - for slot, hero in pairs(self:getTeamHerosInfo(bTeam.heros)) do | 77 | + for slot, hero in pairs(self:getTeamHerosInfo(bTeam).heros) do |
78 | selflist[slot] = hero.type | 78 | selflist[slot] = hero.type |
79 | end | 79 | end |
80 | heroscore = self:getTeamBattleValue(bTeam.heros) | 80 | heroscore = self:getTeamBattleValue(bTeam.heros) |
@@ -88,7 +88,7 @@ function Role:checkBattle(battleType, params) | @@ -88,7 +88,7 @@ function Role:checkBattle(battleType, params) | ||
88 | end | 88 | end |
89 | end, | 89 | end, |
90 | act_battle = function() | 90 | act_battle = function() |
91 | - for slot, hero in pairs(self:getTeamHerosInfo(params.heros)) do | 91 | + for slot, hero in pairs(self:getTeamHerosInfo(params).heros) do |
92 | selflist[slot] = hero.type | 92 | selflist[slot] = hero.type |
93 | end | 93 | end |
94 | heroscore = self:getTeamBattleValue(params.heros) | 94 | heroscore = self:getTeamBattleValue(params.heros) |
@@ -102,7 +102,7 @@ function Role:checkBattle(battleType, params) | @@ -102,7 +102,7 @@ function Role:checkBattle(battleType, params) | ||
102 | end | 102 | end |
103 | end, | 103 | end, |
104 | pvpc = function() | 104 | pvpc = function() |
105 | - for slot, hero in pairs(self:getProperty("pvpTSC")) do | 105 | + for slot, hero in pairs(self:getProperty("pvpTSC").heros) do |
106 | selflist[slot] = hero.type | 106 | selflist[slot] = hero.type |
107 | end | 107 | end |
108 | heroscore = self:getProperty("pvpTBVC") | 108 | heroscore = self:getProperty("pvpTBVC") |
@@ -124,7 +124,7 @@ function Role:checkBattle(battleType, params) | @@ -124,7 +124,7 @@ function Role:checkBattle(battleType, params) | ||
124 | pvph = function() | 124 | pvph = function() |
125 | for idx, team in pairs(self:getProperty("pvpTSH")) do | 125 | for idx, team in pairs(self:getProperty("pvpTSH")) do |
126 | selflist[idx] = selflist[idx] or {} | 126 | selflist[idx] = selflist[idx] or {} |
127 | - for slot, hero in pairs(team) do | 127 | + for slot, hero in pairs(team.heros) do |
128 | selflist[idx][slot] = hero.type | 128 | selflist[idx][slot] = hero.type |
129 | end | 129 | end |
130 | end | 130 | end |
src/models/RoleCross.lua
@@ -19,8 +19,8 @@ RoleCross.bind = function (Role) | @@ -19,8 +19,8 @@ RoleCross.bind = function (Role) | ||
19 | -- 好友详细队伍信息 | 19 | -- 好友详细队伍信息 |
20 | function Role:friendInfo() | 20 | function Role:friendInfo() |
21 | local info = self:friendSInfo() | 21 | local info = self:friendSInfo() |
22 | - local heros = self:getProperty("pvpTBVC") ~= 0 and self:getProperty("pvpTSC") or self:getProperty("hangTS") | ||
23 | - info.heros = heros | 22 | + local team = self:getProperty("pvpTBVC") ~= 0 and self:getProperty("pvpTSC") or self:getProperty("hangTS") |
23 | + info.team = team | ||
24 | return info | 24 | return info |
25 | end | 25 | end |
26 | 26 | ||
@@ -36,7 +36,7 @@ RoleCross.bind = function (Role) | @@ -36,7 +36,7 @@ RoleCross.bind = function (Role) | ||
36 | level = self:getProperty("level"), | 36 | level = self:getProperty("level"), |
37 | headId = self:getProperty("headId"), | 37 | headId = self:getProperty("headId"), |
38 | battleV = self:getProperty("pvpTBVC"), | 38 | battleV = self:getProperty("pvpTBVC"), |
39 | - heros = self:getProperty("pvpTSC"), | 39 | + team = self:getProperty("pvpTSC"), |
40 | battleInfo = self:getProperty("pvpTBC") | 40 | battleInfo = self:getProperty("pvpTBC") |
41 | } | 41 | } |
42 | return info | 42 | return info |
@@ -49,7 +49,7 @@ RoleCross.bind = function (Role) | @@ -49,7 +49,7 @@ RoleCross.bind = function (Role) | ||
49 | level = self:getProperty("level"), | 49 | level = self:getProperty("level"), |
50 | headId = self:getProperty("headId"), | 50 | headId = self:getProperty("headId"), |
51 | battleV = self:getProperty("pvpTBVH"), | 51 | battleV = self:getProperty("pvpTBVH"), |
52 | - heros = self:getProperty("pvpTSH"), | 52 | + team = self:getProperty("pvpTSH"), |
53 | battleInfo = self:getProperty("pvpTBH") | 53 | battleInfo = self:getProperty("pvpTBH") |
54 | } | 54 | } |
55 | return info | 55 | return info |
@@ -281,7 +281,7 @@ function CMD.friendInfo(roleId) | @@ -281,7 +281,7 @@ function CMD.friendInfo(roleId) | ||
281 | headId = info.headId, | 281 | headId = info.headId, |
282 | ltime = info.ltime, | 282 | ltime = info.ltime, |
283 | battleV = info.pvpTBVC ~= 0 and info.pvpTBVC or info.hangTBV, | 283 | battleV = info.pvpTBVC ~= 0 and info.pvpTBVC or info.hangTBV, |
284 | - heros = info.pvpTBVC ~= 0 and info.pvpTSC or info.hangTS | 284 | + team = info.pvpTBVC ~= 0 and info.pvpTSC or info.hangTS |
285 | } | 285 | } |
286 | end | 286 | end |
287 | 287 | ||
@@ -297,7 +297,7 @@ function CMD.pvpCInfo(roleId) | @@ -297,7 +297,7 @@ function CMD.pvpCInfo(roleId) | ||
297 | level = info.level, | 297 | level = info.level, |
298 | headId = info.headId, | 298 | headId = info.headId, |
299 | battleV = info.pvpTBVC, | 299 | battleV = info.pvpTBVC, |
300 | - heros = info.pvpTSC, | 300 | + team = info.pvpTSC, |
301 | battleInfo = info.pvpTBC | 301 | battleInfo = info.pvpTBC |
302 | } | 302 | } |
303 | end | 303 | end |
@@ -309,7 +309,7 @@ function CMD.pvpHInfo(roleId) | @@ -309,7 +309,7 @@ function CMD.pvpHInfo(roleId) | ||
309 | level = info.level, | 309 | level = info.level, |
310 | headId = info.headId, | 310 | headId = info.headId, |
311 | battleV = info.pvpTBVH, | 311 | battleV = info.pvpTBVH, |
312 | - heros = info.pvpTSH, | 312 | + team = info.pvpTSH, |
313 | battleInfo = info.pvpTBH | 313 | battleInfo = info.pvpTBH |
314 | } | 314 | } |
315 | end | 315 | end |
src/models/RoleLog.lua
@@ -50,6 +50,7 @@ local ItemReason = { | @@ -50,6 +50,7 @@ local ItemReason = { | ||
50 | actHangDrop = 134, -- 掉落活动奖励 | 50 | actHangDrop = 134, -- 掉落活动奖励 |
51 | actBattle = 135, -- 活动关卡 | 51 | actBattle = 135, -- 活动关卡 |
52 | actMilestone = 136, -- 活动关卡boss伤害里程碑 | 52 | actMilestone = 136, -- 活动关卡boss伤害里程碑 |
53 | + worldBossReward = 137, -- 世界boss翻牌奖励 | ||
53 | 54 | ||
54 | 55 | ||
55 | advHang = 301, -- 拾荒挂机 | 56 | advHang = 301, -- 拾荒挂机 |
@@ -90,6 +91,7 @@ local ItemReason = { | @@ -90,6 +91,7 @@ local ItemReason = { | ||
90 | actSign = 1007, -- 活动签到 | 91 | actSign = 1007, -- 活动签到 |
91 | actPaySign = 1008, -- 活动付费签到 | 92 | actPaySign = 1008, -- 活动付费签到 |
92 | calendaTask = 1009, -- 英雄帖 | 93 | calendaTask = 1009, -- 英雄帖 |
94 | + actMilecrisis = 1010, -- 物资危机 | ||
93 | 95 | ||
94 | -- 餐厅 | 96 | -- 餐厅 |
95 | greenHourse = 1101, -- 食材获得 | 97 | greenHourse = 1101, -- 食材获得 |
@@ -252,13 +254,6 @@ local MethodType = { | @@ -252,13 +254,6 @@ local MethodType = { | ||
252 | hero_break_result = "json", -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 254 | hero_break_result = "json", -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
253 | hero_break_level = true, -- 英雄突破后等级上限 | 255 | hero_break_level = true, -- 英雄突破后等级上限 |
254 | }, | 256 | }, |
255 | - hero_talent = { --英雄天赋升级 | ||
256 | - hero_id = true, -- 英雄ID | ||
257 | - hero_talent_cost = "json", -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | ||
258 | - hero_talent_levelbef = true, -- 英雄技能升级前等级 | ||
259 | - hero_talent_level = true, -- 英雄技能升级后等级 | ||
260 | - hero_talent_id = true, -- 天赋id | ||
261 | - }, | ||
262 | hero_jewel = { --英雄铭文 | 257 | hero_jewel = { --英雄铭文 |
263 | hero_id = true, -- 英雄ID | 258 | hero_id = true, -- 英雄ID |
264 | hero_jewel_sequence = "ucode", -- 铭文装备编号,用以关联一次装备时产生的多条日志 | 259 | hero_jewel_sequence = "ucode", -- 铭文装备编号,用以关联一次装备时产生的多条日志 |
@@ -288,7 +283,7 @@ local MethodType = { | @@ -288,7 +283,7 @@ local MethodType = { | ||
288 | gacha_up = true, -- 卡池UP角色 | 283 | gacha_up = true, -- 卡池UP角色 |
289 | gacha_times = true, -- 抽卡次数 | 284 | gacha_times = true, -- 抽卡次数 |
290 | gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 285 | gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
291 | - currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 286 | + gacha_cost = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
292 | gacha_cnt = true, -- 保底计数 | 287 | gacha_cnt = true, -- 保底计数 |
293 | }, | 288 | }, |
294 | equip_wear = { --装备穿戴与卸载 | 289 | equip_wear = { --装备穿戴与卸载 |
@@ -296,8 +291,8 @@ local MethodType = { | @@ -296,8 +291,8 @@ local MethodType = { | ||
296 | equip_id = true, --装备ID | 291 | equip_id = true, --装备ID |
297 | equip_wear_action = true, --装备操作类型:装备:0,卸载:1 | 292 | equip_wear_action = true, --装备操作类型:装备:0,卸载:1 |
298 | equip_wear_part = true, --装备部位,记录部位ID | 293 | equip_wear_part = true, --装备部位,记录部位ID |
299 | - equip_wear_result = "json", --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} | ||
300 | - equip_wear_change = "json", --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | 294 | + equip_wear_scorebef = true, --装备前英雄评分 |
295 | + equip_wear_score = true, --装备后英雄评分 | ||
301 | equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 | 296 | equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 |
302 | equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 | 297 | equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 |
303 | }, | 298 | }, |
@@ -414,6 +409,7 @@ local MethodType = { | @@ -414,6 +409,7 @@ local MethodType = { | ||
414 | restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | 409 | restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
415 | restaurant_order_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 410 | restaurant_order_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
416 | restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | 411 | restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
412 | + restaurant_order_type = true, -- 订单任务类型,0:特殊顾客,1:特别订单 | ||
417 | }, | 413 | }, |
418 | restaurant_collect = { --餐厅顾客图谱 | 414 | restaurant_collect = { --餐厅顾客图谱 |
419 | restaurant_collect_id = true, -- 图谱收集ID | 415 | restaurant_collect_id = true, -- 图谱收集ID |
@@ -505,6 +501,27 @@ local MethodType = { | @@ -505,6 +501,27 @@ local MethodType = { | ||
505 | mission_pick_fund_beflv = true, -- 资助前资助等级 | 501 | mission_pick_fund_beflv = true, -- 资助前资助等级 |
506 | mission_pick_fund_aftlv = true, -- 资助后资助等级 | 502 | mission_pick_fund_aftlv = true, -- 资助后资助等级 |
507 | }, | 503 | }, |
504 | + function_open = { -- 功能开启日志 | ||
505 | + function_id = true, --功能ID | ||
506 | + }, | ||
507 | + punitive_action = { -- 讨伐行动 --TODO | ||
508 | + mission_id = true, --关卡ID | ||
509 | + mission_herolist = true, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] | ||
510 | + mission_success_rate = true, -- 大成功几率 | ||
511 | + mission_reward = true, -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} | ||
512 | + mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) | ||
513 | + mission_roundtime = true, -- 完成耗时(秒) | ||
514 | + }, | ||
515 | + hero_talent = { --英雄精进(原英雄天赋升级) TODO | ||
516 | + hero_id = true, --英雄ID | ||
517 | + hero_talent_stagebef = true, --英雄精进升级前停留阶段 | ||
518 | + hero_talent_stage = true, --英雄精进升级后停留阶段 | ||
519 | + hero_talent_cost = "json", --英雄精进升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,….} | ||
520 | + hero_talent_subid = true, --升级属性ID,生命、攻击、防御、命中、闪避分别对应(0,1,2,3,4) | ||
521 | + hero_talent_sublevel = true, --升级属性等级,如生命升级从1到2,则记录2 | ||
522 | + }, | ||
523 | + | ||
524 | + | ||
508 | } | 525 | } |
509 | 526 | ||
510 | local function printError(info) | 527 | local function printError(info) |
@@ -566,6 +583,7 @@ local LogType = { | @@ -566,6 +583,7 @@ local LogType = { | ||
566 | logout = "common", | 583 | logout = "common", |
567 | guide = "common", | 584 | guide = "common", |
568 | newdevice = "common", | 585 | newdevice = "common", |
586 | + cbback = "common", | ||
569 | 587 | ||
570 | in_item = "common", | 588 | in_item = "common", |
571 | out_item = "common", | 589 | out_item = "common", |
src/models/RolePlugin.lua
@@ -362,10 +362,34 @@ function RolePlugin.bind(Role) | @@ -362,10 +362,34 @@ function RolePlugin.bind(Role) | ||
362 | pms.itemId = itemId | 362 | pms.itemId = itemId |
363 | pms.count = - count | 363 | pms.count = - count |
364 | self:addItem(pms) | 364 | self:addItem(pms) |
365 | + self:itemDeltaEvent(pms) | ||
365 | end | 366 | end |
366 | return true | 367 | return true |
367 | end | 368 | end |
368 | 369 | ||
370 | + function Role:itemDeltaEvent(pms) | ||
371 | + self:eventBoxL(pms) | ||
372 | + end | ||
373 | + | ||
374 | + -- 拆解室的生产线启动 | ||
375 | + function Role:eventBoxL(pms) | ||
376 | + local limit = globalCsv.box_key_max[pms.itemId] | ||
377 | + if not limit then return end | ||
378 | + | ||
379 | + local update = false | ||
380 | + local boxL = self:getProperty("boxL") or {} | ||
381 | + for slot, data in pairs(boxL) do | ||
382 | + if data.time == 0 and data.id == pms.itemId and self:getItemCount(pms.itemId) < limit then | ||
383 | + update = true | ||
384 | + data.time = skynet.timex() | ||
385 | + end | ||
386 | + end | ||
387 | + | ||
388 | + if update then | ||
389 | + self:updateProperty({field = "boxL", value = boxL}) | ||
390 | + end | ||
391 | + end | ||
392 | + | ||
369 | function Role:getItemCount(itemId) | 393 | function Role:getItemCount(itemId) |
370 | if itemId == ItemId.Diamond then | 394 | if itemId == ItemId.Diamond then |
371 | return self:getAllDiamond() | 395 | return self:getAllDiamond() |
@@ -1014,6 +1038,7 @@ function RolePlugin.bind(Role) | @@ -1014,6 +1038,7 @@ function RolePlugin.bind(Role) | ||
1014 | 1038 | ||
1015 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then | 1039 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then |
1016 | local unlockData = csvdb["unlockCsv"][func] | 1040 | local unlockData = csvdb["unlockCsv"][func] |
1041 | + self:log("function_open", {function_id = func}) | ||
1017 | if unlockData.type == 4 then -- 解锁神器 | 1042 | if unlockData.type == 4 then -- 解锁神器 |
1018 | if self:getProperty("advAFOpen")[unlockData.value1] ~= 1 then | 1043 | if self:getProperty("advAFOpen")[unlockData.value1] ~= 1 then |
1019 | self:changeUpdates({{type = "advAFOpen", field = unlockData.value1, value = 1}}) | 1044 | self:changeUpdates({{type = "advAFOpen", field = unlockData.value1, value = 1}}) |
@@ -1176,7 +1201,7 @@ function RolePlugin.bind(Role) | @@ -1176,7 +1201,7 @@ function RolePlugin.bind(Role) | ||
1176 | lv = self:getProperty("level"), | 1201 | lv = self:getProperty("level"), |
1177 | batteV = battleV, | 1202 | batteV = battleV, |
1178 | level = level, | 1203 | level = level, |
1179 | - format = self:getTeamHerosInfo(towerTeam.heros), | 1204 | + format = self:getTeamHerosInfo(towerTeam).heros, |
1180 | } | 1205 | } |
1181 | local roleId = self:getProperty("id") | 1206 | local roleId = self:getProperty("id") |
1182 | redisproxy:pipelining(function (red) | 1207 | redisproxy:pipelining(function (red) |
@@ -1324,9 +1349,10 @@ function RolePlugin.bind(Role) | @@ -1324,9 +1349,10 @@ function RolePlugin.bind(Role) | ||
1324 | return teamInfo | 1349 | return teamInfo |
1325 | end | 1350 | end |
1326 | 1351 | ||
1327 | - function Role:getTeamHerosInfo(heroIds) | 1352 | + function Role:getTeamHerosInfo(team) |
1353 | + local format = {} | ||
1328 | local heros = {} | 1354 | local heros = {} |
1329 | - for slot, heroId in pairs(heroIds or {}) do | 1355 | + for slot, heroId in pairs(team.heros or {}) do |
1330 | local hero = self.heros[heroId] | 1356 | local hero = self.heros[heroId] |
1331 | heros[slot] = { | 1357 | heros[slot] = { |
1332 | type = hero:getProperty("type"), | 1358 | type = hero:getProperty("type"), |
@@ -1334,7 +1360,10 @@ function RolePlugin.bind(Role) | @@ -1334,7 +1360,10 @@ function RolePlugin.bind(Role) | ||
1334 | wakeL = hero:getProperty("wakeL"), | 1360 | wakeL = hero:getProperty("wakeL"), |
1335 | } | 1361 | } |
1336 | end | 1362 | end |
1337 | - return heros | 1363 | + format.heros = heros |
1364 | + format.supports = team.supports or {} | ||
1365 | + format.tactics = team.tactics or {} | ||
1366 | + return format | ||
1338 | end | 1367 | end |
1339 | 1368 | ||
1340 | function Role:getTeamBattleValue(heros) | 1369 | function Role:getTeamBattleValue(heros) |
@@ -1352,7 +1381,7 @@ function RolePlugin.bind(Role) | @@ -1352,7 +1381,7 @@ function RolePlugin.bind(Role) | ||
1352 | if not team then return end | 1381 | if not team then return end |
1353 | 1382 | ||
1354 | self:setProperties({ | 1383 | self:setProperties({ |
1355 | - hangTS = self:getTeamHerosInfo(team.heros), | 1384 | + hangTS = self:getTeamHerosInfo(team), |
1356 | hangTB = self:getTeamBattleInfo(team), | 1385 | hangTB = self:getTeamBattleInfo(team), |
1357 | hangTBV = self:getTeamBattleValue(team.heros), | 1386 | hangTBV = self:getTeamBattleValue(team.heros), |
1358 | }) | 1387 | }) |
@@ -1400,7 +1429,7 @@ function RolePlugin.bind(Role) | @@ -1400,7 +1429,7 @@ function RolePlugin.bind(Role) | ||
1400 | self:updateProperty({field = "pvpTC", value = team}) | 1429 | self:updateProperty({field = "pvpTC", value = team}) |
1401 | end | 1430 | end |
1402 | self:setProperties({ | 1431 | self:setProperties({ |
1403 | - pvpTSC = self:getTeamHerosInfo(team.heros), | 1432 | + pvpTSC = self:getTeamHerosInfo(team), |
1404 | pvpTBC = self:getTeamBattleInfo(team), | 1433 | pvpTBC = self:getTeamBattleInfo(team), |
1405 | pvpTBVC = self:getTeamBattleValue(team.heros), | 1434 | pvpTBVC = self:getTeamBattleValue(team.heros), |
1406 | }) | 1435 | }) |
@@ -1416,7 +1445,7 @@ function RolePlugin.bind(Role) | @@ -1416,7 +1445,7 @@ function RolePlugin.bind(Role) | ||
1416 | local pvpTSH, pvpTBH, pvpTBVH = {}, {}, {} | 1445 | local pvpTSH, pvpTBH, pvpTBVH = {}, {}, {} |
1417 | for i = 1, 3 do | 1446 | for i = 1, 3 do |
1418 | if team[i] then | 1447 | if team[i] then |
1419 | - pvpTSH[i] = self:getTeamHerosInfo(team[i].heros) | 1448 | + pvpTSH[i] = self:getTeamHerosInfo(team[i]) |
1420 | pvpTBH[i] = self:getTeamBattleInfo(team[i]) | 1449 | pvpTBH[i] = self:getTeamBattleInfo(team[i]) |
1421 | pvpTBVH[i] = self:getTeamBattleValue(team[i].heros) | 1450 | pvpTBVH[i] = self:getTeamBattleValue(team[i].heros) |
1422 | end | 1451 | end |
@@ -1575,10 +1604,17 @@ function RolePlugin.bind(Role) | @@ -1575,10 +1604,17 @@ function RolePlugin.bind(Role) | ||
1575 | return "" | 1604 | return "" |
1576 | end | 1605 | end |
1577 | local limit = rechargeData.limit | 1606 | local limit = rechargeData.limit |
1578 | - local rechargeRecord = self:getProperty("payR") or {} | 1607 | + local rechargeRecord = self.storeData:getProperty("payR") or {} |
1579 | if limit ~= 0 and limit <= (rechargeRecord[rechargeId] or 0) then | 1608 | if limit ~= 0 and limit <= (rechargeRecord[rechargeId] or 0) then |
1580 | return "" | 1609 | return "" |
1581 | - end | 1610 | + end |
1611 | + | ||
1612 | + --判断是否是活动商品 | ||
1613 | + if rechargeData.activity_id ~= 0 then | ||
1614 | + local actCfg = csvdb["activity_ctrlCsv"][rechargeData.activity_id] | ||
1615 | + if not actCfg then return "" end | ||
1616 | + if not self.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then return "" end | ||
1617 | + end | ||
1582 | 1618 | ||
1583 | local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) | 1619 | local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) |
1584 | if orderId then | 1620 | if orderId then |
@@ -1596,6 +1632,7 @@ function RolePlugin.bind(Role) | @@ -1596,6 +1632,7 @@ function RolePlugin.bind(Role) | ||
1596 | key = orderKey, | 1632 | key = orderKey, |
1597 | order = partnerOrderId, | 1633 | order = partnerOrderId, |
1598 | rechargeId = rechargeId, | 1634 | rechargeId = rechargeId, |
1635 | + createTime = skynet.timex(), | ||
1599 | }) | 1636 | }) |
1600 | order:create() | 1637 | order:create() |
1601 | -- 正在进行中的订单 缓存 | 1638 | -- 正在进行中的订单 缓存 |
@@ -1639,7 +1676,7 @@ function RolePlugin.bind(Role) | @@ -1639,7 +1676,7 @@ function RolePlugin.bind(Role) | ||
1639 | -- 开始下单 | 1676 | -- 开始下单 |
1640 | if status == "success" then | 1677 | if status == "success" then |
1641 | elseif status == "fail" then | 1678 | elseif status == "fail" then |
1642 | - redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) | 1679 | + -- redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) |
1643 | elseif status == "finsh" then | 1680 | elseif status == "finsh" then |
1644 | orderObject:setProperty("finishTime", skynet.time()) | 1681 | orderObject:setProperty("finishTime", skynet.time()) |
1645 | redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) | 1682 | redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) |
@@ -1824,10 +1861,10 @@ function RolePlugin.bind(Role) | @@ -1824,10 +1861,10 @@ function RolePlugin.bind(Role) | ||
1824 | end | 1861 | end |
1825 | 1862 | ||
1826 | -- 抽卡阶段奖励 | 1863 | -- 抽卡阶段奖励 |
1827 | - function Role:getDrawCardExtraReward(oldVal, newVal) | 1864 | + function Role:getDrawCardExtraReward(feedbackId, oldVal, newVal) |
1828 | local reward = nil | 1865 | local reward = nil |
1829 | local maxCount = 0 | 1866 | local maxCount = 0 |
1830 | - for k, v in pairs(csvdb["build_extraRewardCsv"]) do | 1867 | + for k, v in pairs(csvdb["build_extraRewardCsv"][feedbackId]) do |
1831 | if oldVal < k and newVal >= k then | 1868 | if oldVal < k and newVal >= k then |
1832 | reward = v["reward"] or "" | 1869 | reward = v["reward"] or "" |
1833 | end | 1870 | end |
src/models/RolePvp.lua
@@ -233,7 +233,6 @@ function Role:refreshPvpMatch(score, rank, rankKey) | @@ -233,7 +233,6 @@ function Role:refreshPvpMatch(score, rank, rankKey) | ||
233 | if low < 0 then | 233 | if low < 0 then |
234 | low = 0 | 234 | low = 0 |
235 | end | 235 | end |
236 | - print(low, heigh) | ||
237 | local rangeIds = redisproxy:ZREVRANGE(dbKey, low, heigh) | 236 | local rangeIds = redisproxy:ZREVRANGE(dbKey, low, heigh) |
238 | local lastRangeIds = {} | 237 | local lastRangeIds = {} |
239 | for idx, one in ipairs(rangeIds) do | 238 | for idx, one in ipairs(rangeIds) do |
src/models/RoleTask.lua
@@ -48,6 +48,8 @@ local TaskType = { | @@ -48,6 +48,8 @@ local TaskType = { | ||
48 | AdvScore = 410, -- 冒险分数 - score | 48 | AdvScore = 410, -- 冒险分数 - score |
49 | AdvDraw = 411, -- 冒险资助 - count ptype | 49 | AdvDraw = 411, -- 冒险资助 - count ptype |
50 | AdvHang = 412, -- 代理拾荒次数 | 50 | AdvHang = 412, -- 代理拾荒次数 |
51 | + AdvMineKill = 413, -- 宝藏怪击杀 | ||
52 | + AdvMineLayer = 414, -- 宝藏洞激活 | ||
51 | 53 | ||
52 | --爬塔相关 | 54 | --爬塔相关 |
53 | TowerPass = 501, -- 爬塔通关 - level | 55 | TowerPass = 501, -- 爬塔通关 - level |
@@ -218,6 +220,7 @@ local SudokuListener = { | @@ -218,6 +220,7 @@ local SudokuListener = { | ||
218 | } | 220 | } |
219 | 221 | ||
220 | local Activity = require("models.Activity") | 222 | local Activity = require("models.Activity") |
223 | + | ||
221 | local ActivityListener = { | 224 | local ActivityListener = { |
222 | func = "checkActivityTask", | 225 | func = "checkActivityTask", |
223 | listen = { | 226 | listen = { |
@@ -226,6 +229,8 @@ local ActivityListener = { | @@ -226,6 +229,8 @@ local ActivityListener = { | ||
226 | [TaskType.AdvDraw] = {{Activity.ActivityType.AdvDraw, f("count")}}, | 229 | [TaskType.AdvDraw] = {{Activity.ActivityType.AdvDraw, f("count")}}, |
227 | [TaskType.OpenBox] = {{Activity.ActivityType.OpenBox, f("count")}}, | 230 | [TaskType.OpenBox] = {{Activity.ActivityType.OpenBox, f("count")}}, |
228 | [TaskType.Pay] = {{Activity.ActivityType.PayBack, f("twd")}}, | 231 | [TaskType.Pay] = {{Activity.ActivityType.PayBack, f("twd")}}, |
232 | + [TaskType.AdvMineKill] = {{Activity.ActivityType.Crisis, 1}}, | ||
233 | + [TaskType.AdvMineLayer] = {{Activity.ActivityType.Crisis, 2}}, | ||
229 | } | 234 | } |
230 | } | 235 | } |
231 | 236 | ||
@@ -266,7 +271,6 @@ local CalendaTaskListener = { | @@ -266,7 +271,6 @@ local CalendaTaskListener = { | ||
266 | } | 271 | } |
267 | } | 272 | } |
268 | 273 | ||
269 | - | ||
270 | local TaskListeners = { | 274 | local TaskListeners = { |
271 | StoryListener, | 275 | StoryListener, |
272 | CommonListener, | 276 | CommonListener, |
@@ -358,11 +362,22 @@ function RoleTask.bind(Role) | @@ -358,11 +362,22 @@ function RoleTask.bind(Role) | ||
358 | return true | 362 | return true |
359 | end | 363 | end |
360 | 364 | ||
365 | + local function checkStoryStatusByActBattle(role, data, status, cond1) -- cond1 carbonId | ||
366 | + local actid = data.sort | ||
367 | + if not role.activity:isOpenById(actid) then return end | ||
368 | + if cond1 and tonumber(data.unlockData) == cond1 then | ||
369 | + status.s = 1 | ||
370 | + return true | ||
371 | + end | ||
372 | + return | ||
373 | + end | ||
374 | + | ||
361 | local checkstoryStatusFunc = { | 375 | local checkstoryStatusFunc = { |
362 | [1] = checkStoryStatusByHang, | 376 | [1] = checkStoryStatusByHang, |
363 | [2] = checkStoryStatusByLove, | 377 | [2] = checkStoryStatusByLove, |
364 | [3] = checkStoryStatusByMultStar, | 378 | [3] = checkStoryStatusByMultStar, |
365 | [4] = checkStoryStatusByAdv, | 379 | [4] = checkStoryStatusByAdv, |
380 | + [5] = checkStoryStatusByActBattle, | ||
366 | } | 381 | } |
367 | 382 | ||
368 | function Role:checkStoryStatus(notNotify, stype, cond1, cond2, cond3) | 383 | function Role:checkStoryStatus(notNotify, stype, cond1, cond2, cond3) |
src/models/Store.lua
@@ -298,6 +298,8 @@ function Store:resetStoreReored(resetId) | @@ -298,6 +298,8 @@ function Store:resetStoreReored(resetId) | ||
298 | end | 298 | end |
299 | end | 299 | end |
300 | end | 300 | end |
301 | + else | ||
302 | + payRecord[k] = nil | ||
301 | end | 303 | end |
302 | end | 304 | end |
303 | self:updateProperty({field = "payR", value = payRecord}) | 305 | self:updateProperty({field = "payR", value = payRecord}) |
@@ -307,6 +309,8 @@ function Store:resetStoreReored(resetId) | @@ -307,6 +309,8 @@ function Store:resetStoreReored(resetId) | ||
307 | if config.resetTime == resetId then | 309 | if config.resetTime == resetId then |
308 | buyRecord[k] = nil | 310 | buyRecord[k] = nil |
309 | end | 311 | end |
312 | + else | ||
313 | + buyRecord[k] = nil | ||
310 | end | 314 | end |
311 | end | 315 | end |
312 | self:updateProperty({field = "buyR", value = buyRecord}) | 316 | self:updateProperty({field = "buyR", value = buyRecord}) |
src/services/globald.lua
src/shared/logproxy.lua