Commit ec2d5c9dd3d771c44d0d5ca67658fbc26710f3e8

Authored by jiyue
2 parents eb7ce1e7 d85ecb3f

Merge branch 'cn/develop' into cn/publish/preview

Showing 1 changed file with 9 additions and 3 deletions   Show diff stats
src/actions/ActivityAction.lua
@@ -799,12 +799,18 @@ function _M.endBattleRpc(agent, data) @@ -799,12 +799,18 @@ function _M.endBattleRpc(agent, data)
799 if newStarNum > oldStarNum then 799 if newStarNum > oldStarNum then
800 battleInfo["star"] = curStar 800 battleInfo["star"] = curStar
801 end 801 end
802 -  
803 - if battleCfg.rank ~= 0 and isWin then 802 + if battleCfg.type ~= "" then
804 -- 消耗门票 803 -- 消耗门票
805 role.activity:getBattleTicket(actid) 804 role.activity:getBattleTicket(actid)
806 local num = battleCfg.type:toArray(true, "=")[3] 805 local num = battleCfg.type:toArray(true, "=")[3]
807 actData["ticket"] = math.max(actData["ticket"] - num, 0) 806 actData["ticket"] = math.max(actData["ticket"] - num, 0)
  807 + end
  808 +
  809 + 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)
808 814
809 -- 更新排行榜 最高伤害 815 -- 更新排行榜 最高伤害
810 battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) 816 battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg)
@@ -1486,7 +1492,7 @@ function _M.buyBattleTicketRpc(agent, data) @@ -1486,7 +1492,7 @@ function _M.buyBattleTicketRpc(agent, data)
1486 end 1492 end
1487 local cost = globalCsv.activity_scrofa_tickets[curCount + 1] 1493 local cost = globalCsv.activity_scrofa_tickets[curCount + 1]
1488 if not role:checkItemEnough({[ItemId.Jade] = cost}) then return 3 end 1494 if not role:checkItemEnough({[ItemId.Jade] = cost}) then return 3 end
1489 - role:costItems({[ItemId.Jade] = cost}, {log = {desc = "buyActivityBattleTicket", int1 = actid, int2 = count, cint1 = curCount}}) 1495 + role:costItems({[ItemId.Jade] = cost}, {log = {desc = "buyActivityBattleTicket", int1 = actid, int2 = count, long1 = curCount}})
1490 actData["ticket"] = (actData["ticket"] or 0) + 1 1496 actData["ticket"] = (actData["ticket"] or 0) + 1
1491 actData["buyC"] = curCount + count 1497 actData["buyC"] = curCount + count
1492 1498