|
@@ -57,23 +57,23 @@ class FightProc {
|
|
|
return self::MainTZPass();
|
|
|
case CmdCode::fight_MainTZGetReward: # 6820 主线挑战--领取奖励
|
|
|
return self::MainTZGetReward();
|
|
|
- case CmdCode::fight_ResetChallange_RedMask: # 6821 每天重置挑战红点
|
|
|
- return self::ResetChallange_RedMask();
|
|
|
+ case CmdCode::fight_ResetChallange_RedMask: # 6821 每天重置挑战红点
|
|
|
+ return self::ResetChallange_RedMask();
|
|
|
default:
|
|
|
Err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
- * 6821 每天重置挑战红点
|
|
|
+ * 6821 每天重置挑战红点
|
|
|
*/
|
|
|
static function ResetChallange_RedMask() {
|
|
|
-
|
|
|
+
|
|
|
ctx()->privateState->challange_RedMask = 1;
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 6819 主线挑战 -- 通关
|
|
|
*/
|
|
@@ -85,12 +85,12 @@ class FightProc {
|
|
|
my_Assert($gateInfo->pass, ErrCode::gate_GateNoUnlock); # 通关后解锁难度1
|
|
|
my_Assert($gateInfo->tz_state + 1 >= $index, ErrCode::gate_GateNoUnlock); # 通关上一难度解锁当前难度
|
|
|
$gateInfo->tz_state = $index;
|
|
|
-
|
|
|
+
|
|
|
TaskProc::OnPassMainChallengeGate_X_Num($gateId, $index);
|
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
|
UserProc::updateUserInfo();
|
|
|
- return Resp::ok(array("task"=> ctx()->task,));
|
|
|
+ return Resp::ok(array("task" => ctx()->task,));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -105,8 +105,8 @@ class FightProc {
|
|
|
my_Assert($gateInfo->tz_state >= $index, ErrCode::gate_GateNoUnlock); # 已解锁当前难度
|
|
|
my_Assert(Bits::GetBitValue($gateInfo->tz_rewards, $index - 1) == false, ErrCode::gate_GatePriceHasReceive);
|
|
|
$gateInfo->tz_rewards = Bits::SetBitValue($gateInfo->tz_rewards, $index - 1, true); # 更新领取记录
|
|
|
-
|
|
|
- $prize = "tz_reward".$index;
|
|
|
+
|
|
|
+ $prize = "tz_reward" . $index;
|
|
|
$mo = GameConfig::gate_getItem($gateId);
|
|
|
StoreProc::AddMultiItemInStore($mo->$prize);
|
|
|
UserProc::updateUserInfo();
|
|
@@ -131,7 +131,7 @@ class FightProc {
|
|
|
|
|
|
ctx()->baseInfo->Consume_Gold($mo->needGold_unlock);
|
|
|
ctx()->gates->evolveMaxId_left = $nextId;
|
|
|
-
|
|
|
+
|
|
|
TaskProc::OnCompleteNumQiLing();
|
|
|
} else {
|
|
|
$nextId = ctx()->gates->evolveMaxId_right + 1;
|
|
@@ -159,7 +159,7 @@ class FightProc {
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
|
$ret = array(
|
|
|
- 'task'=> ctx()->task,
|
|
|
+ 'task' => ctx()->task,
|
|
|
'gold' => ctx()->baseInfo->gold,
|
|
|
'items' => ctx()->store->items,
|
|
|
'evolveMaxId_right' => ctx()->gates->evolveMaxId_right,
|
|
@@ -340,8 +340,8 @@ class FightProc {
|
|
|
ctx()->gates->fightSweepNum = 0;
|
|
|
ctx()->gates()->TowerGateInfo()->RefreshSkillTimes = 0;
|
|
|
ctx()->gates()->TowerGateInfo()->TodayChanNum = glc()->tower_daily_chanceNum;
|
|
|
-
|
|
|
- ctx()->privateState->challange_RedMask = 0;
|
|
|
+
|
|
|
+ ctx()->privateState->challange_RedMask = 0;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -558,7 +558,8 @@ class FightProc {
|
|
|
*/
|
|
|
public static function Settle() {
|
|
|
list($resultType, $gateId, $gold, $curTs, $pickups,
|
|
|
- $finalLayer, $finalHpPercent, $killMonsterNum, $killBossNum) = req()->paras;
|
|
|
+ $finalLayer, $finalHpPercent, $killMonsterNum, $killBossNum,
|
|
|
+ $finalLevel, $reliveNum) = req()->paras;
|
|
|
# 客户端需要增加参数: killmonserNum,killBosssNum, finalHpPercent(最终血量百分比)
|
|
|
$gateMo = GameConfig::gate_getItem($gateId);
|
|
|
my_Assert($gateMo != null, ErrCode::err_const_no);
|
|
@@ -668,7 +669,7 @@ class FightProc {
|
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
|
TaskProc::OnFightGate_X($gateId);
|
|
|
-
|
|
|
+
|
|
|
UserProc::updateUserInfo();
|
|
|
$ret = array(
|
|
|
'gates' => ctx()->gates,
|
|
@@ -997,8 +998,8 @@ class FightProc {
|
|
|
|
|
|
$store = $userInfo->store;
|
|
|
$heros = $userInfo->heros;
|
|
|
- $gates = $userInfo->gates;
|
|
|
-
|
|
|
+ $gates = $userInfo->gates;
|
|
|
+
|
|
|
UserProc::updateUserInfo();
|
|
|
$ret = array(
|
|
|
'store' => $store,
|
|
@@ -1137,13 +1138,13 @@ class FightProc {
|
|
|
if (gMem()->hexists($memKey, $gateId)) {
|
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
|
ctx()->privateState->rankReward_drawed_MainGate[] = $gateId;
|
|
|
-
|
|
|
+
|
|
|
TaskProc::OnRankPrize_Num();
|
|
|
}
|
|
|
|
|
|
$tag = self::isExistNoDrawed_MainGate();
|
|
|
UserProc::updateUserInfo();
|
|
|
- $ret = array('redTip' => $tag,'task'=> ctx()->task,);
|
|
|
+ $ret = array('redTip' => $tag, 'task' => ctx()->task,);
|
|
|
return Resp::ok($ret);
|
|
|
}
|
|
|
|
|
@@ -1169,7 +1170,7 @@ class FightProc {
|
|
|
$tag = self::isExistNoDrawed_FightPower();
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
|
- $ret = array('redTip' => $tag,'task'=> ctx()->task,);
|
|
|
+ $ret = array('redTip' => $tag, 'task' => ctx()->task,);
|
|
|
return Resp::ok($ret);
|
|
|
}
|
|
|
|