|
@@ -894,17 +894,17 @@ class FightProc {
|
|
|
$newChapterId = 0;
|
|
|
$oldChapterId = 0;
|
|
|
$gatePassTag_new = ctx()->gates->GateList->$gateId->pass;
|
|
|
- if ($gatePassTag_old == 0 && $gatePassTag_new == 1) {
|
|
|
+ if ($gatePassTag_old == 0 && $gatePassTag_new == 1) {
|
|
|
$gate_chapter = GameConfig::gate_chapter();
|
|
|
foreach ($gate_chapter as $id => $gate_chapter_mo) {
|
|
|
- if($gate_chapter_mo->unlockGateId == $gateId){
|
|
|
+ if ($gate_chapter_mo->unlockGateId == $gateId) {
|
|
|
$newChapterId = $id;
|
|
|
break;
|
|
|
}
|
|
|
$oldChapterId = $id;
|
|
|
}
|
|
|
ctx()->gates()->oldChapterId = $oldChapterId;
|
|
|
- ctx()->gates()->newChapterId = $newChapterId;
|
|
|
+ ctx()->gates()->newChapterId = $newChapterId;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -953,78 +953,62 @@ class FightProc {
|
|
|
static function funUnlock_Gate($resultType, $gateId) {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
- $tag = false;
|
|
|
- if ($mo->unlockType1 != null) {
|
|
|
- //1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
|
- switch ($mo->unlockType1) {
|
|
|
- case Enum_FunUnlockType::battle_Gate:
|
|
|
- if ($mo->unlockParas1 == $gateId && ctx()->gates->GateList->$gateId->fightNum == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- case Enum_FunUnlockType::passBattle_Gate:
|
|
|
- if ($resultType == true && $mo->unlockParas1 == $gateId && ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
-
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
+ $tag = false;
|
|
|
+ if ($mo->unlockType1 != null) {
|
|
|
+ //1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
|
+ switch ($mo->unlockType1) {
|
|
|
+ case Enum_FunUnlockType::battle_Gate:
|
|
|
+ if ($mo->unlockParas1 == $gateId && ctx()->gates->GateList->$gateId->fightNum == 0) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Enum_FunUnlockType::passBattle_Gate:
|
|
|
+ if ($resultType == true && $mo->unlockParas1 == $gateId && ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if ($mo->unlockType2 != null) {
|
|
|
- //1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
|
- switch ($mo->unlockType2) {
|
|
|
- case Enum_FunUnlockType::battle_Gate:
|
|
|
- if ($mo->unlockParas2 == $gateId && ctx()->gates->GateList->$gateId->fightNum == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- case Enum_FunUnlockType::passBattle_Gate:
|
|
|
- if ($resultType == true && $mo->unlockParas2 == $gateId && ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
-
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
+ if ($mo->unlockType2 != null) {
|
|
|
+ //1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
|
+ switch ($mo->unlockType2) {
|
|
|
+ case Enum_FunUnlockType::battle_Gate:
|
|
|
+ if ($mo->unlockParas2 == $gateId && ctx()->gates->GateList->$gateId->fightNum == 0) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Enum_FunUnlockType::passBattle_Gate:
|
|
|
+ if ($resultType == true && $mo->unlockParas2 == $gateId && ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
|
+ if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
|
+ if ($mo->unlockTip == 1) {
|
|
|
ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
- ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
|
- if ($id == 13 || $id == 16 || $id == 14) {
|
|
|
- self::unlockGuideType($id);
|
|
|
- //ctx()->privateData(true)->funUnlockRecord_3[] =
|
|
|
- }
|
|
|
- self::SubFunDateInit_FunUnlock($id);
|
|
|
}
|
|
|
+ ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
|
+ if ($id == 13 || $id == 16 || $id == 14) {
|
|
|
+ //self::unlockGuideType($id);
|
|
|
+ GuideProc::Qingling_EquipWear_Guide_Trigger($id);
|
|
|
+ }
|
|
|
+ self::SubFunDateInit_FunUnlock($id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static function unlockGuideType($id) {
|
|
|
- GuideProc::Qingling_EquipWear_Guide_Trigger($id);
|
|
|
-// $type = 0;
|
|
|
-// switch ($id) {
|
|
|
-// case 16://启灵
|
|
|
-// $type = E_GuideTypeState::Qingling_Guide;
|
|
|
-// break;
|
|
|
-// case 14://装备 首次获得装备 装备功能解锁 同时开启装备穿戴引导
|
|
|
-// $type = E_GuideTypeState::EquipWear_Guide;
|
|
|
-// break;
|
|
|
-// default:
|
|
|
-// break;
|
|
|
-// }
|
|
|
+// public static function unlockGuideType($id) {
|
|
|
//
|
|
|
-// if($type >0 && !in_array($type,ctx()->privateData(true)->funUnlockRecord_3)){
|
|
|
-// ctx()->privateData(true)->funUnlockRecord_3[] = $type;
|
|
|
-// }
|
|
|
- //return $type;
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 初次得到装备 功能解锁
|
|
@@ -1033,22 +1017,22 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
- if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::equip_firstTime && count(StlUtil::dictToArray(ctx()->store->equip)) == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
+ if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::equip_firstTime && count(StlUtil::dictToArray(ctx()->store->equip)) == 0) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
|
|
|
- if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::equip_firstTime && count(StlUtil::dictToArray(ctx()->store->equip)) == 0) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
+ if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::equip_firstTime && count(StlUtil::dictToArray(ctx()->store->equip)) == 0) {
|
|
|
+ $tag = true;
|
|
|
}
|
|
|
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
|
- ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ if ($mo->unlockTip == 1) {
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ }
|
|
|
ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
|
|
|
|
if ($id == 13 || $id == 16 || $id == 14) {
|
|
|
- self::unlockGuideType($id);
|
|
|
+ GuideProc::Qingling_EquipWear_Guide_Trigger($id);
|
|
|
//ctx()->privateData(true)->funUnlockRecord_3[] =
|
|
|
}
|
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
@@ -1063,20 +1047,22 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
- if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::userLv && $mo->unlockParas1 == $level) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
+ if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::userLv && $mo->unlockParas1 == $level) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
|
|
|
- if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::userLv && $mo->unlockParas2 == $level) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
+ if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::userLv && $mo->unlockParas2 == $level) {
|
|
|
+ $tag = true;
|
|
|
}
|
|
|
+
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
|
- ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ }
|
|
|
+
|
|
|
ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
|
if ($id == 13 || $id == 16 || $id == 14) {
|
|
|
- self::unlockGuideType($id);
|
|
|
+ GuideProc::Qingling_EquipWear_Guide_Trigger($id);
|
|
|
//ctx()->privateData(true)->funUnlockRecord_3[] = self::unlockGuideType($id);
|
|
|
}
|
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
@@ -1091,32 +1077,33 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
- if ($mo->unlockType1 != null && $result = true && $mo->unlockType1 == Enum_FunUnlockType::mainChallengeGate_State) {
|
|
|
- $str = explode(',', $mo->unlockParas1);
|
|
|
- $uGateId = $str[0];
|
|
|
- $gateState = $str[1];
|
|
|
-
|
|
|
- if ($uGateId == $gateId && StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId) && ctx()->gates->GateList->$gateId->tz_state == $gateState - 1) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
- }
|
|
|
+ if ($mo->unlockType1 != null && $result = true && $mo->unlockType1 == Enum_FunUnlockType::mainChallengeGate_State) {
|
|
|
+ $str = explode(',', $mo->unlockParas1);
|
|
|
+ $uGateId = $str[0];
|
|
|
+ $gateState = $str[1];
|
|
|
|
|
|
- if ($mo->unlockType2 != null && $result = true && $mo->unlockType2 == Enum_FunUnlockType::mainChallengeGate_State) {
|
|
|
- $str = explode(',', $mo->unlockParas2);
|
|
|
- $uGateId = $str[0];
|
|
|
- $gateState = $str[1];
|
|
|
- if ($uGateId == $gateId && StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId) && ctx()->gates->GateList->$gateId->tz_state == $gateState - 1) {
|
|
|
- $tag = true;
|
|
|
- }
|
|
|
+ if ($uGateId == $gateId && StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId) && ctx()->gates->GateList->$gateId->tz_state == $gateState - 1) {
|
|
|
+ $tag = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($mo->unlockType2 != null && $result = true && $mo->unlockType2 == Enum_FunUnlockType::mainChallengeGate_State) {
|
|
|
+ $str = explode(',', $mo->unlockParas2);
|
|
|
+ $uGateId = $str[0];
|
|
|
+ $gateState = $str[1];
|
|
|
+ if ($uGateId == $gateId && StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId) && ctx()->gates->GateList->$gateId->tz_state == $gateState - 1) {
|
|
|
+ $tag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
|
- ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
+ }
|
|
|
+
|
|
|
ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
|
if ($id == 13 || $id == 16 || $id == 14) {
|
|
|
- self::unlockGuideType($id);
|
|
|
+ GuideProc::Qingling_EquipWear_Guide_Trigger($id);
|
|
|
//ctx()->privateData(true)->funUnlockRecord_3[] = self::unlockGuideType($id);
|
|
|
}
|
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
@@ -1217,6 +1204,10 @@ class FightProc {
|
|
|
ActiveProc::InitDay7_Sign_NewPlayer(true);
|
|
|
ctx()->privateState->day7_drawed_newPlayer_startTs = now();
|
|
|
}
|
|
|
+
|
|
|
+ if ($mo->funTypeId == Enum_FunType::FlipCardLottery && $mo->id == Enum_SubFunType::FlipCardLottery) {
|
|
|
+ ActiveProc::ClearFlipCardInfo();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|