|
@@ -26,14 +26,32 @@ class FightProc {
|
|
|
return FightProc::EvolveUnlock();
|
|
|
case CmdCode::cmd_fight_plotSav: # 6806 剧情回存
|
|
|
return FightProc::PlotSav();
|
|
|
- case CmdCode::cmd_fight_xunluoPrizeReceived: #6807 巡逻奖励领取
|
|
|
- return FightProc::XunluoPrizeReceived();
|
|
|
+ case CmdCode::cmd_fight_sweep: #6807
|
|
|
+ return FightProc::FightSweep();
|
|
|
case CmdCode::fight_startFight: # 6808 开始挑战
|
|
|
return self::StartFight();
|
|
|
default:
|
|
|
Err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public static function FightSweep() {
|
|
|
+ //list($gateId) = req()->paras;
|
|
|
+
|
|
|
+ $costTili = GameConfig::gate_getItem(ctx()->gates->UnlockedGatesMaxId)->sweep_cost_tili;
|
|
|
+ my_Assert(ctx()->baseInfo->tili >= $costTili, ErrCode::notenough_tili);
|
|
|
+ $max = GameConfig::gate_getItem(ctx()->gates->UnlockedGatesMaxId)->sweepNum;
|
|
|
+ my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::user_Gate_sweepMaxNum_limit);
|
|
|
+ ctx()->gates->fightSweepNum += 1;
|
|
|
+
|
|
|
+ UserProc::updateUserInfo();
|
|
|
+ $ret = array(
|
|
|
+ 'tili' => ctx()->baseInfo->tili,
|
|
|
+ 'fightSweepNum'=>ctx()->gates->fightSweepNum,
|
|
|
+ 'store' => ctx()->store,
|
|
|
+ );
|
|
|
+ return Resp::ok($ret);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 6808 开始挑战 (扣除体力)
|
|
@@ -48,7 +66,7 @@ class FightProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6807 巡逻奖励领取
|
|
|
+ * 6807 巡逻奖励领取 废弃
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function XunluoPrizeReceived() {
|