Commit 74f2395ec0e444bd6ae43b01d4f1b2d6bf7d2521
Merge branch 'develop' of 120.26.43.151:wasteland/server into develop
Showing
7 changed files
with
38 additions
and
14 deletions
Show diff stats
src/actions/DinerAction.lua
| @@ -139,7 +139,11 @@ function _M.removeSellRpc( agent, data ) | @@ -139,7 +139,11 @@ function _M.removeSellRpc( agent, data ) | ||
| 139 | return 5 | 139 | return 5 |
| 140 | end | 140 | end |
| 141 | 141 | ||
| 142 | - local temp = role.dinerData:updateSell(slot) | 142 | + local temp = role.dinerData:updateSell(slot) or { |
| 143 | + deltaCount = 0, | ||
| 144 | + deltaTime = 0, | ||
| 145 | + lastCount = 0, | ||
| 146 | + } | ||
| 143 | local reward, change = {} | 147 | local reward, change = {} |
| 144 | local cost = dishData.material:toNumMap() | 148 | local cost = dishData.material:toNumMap() |
| 145 | for k, n in pairs(cost) do | 149 | for k, n in pairs(cost) do |
| @@ -171,7 +175,11 @@ function _M.getSellRewardRpc( agent, data ) | @@ -171,7 +175,11 @@ function _M.getSellRewardRpc( agent, data ) | ||
| 171 | 175 | ||
| 172 | local deltaTimes = {} | 176 | local deltaTimes = {} |
| 173 | for slot, _ in pairs(sells) do | 177 | for slot, _ in pairs(sells) do |
| 174 | - local temp = role.dinerData:updateSell(slot) | 178 | + local temp = role.dinerData:updateSell(slot) or { |
| 179 | + deltaCount = 0, | ||
| 180 | + deltaTime = 0, | ||
| 181 | + lastCount = 0, | ||
| 182 | + } | ||
| 175 | deltaTimes[slot] = temp.deltaTime | 183 | deltaTimes[slot] = temp.deltaTime |
| 176 | end | 184 | end |
| 177 | sells = json.decode(role.dinerData:getProperty("sells")) | 185 | sells = json.decode(role.dinerData:getProperty("sells")) |
src/actions/HeroAction.lua
| @@ -855,14 +855,17 @@ function _M.drawHeroRpc(agent, data) | @@ -855,14 +855,17 @@ function _M.drawHeroRpc(agent, data) | ||
| 855 | floorHeroCount = 0 | 855 | floorHeroCount = 0 |
| 856 | end | 856 | end |
| 857 | 857 | ||
| 858 | + local logReward = {} | ||
| 858 | if role:isHaveHero(itemData.id - ItemStartId.Hero) then | 859 | if role:isHaveHero(itemData.id - ItemStartId.Hero) then |
| 859 | local fragId = itemData.id - ItemStartId.Hero | 860 | local fragId = itemData.id - ItemStartId.Hero |
| 860 | local heroData = csvdb["unitCsv"][fragId] | 861 | local heroData = csvdb["unitCsv"][fragId] |
| 861 | local count = globalCsv.draw_unit_tofragment[heroData.rare] | 862 | local count = globalCsv.draw_unit_tofragment[heroData.rare] |
| 862 | role:award({[fragId] = count}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) | 863 | role:award({[fragId] = count}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) |
| 864 | + logReward[fragId] = (logReward[fragId] or 0) + count | ||
| 863 | table.insert(reward, {id = fragId, count = count, from = itemId, fcount = 1}) | 865 | table.insert(reward, {id = fragId, count = count, from = itemId, fcount = 1}) |
| 864 | else | 866 | else |
| 865 | role:award({[itemId] = 1}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) | 867 | role:award({[itemId] = 1}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) |
| 868 | + logReward[itemId] = (logReward[itemId] or 0) + 1 | ||
| 866 | table.insert(reward, {id = itemId, count = 1}) | 869 | table.insert(reward, {id = itemId, count = 1}) |
| 867 | end | 870 | end |
| 868 | end | 871 | end |
| @@ -884,14 +887,15 @@ function _M.drawHeroRpc(agent, data) | @@ -884,14 +887,15 @@ function _M.drawHeroRpc(agent, data) | ||
| 884 | role:checkTaskEnter("DrawSSR", {count = ssrCount}) | 887 | role:checkTaskEnter("DrawSSR", {count = ssrCount}) |
| 885 | end | 888 | end |
| 886 | role:finishGuide(11) | 889 | role:finishGuide(11) |
| 887 | - | 890 | + |
| 888 | role:log("gacha", { | 891 | role:log("gacha", { |
| 889 | gacha_id = poolId, -- 卡池ID | 892 | gacha_id = poolId, -- 卡池ID |
| 890 | gacha_type = btype, -- 卡池类型 | 893 | gacha_type = btype, -- 卡池类型 |
| 891 | gacha_up = 0, -- 卡池UP角色 | 894 | gacha_up = 0, -- 卡池UP角色 |
| 892 | gacha_times = drawCount[drawType], -- 抽卡次数 | 895 | gacha_times = drawCount[drawType], -- 抽卡次数 |
| 893 | - gacha_reward = reward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 896 | + gacha_reward = logReward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
| 894 | currency = cost, -- 购买道具消耗的货币 | 897 | currency = cost, -- 购买道具消耗的货币 |
| 898 | + gacha_cnt = floorHeroCount, | ||
| 895 | }) | 899 | }) |
| 896 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 | 900 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 |
| 897 | return true | 901 | return true |
src/adv/Adv.lua
| @@ -790,8 +790,8 @@ function Adv:over(success, rewardRatio, overType) | @@ -790,8 +790,8 @@ function Adv:over(success, rewardRatio, overType) | ||
| 790 | end) | 790 | end) |
| 791 | end | 791 | end |
| 792 | -- 通关的时候要把引导步骤设定到成就引导 | 792 | -- 通关的时候要把引导步骤设定到成就引导 |
| 793 | - if not role:checkOverGuide(57) then | ||
| 794 | - role:saveGuide(57,1,true) | 793 | + if not self.owner:checkOverGuide(57) then |
| 794 | + self.owner:saveGuide(57,1,true) | ||
| 795 | end | 795 | end |
| 796 | end | 796 | end |
| 797 | self:clearAdvUnlockCache() | 797 | self:clearAdvUnlockCache() |
src/adv/AdvTask.lua
| @@ -132,10 +132,21 @@ function AdvTask.bind(Adv) | @@ -132,10 +132,21 @@ function AdvTask.bind(Adv) | ||
| 132 | end | 132 | end |
| 133 | local advEventOpenStatus = self.owner:advEventOpenStatus() | 133 | local advEventOpenStatus = self.owner:advEventOpenStatus() |
| 134 | local pool = {} | 134 | local pool = {} |
| 135 | - for id, data in pairs(csvdb["event_questCsv"]) do | ||
| 136 | - if data.levelchapter == chapterId and (data.unlockType == 0 or (advEventOpenStatus[etype] or {})[data.unlockType]) then | ||
| 137 | - if AdvCommon.checkIsIn(level, data.leveltype, data.levellimit) then | ||
| 138 | - pool[id] = {showup = data.showup} | 135 | + |
| 136 | + local mapData = self:getCurMap():getMapInfoCsv() | ||
| 137 | + for _, id in ipairs(mapData.quest:toArray(true, "=")) do | ||
| 138 | + local data = csvdb["event_questCsv"][taskId] | ||
| 139 | + if data then | ||
| 140 | + pool[id] = {showup = data.showup} | ||
| 141 | + end | ||
| 142 | + end | ||
| 143 | + | ||
| 144 | + if not next(pool) then | ||
| 145 | + for id, data in pairs(csvdb["event_questCsv"]) do | ||
| 146 | + if data.levelchapter == chapterId and (data.unlockType == 0 or (advEventOpenStatus[etype] or {})[data.unlockType]) then | ||
| 147 | + if AdvCommon.checkIsIn(level, data.leveltype, data.levellimit) then | ||
| 148 | + pool[id] = {showup = data.showup} | ||
| 149 | + end | ||
| 139 | end | 150 | end |
| 140 | end | 151 | end |
| 141 | end | 152 | end |
src/models/Activity.lua
| @@ -395,7 +395,7 @@ end | @@ -395,7 +395,7 @@ end | ||
| 395 | 395 | ||
| 396 | -- 付费签到可领奖励 | 396 | -- 付费签到可领奖励 |
| 397 | function Activity:getPaySignReward() | 397 | function Activity:getPaySignReward() |
| 398 | - local actGoodsFlag = self.storeData:getProperty("actGoodsFlag") | 398 | + local actGoodsFlag = self.owner.storeData:getProperty("actGoodsFlag") |
| 399 | local index = GetActGoodsIndex("paySignIn") | 399 | local index = GetActGoodsIndex("paySignIn") |
| 400 | local flag = actGoodsFlag[index] or 0 | 400 | local flag = actGoodsFlag[index] or 0 |
| 401 | if flag == 0 then return {} end | 401 | if flag == 0 then return {} end |
src/models/RoleBattle.lua
| @@ -80,7 +80,7 @@ function Role:checkBattle(battleType, params) | @@ -80,7 +80,7 @@ function Role:checkBattle(battleType, params) | ||
| 80 | for slot , one in pairs(self:getTeamBattleInfo(bTeam).supports) do | 80 | for slot , one in pairs(self:getTeamBattleInfo(bTeam).supports) do |
| 81 | teamskill[one[1]] = one[2] | 81 | teamskill[one[1]] = one[2] |
| 82 | end | 82 | end |
| 83 | - local carbonData = csvdb["tower_battleCsv"][params.id] | 83 | + local carbonData = csvdb["bonus_battleCsv"][params.id] |
| 84 | local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | 84 | local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] |
| 85 | for slot, one in pairs(monsterData[1]) do | 85 | for slot, one in pairs(monsterData[1]) do |
| 86 | enemylist[#enemylist + 1] = one["unitType"] | 86 | enemylist[#enemylist + 1] = one["unitType"] |
| @@ -97,7 +97,7 @@ function Role:checkBattle(battleType, params) | @@ -97,7 +97,7 @@ function Role:checkBattle(battleType, params) | ||
| 97 | if params.robotId then | 97 | if params.robotId then |
| 98 | local carbonData = csvdb["pvp_robotCsv"][params.robotId] | 98 | local carbonData = csvdb["pvp_robotCsv"][params.robotId] |
| 99 | local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | 99 | local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] |
| 100 | - for slot, one in pairs(monsterData[1]) do | 100 | + for slot, one in pairs(monsterData) do |
| 101 | enemylist[#enemylist + 1] = one["unitType"] | 101 | enemylist[#enemylist + 1] = one["unitType"] |
| 102 | end | 102 | end |
| 103 | else | 103 | else |
| @@ -127,7 +127,7 @@ function Role:checkBattle(battleType, params) | @@ -127,7 +127,7 @@ function Role:checkBattle(battleType, params) | ||
| 127 | for idx = 1, 3 do | 127 | for idx = 1, 3 do |
| 128 | enemylist[idx] = enemylist[idx] or {} | 128 | enemylist[idx] = enemylist[idx] or {} |
| 129 | local monsterData = csvdb[carbonData["monster" .. idx]:match("/([^/]*)$") .. "Csv"] | 129 | local monsterData = csvdb[carbonData["monster" .. idx]:match("/([^/]*)$") .. "Csv"] |
| 130 | - for slot, one in pairs(monsterData[1]) do | 130 | + for slot, one in pairs(monsterData) do |
| 131 | enemylist[idx][#enemylist + 1] = one["unitType"] | 131 | enemylist[idx][#enemylist + 1] = one["unitType"] |
| 132 | end | 132 | end |
| 133 | end | 133 | end |
src/models/RoleLog.lua
| @@ -266,6 +266,7 @@ local MethodType = { | @@ -266,6 +266,7 @@ local MethodType = { | ||
| 266 | gacha_times = true, -- 抽卡次数 | 266 | gacha_times = true, -- 抽卡次数 |
| 267 | gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 267 | gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
| 268 | currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 268 | currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
| 269 | + gacha_cnt = true, -- 保底计数 | ||
| 269 | }, | 270 | }, |
| 270 | equip_wear = { --装备穿戴与卸载 | 271 | equip_wear = { --装备穿戴与卸载 |
| 271 | hero_id = true, --英雄ID | 272 | hero_id = true, --英雄ID |