|
@@ -44,12 +44,12 @@ class FightProc {
|
|
|
*/
|
|
|
public static function FightSweep() {
|
|
|
//list($gateId) = req()->paras;
|
|
|
- my_Assert(ctx()->gates->UnlockedGatesMaxId != 0, ErrCode::user_Gate_NoSweep);
|
|
|
+ my_Assert(ctx()->gates->UnlockedGatesMaxId != 0, ErrCode::gate_NoSweep);
|
|
|
$mo = GameConfig::gate_getItem(ctx()->gates->UnlockedGatesMaxId);
|
|
|
$costTili = glc()->sweep_cost_tili;
|
|
|
my_Assert(ctx()->baseInfo->tili >= $costTili, ErrCode::notenough_tili);
|
|
|
$max = glc()->sweepMaxNum;
|
|
|
- my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::user_Gate_SweepMaxNum_limit);
|
|
|
+ my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::gate_SweepMaxNum_limit);
|
|
|
ctx()->gates->fightSweepNum += 1;
|
|
|
ctx()->baseInfo->Consume_tili($costTili);
|
|
|
$prizeArr = array();
|
|
@@ -321,7 +321,13 @@ class FightProc {
|
|
|
* 6809 挑战关卡: 刷新初始技能(扣除免费次数/cost)
|
|
|
*/
|
|
|
public static function TowerRefreshSkills() {
|
|
|
+ list($isFree) = req()->paras; # 参数解析
|
|
|
+ if ($isFree) {
|
|
|
+// if()
|
|
|
+ } else {
|
|
|
|
|
|
+ }
|
|
|
+ return Resp::ok();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -329,14 +335,12 @@ class FightProc {
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function ChallengeGateStartFight() {
|
|
|
- list($type, $id) = req()->paras;
|
|
|
-
|
|
|
+ if (ctx()->gates()->TowerGateInfo()->TodayChanNum > glc()->tower_daily_chanceNum) {
|
|
|
+ return Resp::err(ErrCode::tower_timeNo);
|
|
|
+ }
|
|
|
+ ctx()->gates()->TowerGateInfo()->TodayChanNum++;
|
|
|
UserProc::updateUserInfo();
|
|
|
- $ret = array(
|
|
|
- 'store' => ctx()->store,
|
|
|
- 'gates' => ctx()->gates,
|
|
|
- );
|
|
|
- return Resp::ok($ret);
|
|
|
+ return Resp::ok();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -344,23 +348,23 @@ class FightProc {
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function GateChallengePriceReviced() {
|
|
|
- list($zhangjieId, $gateId) = req()->paras;
|
|
|
-
|
|
|
- $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);
|
|
|
- my_Assert(in_array($gateMo->challengeUnlockId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::user_Gate_GateNoUnlock);
|
|
|
-
|
|
|
- ctx()->gates->GatesChallengeRecord->$zhangjieId[] = $gateId;
|
|
|
-
|
|
|
- StoreProc::AddMultiItemInStore($gateMo->reward_win);
|
|
|
-
|
|
|
- ctx()->gates->CurrentGateId = $gateId;
|
|
|
+// list($zhangjieId, $gateId) = req()->paras;
|
|
|
+//
|
|
|
+// $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::gate_GatePriceHasReceive);
|
|
|
+// my_Assert(in_array($gateMo->challengeUnlockId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::gate_GateNoUnlock);
|
|
|
+//
|
|
|
+// ctx()->gates->GatesChallengeRecord->$zhangjieId[] = $gateId;
|
|
|
+//
|
|
|
+// StoreProc::AddMultiItemInStore($gateMo->reward_win);
|
|
|
+//
|
|
|
+// ctx()->gates->CurrentGateId = $gateId;
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
|
$ret = array(
|
|
@@ -396,7 +400,7 @@ class FightProc {
|
|
|
$gateMo = GameConfig::gate_getItem($gateId);
|
|
|
my_Assert($gateMo != null, ErrCode::err_const_no);
|
|
|
|
|
|
- my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
|
|
|
+ my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
|
|
|
$gateInfo = ctx()->gates->GateList->$gateId;
|
|
|
|
|
|
$tag = false;
|
|
@@ -431,7 +435,7 @@ class FightProc {
|
|
|
}
|
|
|
|
|
|
if ($tag) {
|
|
|
- my_Assert($mask > $gateInfo->FirstReward, ErrCode::user_Gate_GatePriceHasReceive);
|
|
|
+ my_Assert($mask > $gateInfo->FirstReward, ErrCode::gate_GatePriceHasReceive);
|
|
|
$gateInfo->FirstReward = $mask;
|
|
|
StoreProc::AddMultiItemInStore($prize);
|
|
|
}
|
|
@@ -453,7 +457,7 @@ class FightProc {
|
|
|
list($resultType, $gateId, $gold, $curTs, $pickups) = req()->paras;
|
|
|
$gateMo = GameConfig::gate_getItem($gateId);
|
|
|
my_Assert($gateMo != null, ErrCode::err_const_no);
|
|
|
- my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
|
|
|
+ my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
|
|
|
$gateInfo = ctx()->gates->GateList->$gateId;
|
|
|
$ts = $gateInfo->MaxSeconds;
|
|
|
if ($curTs >= $ts) {
|