Commit ab2eb90303d27daecf1ddcfcffcc19365a36d154
Merge branch 'tr/bugfix' into tr/develop
* tr/bugfix: 跨服竞技场 关卡boss活动扫荡累计伤害值不正确bug 抽卡up_pool判空 抽卡up失败走全随机,随机池把up角色剔除 心愿卡池根据心愿单英雄数量调整概率 铭文升级超过上限bug # Conflicts: # src/csvdata
Showing
6 changed files
with
21 additions
and
7 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -542,7 +542,7 @@ function _M.startBattleRpc(agent, data) | @@ -542,7 +542,7 @@ function _M.startBattleRpc(agent, data) | ||
542 | bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] * count | 542 | bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] * count |
543 | end | 543 | end |
544 | 544 | ||
545 | - bi["sum"] = bi["sum"] + bi["top"] | 545 | + bi["sum"] = bi["sum"] + bi["top"] * count |
546 | actData["ticket"] = ticket - num | 546 | actData["ticket"] = ticket - num |
547 | actData[id] = bi | 547 | actData[id] = bi |
548 | changeFlag = true | 548 | changeFlag = true |
src/actions/CarAction.lua
@@ -124,8 +124,8 @@ function _M.runeUpRpc( agent, data ) | @@ -124,8 +124,8 @@ function _M.runeUpRpc( agent, data ) | ||
124 | local runeData = runeSet[id] | 124 | local runeData = runeSet[id] |
125 | if not runeData then return 5 end | 125 | if not runeData then return 5 end |
126 | 126 | ||
127 | - local maxLv = #csvdb["rune_buildCsv"] | ||
128 | - if level >= maxLv then return 6 end | 127 | + --local maxLv = #csvdb["rune_buildCsv"] |
128 | + if level >= runeData.lvLimit then return 6 end | ||
129 | local lvData = csvdb["rune_buildCsv"][level] | 129 | local lvData = csvdb["rune_buildCsv"][level] |
130 | local cost = lvData.cost:toNumMap() | 130 | local cost = lvData.cost:toNumMap() |
131 | if not role:checkItemEnough(cost) then | 131 | if not role:checkItemEnough(cost) then |
src/actions/HeroAction.lua
@@ -853,6 +853,10 @@ function _M.drawHeroRpc(agent, data) | @@ -853,6 +853,10 @@ function _M.drawHeroRpc(agent, data) | ||
853 | elseif values[1] == HeroQuality.SSR then | 853 | elseif values[1] == HeroQuality.SSR then |
854 | weight = unitPool["up_ssr_weight"] | 854 | weight = unitPool["up_ssr_weight"] |
855 | up_pool = unitPool["up_ssr_id"] | 855 | up_pool = unitPool["up_ssr_id"] |
856 | + if btype == 5 then | ||
857 | + local wishPool = role:getProperty("wishPool") or {} | ||
858 | + weight = weight * #wishPool | ||
859 | + end | ||
856 | end | 860 | end |
857 | --print(poolId, rand_v, weight, up_pool, values[1]) | 861 | --print(poolId, rand_v, weight, up_pool, values[1]) |
858 | if rand_v < weight and up_pool then | 862 | if rand_v < weight and up_pool then |
@@ -879,6 +883,15 @@ function _M.drawHeroRpc(agent, data) | @@ -879,6 +883,15 @@ function _M.drawHeroRpc(agent, data) | ||
879 | if heroData[field] ~= values[idx] then ok = false break end | 883 | if heroData[field] ~= values[idx] then ok = false break end |
880 | end | 884 | end |
881 | end | 885 | end |
886 | + -- 随机剔除up池中的角色 | ||
887 | + if up_pool then | ||
888 | + for k, v in ipairs(up_pool) do | ||
889 | + if v == itemData.id then | ||
890 | + ok = false | ||
891 | + break | ||
892 | + end | ||
893 | + end | ||
894 | + end | ||
882 | if not ok then break end | 895 | if not ok then break end |
883 | if oneData[pool_str] > 0 then | 896 | if oneData[pool_str] > 0 then |
884 | resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率 | 897 | resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率 |
src/models/RoleLog.lua
@@ -125,6 +125,7 @@ local ItemReason = { | @@ -125,6 +125,7 @@ local ItemReason = { | ||
125 | 125 | ||
126 | -- pvp | 126 | -- pvp |
127 | pvpCHead = 1301, -- pvp 跨服竞技场头像 | 127 | pvpCHead = 1301, -- pvp 跨服竞技场头像 |
128 | + crossPvpBet = 1302, -- 竞猜 | ||
128 | 129 | ||
129 | --adv | 130 | --adv |
130 | chooseEvent = 1351, -- 冒险选择 | 131 | chooseEvent = 1351, -- 冒险选择 |
src/models/RolePvp.lua
@@ -521,7 +521,7 @@ function Role:changeCrossServerPvpSelfInfo(cType) | @@ -521,7 +521,7 @@ function Role:changeCrossServerPvpSelfInfo(cType) | ||
521 | change[cType] = self:getProperty(cType) | 521 | change[cType] = self:getProperty(cType) |
522 | elseif cType == "format" then | 522 | elseif cType == "format" then |
523 | -- 是否过了时间 | 523 | -- 是否过了时间 |
524 | - local crossTime = skynet.timex() - self:getTimeResetStartTime(TimeReset.PvpCross) | 524 | + local crossTime = skynet.timex() - self:getTimeResetStartTime(TimeReset.PvpCross) + RESET_TIME * 3600 |
525 | local aday = 3600 * 24 | 525 | local aday = 3600 * 24 |
526 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 | 526 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 |
527 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 | 527 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 |
@@ -615,7 +615,7 @@ end | @@ -615,7 +615,7 @@ end | ||
615 | 615 | ||
616 | function Role:setCrossServerPvpBet(idx) | 616 | function Role:setCrossServerPvpBet(idx) |
617 | if not self:isTimeResetOpen(TimeReset.PvpCross) then return false , 1 end | 617 | if not self:isTimeResetOpen(TimeReset.PvpCross) then return false , 1 end |
618 | - local crossTime = skynet.timex() - self:getTimeResetStartTime(TimeReset.PvpCross) | 618 | + local crossTime = skynet.timex() - self:getTimeResetStartTime(TimeReset.PvpCross) + RESET_TIME * 3600 |
619 | local aday = 3600 * 24 | 619 | local aday = 3600 * 24 |
620 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 | 620 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 |
621 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 | 621 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 |
src/services/pvpd.lua
@@ -84,7 +84,7 @@ function CMD.updateRoleInfo(change) | @@ -84,7 +84,7 @@ function CMD.updateRoleInfo(change) | ||
84 | CMD.refreshRoleInfo(change) | 84 | CMD.refreshRoleInfo(change) |
85 | local pvpd = cluster.query("center", "pvpd") | 85 | local pvpd = cluster.query("center", "pvpd") |
86 | if pvpd then | 86 | if pvpd then |
87 | - pcall(cluster.call, "center", pvpd, "updateRoleInfo", change) | 87 | + pcall(cluster.send, "center", pvpd, "updateRoleInfo", change) |
88 | end | 88 | end |
89 | end | 89 | end |
90 | 90 | ||
@@ -92,7 +92,7 @@ local function getDayAndTime() | @@ -92,7 +92,7 @@ local function getDayAndTime() | ||
92 | local startTime = getStartTime() | 92 | local startTime = getStartTime() |
93 | local now = skynet.timex() | 93 | local now = skynet.timex() |
94 | 94 | ||
95 | - local crossTime = now - startTime | 95 | + local crossTime = now - startTime + RESET_TIME * 3600 |
96 | local aday = 3600 * 24 | 96 | local aday = 3600 * 24 |
97 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 | 97 | local day = math.ceil(crossTime / aday) -- 当前是第几个比赛日 |
98 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 | 98 | local ctime = crossTime % aday -- 当前在本天 经过多少时间 |