Commit acdaca24dbb3a94fced8349424d4e6257fee58ff
1 parent
06562145
获取宝藏关卡时,处理返回值是nil的情况
Showing
2 changed files
with
1 additions
and
2 deletions
Show diff stats
src/actions/HangAction.lua
@@ -127,7 +127,7 @@ local function checkReward(role, isTreasure) | @@ -127,7 +127,7 @@ local function checkReward(role, isTreasure) | ||
127 | 127 | ||
128 | --挂机得到的宝藏加入到挂机奖励 | 128 | --挂机得到的宝藏加入到挂机奖励 |
129 | if isTreasure or false == true then | 129 | if isTreasure or false == true then |
130 | - local treasureList= role.dailyData:checkTreasureList(hangInfo.carbonId) | 130 | + local treasureList= role.dailyData:checkTreasureList(hangInfo.carbonId) or {} |
131 | if next(treasureList) ~= nil then | 131 | if next(treasureList) ~= nil then |
132 | for id, val in pairs(treasureList) do | 132 | for id, val in pairs(treasureList) do |
133 | local award = val.award:toNumMap() | 133 | local award = val.award:toNumMap() |
src/models/RoleBattle.lua
@@ -197,7 +197,6 @@ function Role:checkBattle(battleType, params) | @@ -197,7 +197,6 @@ function Role:checkBattle(battleType, params) | ||
197 | 197 | ||
198 | local fixData = { | 198 | local fixData = { |
199 | hang = function() | 199 | hang = function() |
200 | - dump(self:getProperty("hangTS")) | ||
201 | for slot, hero in pairs(self:getProperty("hangTS").heros) do | 200 | for slot, hero in pairs(self:getProperty("hangTS").heros) do |
202 | selflist[slot] = hero.type | 201 | selflist[slot] = hero.type |
203 | end | 202 | end |