|
@@ -27,11 +27,49 @@ class FightProc {
|
|
return FightProc::PassGateTsPrizeReceive();
|
|
return FightProc::PassGateTsPrizeReceive();
|
|
case CmdCode::cmd_fight_selectGate: # 6803 关卡选择
|
|
case CmdCode::cmd_fight_selectGate: # 6803 关卡选择
|
|
return FightProc::SelectGate();
|
|
return FightProc::SelectGate();
|
|
|
|
+ case CmdCode::cmd_fight_gateChallengePriceReviced: # 6804
|
|
|
|
+ return FightProc::GateChallengePriceReviced();
|
|
default:
|
|
default:
|
|
Err(ErrCode::cmd_err);
|
|
Err(ErrCode::cmd_err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 挑战奖励领取
|
|
|
|
+ * @return type
|
|
|
|
+ */
|
|
|
|
+ public static function GateChallengePriceReviced() {
|
|
|
|
+ list($zhangjieId, $gateId) = req()->paras;
|
|
|
|
+
|
|
|
|
+ $mo = GameConfig::gate_challenge_getItem($zhangjieId);
|
|
|
|
+ my_Assert($mo!=null, ErrCode::err_const_no);
|
|
|
|
+
|
|
|
|
+// $list = explode(',', $mo->gates);
|
|
|
|
+// my_Assert(in_array($gateId,$list), ErrCode::err_const_no);
|
|
|
|
+
|
|
|
|
+ $gateMo = GameConfig::gate_getItem($gateId);
|
|
|
|
+ my_Assert($gateMo!=null, ErrCode::err_const_no);
|
|
|
|
+
|
|
|
|
+ if(!StlUtil::dictHasProperty(ctx()->gates->GatesChallengeRecord, $zhangjieId)){
|
|
|
|
+ ctx()->gates->GatesChallengeRecord->$zhangjieId = array();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ my_Assert(!in_array($gateId,ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::user_Gate_GatePriceHasReceive);
|
|
|
|
+ ctx()->gates->GatesChallengeRecord->$zhangjieId[] = $gateId;
|
|
|
|
+
|
|
|
|
+ StoreProc::AddMultiItemInStore($gateMo->reward_win);
|
|
|
|
+
|
|
|
|
+ ctx()->gates->CurrentGateId = $gateId;
|
|
|
|
+
|
|
|
|
+ UserProc::updateUserInfo();
|
|
|
|
+ $ret = array(
|
|
|
|
+ 'store' => ctx()->store,
|
|
|
|
+ 'gates' => ctx()->gates,
|
|
|
|
+ );
|
|
|
|
+ return Resp::ok($ret);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 关卡选择
|
|
* 关卡选择
|
|
* @return type
|
|
* @return type
|