Commit 718bafee5e1b60a28de5b8d41f77ec2d7aab33e9
Merge branch 'cn/develop' into cn/publish/release
* cn/develop: 神稀扣门票逻辑修改
Showing
1 changed file
with
8 additions
and
10 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -605,6 +605,8 @@ function _M.startBattleRpc(agent, data) | @@ -605,6 +605,8 @@ function _M.startBattleRpc(agent, data) | ||
605 | end | 605 | end |
606 | end | 606 | end |
607 | num = num * count | 607 | num = num * count |
608 | + else | ||
609 | + num = 0 | ||
608 | end | 610 | end |
609 | if ticket < num then | 611 | if ticket < num then |
610 | return 6 | 612 | return 6 |
@@ -799,18 +801,14 @@ function _M.endBattleRpc(agent, data) | @@ -799,18 +801,14 @@ function _M.endBattleRpc(agent, data) | ||
799 | if newStarNum > oldStarNum then | 801 | if newStarNum > oldStarNum then |
800 | battleInfo["star"] = curStar | 802 | battleInfo["star"] = curStar |
801 | end | 803 | end |
802 | - if battleCfg.type ~= "" then | ||
803 | - -- 消耗门票 | ||
804 | - role.activity:getBattleTicket(actid) | ||
805 | - local num = battleCfg.type:toArray(true, "=")[3] | ||
806 | - actData["ticket"] = math.max(actData["ticket"] - num, 0) | ||
807 | - end | ||
808 | 804 | ||
809 | if battleCfg.rank ~= 0 and isWin then | 805 | if battleCfg.rank ~= 0 and isWin then |
810 | - -- 消耗门票 | ||
811 | - --role.activity:getBattleTicket(actid) | ||
812 | - --local num = battleCfg.type:toArray(true, "=")[3] | ||
813 | - --actData["ticket"] = math.max(actData["ticket"] - num, 0) | 806 | + if battleCfg.type ~= "" then |
807 | + -- 消耗门票 | ||
808 | + role.activity:getBattleTicket(actid) | ||
809 | + local num = battleCfg.type:toArray(true, "=")[3] | ||
810 | + actData["ticket"] = math.max(actData["ticket"] - num, 0) | ||
811 | + end | ||
814 | 812 | ||
815 | -- 更新排行榜 最高伤害 | 813 | -- 更新排行榜 最高伤害 |
816 | battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) | 814 | battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) |