|
@@ -128,14 +128,27 @@ class FightProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6808 主线关卡: 开始挑战 (扣除体力)
|
|
|
+ * 6808 开始挑战 (主线关卡:扣除体力, 挑战关卡: 增加次数)
|
|
|
*/
|
|
|
private static function StartFight() {
|
|
|
list($gateId) = req()->paras;
|
|
|
my_Assert($gateId > 0, ErrCode::paras_err);
|
|
|
$mo = GameConfig::gate_getItem($gateId);
|
|
|
my_Assert(null != $mo, ErrCode::err_const_no);
|
|
|
- my_Assert(ctx()->base()->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
|
|
|
+
|
|
|
+ if (Ints::Slice($gateId, 0, 1) == 9) { # 爬塔模式
|
|
|
+ list($layerNum) = req()->paras;
|
|
|
+ if ($layerNum != ctx()->gates()->TowerGateInfo()->CurLayer) { # 起始层数校验
|
|
|
+ Err(ErrCode::tower_layerNum);
|
|
|
+ }
|
|
|
+ if (ctx()->gates()->TowerGateInfo()->TodayChanNum > glc()->tower_daily_chanceNum) { # 剩余次数校验
|
|
|
+ Err(ErrCode::tower_timeNo);
|
|
|
+ }
|
|
|
+ ctx()->gates()->TowerGateInfo()->TodayChanNum++; # 增加次数
|
|
|
+ } else { # 主线剧情
|
|
|
+ my_Assert(ctx()->base()->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
|
|
|
+ }
|
|
|
+ UserProc::updateUserInfo();
|
|
|
return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));
|
|
|
}
|
|
|
|
|
@@ -365,8 +378,9 @@ class FightProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6805 挑战关卡: 开始挑战(扣除次数)
|
|
|
+ * 6805
|
|
|
* @return type
|
|
|
+ * @deprecated since version 2024年5月17日
|
|
|
*/
|
|
|
public static function ChallengeGateStartFight() {
|
|
|
list($layerNum) = req()->paras;
|