Commit 2c585b736d97b9c39a5ae124abb132718fdbb0a8

Authored by zhangqijia
1 parent 9a6d3ed3

del: 删除Hero_stickersConvertRpc协议,客户端使用的使用多选一礼包协议 Role_useSelectItemRpc = 134

Showing 2 changed files with 0 additions and 24 deletions   Show diff stats
src/ProtocolCode.lua
... ... @@ -120,7 +120,6 @@ actionCodes = {
120 120 Hero_setWishPoolRpc = 226,
121 121 Hero_changeSparkRpc = 227,
122 122 Hero_saveGeniusTreeRpc = 228,
123   - Hero_stickersConvertRpc = 229, --兑换英雄贴纸
124 123  
125 124 Hang_startRpc = 251,
126 125 Hang_checkRpc = 252,
... ...
src/actions/HeroAction.lua
... ... @@ -1412,27 +1412,4 @@ function _M.saveGeniusTreeRpc(agent, data)
1412 1412 return true
1413 1413 end
1414 1414  
1415   -function _M.stickersConvertRpc(agent, data)
1416   - local role = agent.role
1417   - local msg = MsgPack.unpack(data)
1418   - local itemId = msg.itemId
1419   - local heroType = msg.heroType -- heroId-300 举例 [泡泡]= {[heroType] = 120, [heroId]= 420}
1420   -
1421   - local itemData = csvdb["itemCsv"][itemId]
1422   - if not itemData then return 1 end
1423   -
1424   - local useEffect = itemData["use_effect"]:toNumMap()
1425   - if not useEffect[heroType] then return 2 end
1426   -
1427   - if not role:isHaveHero(heroType) then return 3 end
1428   -
1429   - local cost = {[itemId] = 1}
1430   - if not role:checkItemEnough(cost) then return 4 end
1431   - if not role:costItems({[heroType] = cost}, {log = {desc = "heroStickers"}}) then return 5 end
1432   - local reward, change = role:award({[heroType] = 1}, {log = {desc = "heroStickers"}})
1433   -
1434   - SendPacket(actionCodes.Hero_stickersConvertRpc, MsgPack.pack(role:packReward(reward, change)))
1435   - return true
1436   -end
1437   -
1438 1415 return _M
... ...