|
@@ -615,6 +615,7 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
self::funUnlock($resultType, $gateId); //备注:这个接口的位置不能动 里面有关卡第一次胜利解锁的功能提示校验
|
|
self::funUnlock($resultType, $gateId); //备注:这个接口的位置不能动 里面有关卡第一次胜利解锁的功能提示校验
|
|
|
|
+ self::subFunUnlock($resultType, $gateId);
|
|
if ($resultType) { # 胜利
|
|
if ($resultType) { # 胜利
|
|
self::skillUnlock_gate($resultType, $gateId); //备注 这个接口位置不能动
|
|
self::skillUnlock_gate($resultType, $gateId); //备注 这个接口位置不能动
|
|
|
|
|
|
@@ -713,7 +714,7 @@ class FightProc {
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
TaskProc::OnFightGate_X($gateId);
|
|
TaskProc::OnFightGate_X($gateId);
|
|
-
|
|
|
|
|
|
+
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
$ret = array(
|
|
$ret = array(
|
|
'gates' => ctx()->gates,
|
|
'gates' => ctx()->gates,
|
|
@@ -730,6 +731,7 @@ class FightProc {
|
|
'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
'skillUnlockRecord' => ctx()->privateState->skillUnlockRecord,
|
|
'skillUnlockRecord' => ctx()->privateState->skillUnlockRecord,
|
|
'heros' => ctx()->heros,
|
|
'heros' => ctx()->heros,
|
|
|
|
+ 'subFunStartTs'=> ctx()->privateState->subFunStartTs,
|
|
);
|
|
);
|
|
return Resp::ok($ret);
|
|
return Resp::ok($ret);
|
|
}
|
|
}
|
|
@@ -763,7 +765,48 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
if ($tag) {
|
|
if ($tag) {
|
|
- ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
|
|
+ ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 检测次级功能解锁的
|
|
|
|
+ * @param type $resultType
|
|
|
|
+ * @param type $gateId
|
|
|
|
+ * @return type
|
|
|
|
+ */
|
|
|
|
+ static function subFunUnlock($resultType, $gateId) {
|
|
|
|
+ $dic = GameConfig::subfun_unlock();
|
|
|
|
+ foreach ($dic as $id => $mo) {
|
|
|
|
+ if ($mo->type != 1) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($mo->unlockGateId == $gateId) {
|
|
|
|
+ $tag = false;
|
|
|
|
+ //1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
|
|
+ switch ($mo->unlockType) {
|
|
|
|
+ case 1:
|
|
|
|
+ if (ctx()->gates->GateList->$gateId->fightNum == 0) {
|
|
|
|
+ $tag = true;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ if ($resultType == true && ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
|
+ $tag = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($tag) {
|
|
|
|
+ if (!StlUtil::dictHasProperty(ctx()->privateState->subFunStartTs, $id)) {
|
|
|
|
+ ctx()->privateState->subFunStartTs->$id = now();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1216,7 +1259,7 @@ class FightProc {
|
|
|
|
|
|
$tag = self::isExistNoDrawed_MainGate();
|
|
$tag = self::isExistNoDrawed_MainGate();
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
- $ret = array('redTip' => $tag, 'task' => ctx()->task,'store'=> ctx()->store,'cash'=> ctx()->baseInfo->cash,'reward'=> StoreProc::$reward);
|
|
|
|
|
|
+ $ret = array('redTip' => $tag, 'task' => ctx()->task, 'store' => ctx()->store, 'cash' => ctx()->baseInfo->cash, 'reward' => StoreProc::$reward);
|
|
return Resp::ok($ret);
|
|
return Resp::ok($ret);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1242,7 +1285,7 @@ class FightProc {
|
|
$tag = self::isExistNoDrawed_FightPower();
|
|
$tag = self::isExistNoDrawed_FightPower();
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
- $ret = array('redTip' => $tag, 'task' => ctx()->task,'store'=> ctx()->store,'cash'=> ctx()->baseInfo->cash,'reward'=> StoreProc::$reward);
|
|
|
|
|
|
+ $ret = array('redTip' => $tag, 'task' => ctx()->task, 'store' => ctx()->store, 'cash' => ctx()->baseInfo->cash, 'reward' => StoreProc::$reward);
|
|
return Resp::ok($ret);
|
|
return Resp::ok($ret);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1277,13 +1320,13 @@ class FightProc {
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
$ret = array('redTip' => 0,
|
|
$ret = array('redTip' => 0,
|
|
- 'task' => ctx()->task,
|
|
|
|
- 'store'=> ctx()->store,
|
|
|
|
- 'cash'=> ctx()->baseInfo->cash,
|
|
|
|
- 'reward'=> StoreProc::$reward,
|
|
|
|
- 'rankReward_drawed_fightPower'=>ctx()->privateState->rankReward_drawed_fightPower,
|
|
|
|
- 'rankReward_drawed_MainGate'=>ctx()->privateState->rankReward_drawed_MainGate,
|
|
|
|
- );
|
|
|
|
|
|
+ 'task' => ctx()->task,
|
|
|
|
+ 'store' => ctx()->store,
|
|
|
|
+ 'cash' => ctx()->baseInfo->cash,
|
|
|
|
+ 'reward' => StoreProc::$reward,
|
|
|
|
+ 'rankReward_drawed_fightPower' => ctx()->privateState->rankReward_drawed_fightPower,
|
|
|
|
+ 'rankReward_drawed_MainGate' => ctx()->privateState->rankReward_drawed_MainGate,
|
|
|
|
+ );
|
|
return Resp::ok($ret);
|
|
return Resp::ok($ret);
|
|
}
|
|
}
|
|
|
|
|