|
@@ -135,6 +135,8 @@ class FightProc {
|
|
TaskProc::OnPassMainChallengeGate_X_Num($gateId, $index);
|
|
TaskProc::OnPassMainChallengeGate_X_Num($gateId, $index);
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
|
|
+
|
|
|
|
+ TaskProc::Day7TaskReset();
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok(array("task" => ctx()->task,
|
|
return Resp::ok(array("task" => ctx()->task,
|
|
'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
@@ -638,7 +640,7 @@ class FightProc {
|
|
|
|
|
|
if (ctx()->gates->GateList->$gateId->pass == 0) {
|
|
if (ctx()->gates->GateList->$gateId->pass == 0) {
|
|
ctx()->gates->GateList->$gateId->pass = 1;
|
|
ctx()->gates->GateList->$gateId->pass = 1;
|
|
- TaskProc::Day7TaskReset($gateId); # 刷新七日任务
|
|
|
|
|
|
+
|
|
$maxGateId = ctx()->gates->maxPassGateNumId();
|
|
$maxGateId = ctx()->gates->maxPassGateNumId();
|
|
|
|
|
|
if ($maxGateId > 0) {
|
|
if ($maxGateId > 0) {
|
|
@@ -728,7 +730,7 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
ctx()->gates->GateList->$gateId->fightNum += 1;
|
|
ctx()->gates->GateList->$gateId->fightNum += 1;
|
|
-
|
|
|
|
|
|
+ TaskProc::Day7TaskReset();
|
|
TaskProc::OnFightNumMainGate();
|
|
TaskProc::OnFightNumMainGate();
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
@@ -932,6 +934,70 @@ class FightProc {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查看某功能是否解锁
|
|
|
|
+ * @param type $id
|
|
|
|
+ */
|
|
|
|
+ static function isFunUnlock($id) {
|
|
|
|
+ $funMo = GameConfig::fun_unlock_getItem($id);
|
|
|
|
+ if ($funMo->unlockType1 != null && self::unlockCondition($funMo->unlockType1, $funMo->unlockParas1)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($funMo->unlockType2 != null && self::unlockCondition($funMo->unlockType2, $funMo->unlockParas2)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 解锁条件id
|
|
|
|
+ * @param type $conditionId
|
|
|
|
+ */
|
|
|
|
+ static function unlockCondition($conditionId, $paras) {
|
|
|
|
+ $funUnlock = false;
|
|
|
|
+ switch ($conditionId) {
|
|
|
|
+ case Enum_FunUnlockType::battle_Gate:
|
|
|
|
+ $gateId = $paras;
|
|
|
|
+ if (ctx()->gates->GateList->$gateId->fightNum > 0) {
|
|
|
|
+ $funUnlock = true;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case Enum_FunUnlockType::passBattle_Gate:
|
|
|
|
+ $gateId = $paras;
|
|
|
|
+ if (ctx()->gates->GateList->$gateId->pass >= 1) {
|
|
|
|
+ $funUnlock = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ case Enum_FunUnlockType::getGem:
|
|
|
|
+ if (ctx()->store->gemStore != null) {
|
|
|
|
+ $funUnlock = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ case Enum_FunUnlockType::userLv:
|
|
|
|
+ if (ctx()->baseInfo->level >= $paras) {
|
|
|
|
+ $funUnlock = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ case Enum_FunUnlockType::mainChallengeGate_State:
|
|
|
|
+ $str = explode(',', $paras);
|
|
|
|
+ $uGateId = $str[0];
|
|
|
|
+ $gateState = $str[1];
|
|
|
|
+
|
|
|
|
+ if (StlUtil::dictHasProperty(ctx()->gates->GateList, $uGateId) && ctx()->gates->GateList->$uGateId->tz_state >= $gateState) {
|
|
|
|
+ $funUnlock = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return $funUnlock;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 检测次级功能解锁的
|
|
* 检测次级功能解锁的
|
|
* @param type $resultType
|
|
* @param type $resultType
|