Commit 1976004ff9ebdd253e26dc744e1c3d19c1bf9735
1 parent
b9659961
测试
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
src/actions/HeroAction.lua
@@ -717,18 +717,18 @@ function _M.drawHeroRpc(agent, data) | @@ -717,18 +717,18 @@ function _M.drawHeroRpc(agent, data) | ||
717 | local drawType = msg.type -- 1 单抽 2 十连 | 717 | local drawType = msg.type -- 1 单抽 2 十连 |
718 | 718 | ||
719 | local buildTypeData = csvdb["build_typeCsv"][pool] | 719 | local buildTypeData = csvdb["build_typeCsv"][pool] |
720 | - if not buildTypeData then return end | 720 | + if not buildTypeData then return 1 end |
721 | 721 | ||
722 | local costs = {{"draw_card", "draw_coin"}, {"draw10_card", "draw10_coin"}} -- 抽取消耗 | 722 | local costs = {{"draw_card", "draw_coin"}, {"draw10_card", "draw10_coin"}} -- 抽取消耗 |
723 | local drawCount = {1, 10} -- 抽取次数 | 723 | local drawCount = {1, 10} -- 抽取次数 |
724 | 724 | ||
725 | local costT = costs[drawType] | 725 | local costT = costs[drawType] |
726 | - if not costT then return end | 726 | + if not costT then return 2 end |
727 | local cost = buildTypeData[costT[1]]:toNumMap() | 727 | local cost = buildTypeData[costT[1]]:toNumMap() |
728 | if not role:checkItemEnough(cost) then | 728 | if not role:checkItemEnough(cost) then |
729 | cost = buildTypeData[costT[2]]:toNumMap() | 729 | cost = buildTypeData[costT[2]]:toNumMap() |
730 | if not role:checkItemEnough(cost) then | 730 | if not role:checkItemEnough(cost) then |
731 | - return | 731 | + return 3 |
732 | end | 732 | end |
733 | end | 733 | end |
734 | 734 | ||
@@ -778,9 +778,9 @@ function _M.drawHeroRpc(agent, data) | @@ -778,9 +778,9 @@ function _M.drawHeroRpc(agent, data) | ||
778 | end, | 778 | end, |
779 | } | 779 | } |
780 | 780 | ||
781 | - if not fillPoolFunc[rateTypes[rateType]] then return end | 781 | + if not fillPoolFunc[rateTypes[rateType]] then return 4 end |
782 | fillPoolFunc[rateTypes[rateType]]() | 782 | fillPoolFunc[rateTypes[rateType]]() |
783 | - if not next(resultPool) then return end | 783 | + if not next(resultPool) then return 5 end |
784 | role:costItems(cost) | 784 | role:costItems(cost) |
785 | 785 | ||
786 | local reward = {} | 786 | local reward = {} |