|
@@ -255,7 +255,7 @@ class FightProc {
|
|
*/
|
|
*/
|
|
public static function FightSweep() {
|
|
public static function FightSweep() {
|
|
//list($gateId) = req()->paras;
|
|
//list($gateId) = req()->paras;
|
|
-// 2024.12.17 扫荡修改: 前3次免费, 后面可以一直看广告免费.
|
|
|
|
|
|
+// 2024.12.17 扫荡修改: 前3次免费, 后面可以一直看广告免费.(特权月卡可以免广告, 结合到一起, 特权月卡就可以一直刷了.)
|
|
|
|
|
|
$passGateId = ctx()->gates->maxPassGateId(); # 最高通关关卡id
|
|
$passGateId = ctx()->gates->maxPassGateId(); # 最高通关关卡id
|
|
my_Assert($passGateId != 0, ErrCode::gate_NoSweep); # 还没有通关关卡
|
|
my_Assert($passGateId != 0, ErrCode::gate_NoSweep); # 还没有通关关卡
|
|
@@ -270,7 +270,11 @@ class FightProc {
|
|
// $max = glc()->sweepMaxNum;
|
|
// $max = glc()->sweepMaxNum;
|
|
// my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::gate_SweepMaxNum_limit);
|
|
// my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::gate_SweepMaxNum_limit);
|
|
// }
|
|
// }
|
|
- ctx()->gates->fightSweepTs = now(60); # 下次扫荡时间戳
|
|
|
|
|
|
+ if (ctx()->gates->fightSweepNum <= glc()->sweepMaxNum) {
|
|
|
|
+ ctx()->gates->fightSweepTs = now(); # 前三次无冷却
|
|
|
|
+ } else {
|
|
|
|
+ ctx()->gates->fightSweepTs = now(60); # 下次扫荡时间戳(广告时需要间隔)
|
|
|
|
+ }
|
|
ctx()->gates->fightSweepNum += 1; # 增加扫荡次数记录
|
|
ctx()->gates->fightSweepNum += 1; # 增加扫荡次数记录
|
|
ctx()->baseInfo->Consume_tili($costTili); # 扣除体力
|
|
ctx()->baseInfo->Consume_tili($costTili); # 扣除体力
|
|
ctx()->privateData(true)->battlePass_tili += $costTili; # 增加体力消耗记录
|
|
ctx()->privateData(true)->battlePass_tili += $costTili; # 增加体力消耗记录
|