Commit 4906ebd2d2dcfdcfabd3a425cef2dff5b852da8c
1 parent
a1e08c9c
宝箱关副本结算异常
Showing
1 changed file
with
12 additions
and
3 deletions
 
Show diff stats
src/actions/HangAction.lua
| @@ -147,14 +147,23 @@ function _M.endBattleRpc(agent, data) | @@ -147,14 +147,23 @@ function _M.endBattleRpc(agent, data) | ||
| 147 | local role = agent.role | 147 | local role = agent.role | 
| 148 | local msg = MsgPack.unpack(data) | 148 | local msg = MsgPack.unpack(data) | 
| 149 | local hangInfo = role:getProperty("hangInfo") | 149 | local hangInfo = role:getProperty("hangInfo") | 
| 150 | - if not msg.key or msg.key ~= hangInfo.key then return end | 150 | + if not msg.key or msg.key ~= hangInfo.key then | 
| 151 | + return 1 | ||
| 152 | + end | ||
| 151 | local carbonId = msg.carbonId | 153 | local carbonId = msg.carbonId | 
| 152 | local carbonData = csvdb["idle_battleCsv"][carbonId] | 154 | local carbonData = csvdb["idle_battleCsv"][carbonId] | 
| 155 | + if not carbonData then | ||
| 156 | + return 2 | ||
| 157 | + end | ||
| 153 | if carbonData.main ~= 1 then | 158 | if carbonData.main ~= 1 then | 
| 154 | - if carbonId ~= hangInfo.carbonId then return end | 159 | + if carbonId ~= hangInfo.carbonId then | 
| 160 | + return 3 | ||
| 161 | + end | ||
| 155 | end | 162 | end | 
| 156 | local hangPass = role:getProperty("hangPass") | 163 | local hangPass = role:getProperty("hangPass") | 
| 157 | - if hangPass[hangInfo.carbonId] then return end | 164 | + if hangPass[carbonId] then | 
| 165 | + return 4 | ||
| 166 | + end | ||
| 158 | local reward | 167 | local reward | 
| 159 | if msg.starNum and msg.starNum > 0 then --win | 168 | if msg.starNum and msg.starNum > 0 then --win | 
| 160 | hangPass[carbonId] = 1 | 169 | hangPass[carbonId] = 1 |