|
@@ -8,6 +8,9 @@ namespace loyalsoft;
|
|
|
*/
|
|
|
class FightProc {
|
|
|
|
|
|
+ /**
|
|
|
+ * @deprecated since version 已转移到global中
|
|
|
+ */
|
|
|
public const TowerGateId = 940011999;
|
|
|
|
|
|
/**
|
|
@@ -135,7 +138,7 @@ class FightProc {
|
|
|
TaskProc::OnPassMainChallengeGate_X_Num($gateId, $index);
|
|
|
TaskProc::OnKillCommonNumMonster($killMonsterNum);
|
|
|
TaskProc::OnKillleaderNumMonster($killBossNum);
|
|
|
-
|
|
|
+
|
|
|
//TaskProc::Day7TaskReset();
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array("task" => ctx()->task,
|
|
@@ -162,9 +165,9 @@ class FightProc {
|
|
|
StoreProc::AddMultiItemInStore($mo->$prize);
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array(
|
|
|
- 'gold'=> ctx()->baseInfo->gold,
|
|
|
- 'cash'=> ctx()->baseInfo->cash,
|
|
|
- 'store'=> ctx()->store,
|
|
|
+ 'gold' => ctx()->baseInfo->gold,
|
|
|
+ 'cash' => ctx()->baseInfo->cash,
|
|
|
+ 'store' => ctx()->store,
|
|
|
'reward' => StoreProc::$reward,
|
|
|
'reward_Gem' => StoreProc::$reward_Gem,
|
|
|
));
|
|
@@ -491,7 +494,7 @@ class FightProc {
|
|
|
list($finalLayer, $killedMonster, $killedBoss) = req()->paras; # 战斗结束时的层数
|
|
|
|
|
|
$lastLayer = ctx()->gates()->TowerGateInfo()->CurLayer;
|
|
|
- $arr = GameConfig::waves_getItemArray(self::TowerGateId);
|
|
|
+ $arr = GameConfig::waves_getItemArray(glc()->TowerGateId);
|
|
|
TaskProc::OnFightNumChallengeGate();
|
|
|
TaskProc::OnKillCommonNumMonster($killedMonster);
|
|
|
TaskProc::OnKillleaderNumMonster($killedBoss);
|
|
@@ -646,7 +649,7 @@ class FightProc {
|
|
|
|
|
|
if (ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
ctx()->gates->GateList->$gateId->pass = 1;
|
|
|
-
|
|
|
+
|
|
|
$maxGateId = ctx()->gates->maxPassGateNumId();
|
|
|
|
|
|
if ($maxGateId > 0) {
|
|
@@ -764,8 +767,8 @@ class FightProc {
|
|
|
return Resp::ok($ret);
|
|
|
}
|
|
|
|
|
|
-// <editor-fold defaultstate="collapsed" desc="功能解锁">
|
|
|
-
|
|
|
+// <editor-fold defaultstate="collapsed" desc="功能解锁">
|
|
|
+
|
|
|
/**
|
|
|
* 检测功能解锁的 关卡
|
|
|
* @param type $resultType
|
|
@@ -775,7 +778,7 @@ class FightProc {
|
|
|
static function funUnlock_Gate($resultType, $gateId) {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
$tag = false;
|
|
|
if ($mo->unlockType1 != null) {
|
|
|
//1:参与战斗结束即可 2战斗胜利 3某场战斗参加N次数才行
|
|
@@ -831,7 +834,7 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::getGem && ctx()->store->gemStore == null) {
|
|
|
$tag = true;
|
|
|
}
|
|
@@ -856,7 +859,7 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::userLv && $mo->unlockParas1 == $level) {
|
|
|
$tag = true;
|
|
|
}
|
|
@@ -880,7 +883,7 @@ class FightProc {
|
|
|
$dic = GameConfig::fun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
$tag = false;
|
|
|
- if ($mo->unlockTip == 1) {//$mo->unlockGateId == $gateId
|
|
|
+ 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];
|
|
@@ -979,11 +982,11 @@ class FightProc {
|
|
|
static function SubFunDateInit_FunUnlock($type) {
|
|
|
$dic = GameConfig::subfun_unlock();
|
|
|
foreach ($dic as $id => $mo) {
|
|
|
- if($mo->funTypeId != $type){
|
|
|
+ if ($mo->funTypeId != $type) {
|
|
|
continue;
|
|
|
- }
|
|
|
-
|
|
|
- if($mo->type == 1 && $mo->id == Enum_SubFunType::Day7_Happy){
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($mo->type == 1 && $mo->id == Enum_SubFunType::Day7_Happy) {
|
|
|
TaskProc::Day7TaskReset();
|
|
|
}
|
|
|
if($mo->type == 2 && $mo->id == Enum_SubFunType::DailyTask){
|
|
@@ -991,25 +994,24 @@ class FightProc {
|
|
|
}
|
|
|
|
|
|
if($mo->type == 2 && $mo->id == Enum_SubFunType::WeekTask){
|
|
|
- TaskProc::WeekTaskReset(true);
|
|
|
+ TaskProc::WeekTaskReset(true);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 次级功能解锁数据初始化
|
|
|
*/
|
|
|
static function SubFunDateInit_Config() {
|
|
|
$dic = GameConfig::subfun_unlock();
|
|
|
- foreach ($dic as $id => $mo) {
|
|
|
- if($mo->type == 3 && $mo->id == Enum_SubFunType::LimitTsSale && ctx()->privateState->nextDayLogin == 0){
|
|
|
- ctx()->privateState->nextDayLogin = now();
|
|
|
- }
|
|
|
+ foreach ($dic as $id => $mo) {
|
|
|
+ if ($mo->type == 3 && $mo->id == Enum_SubFunType::LimitTsSale && ctx()->privateState->nextDayLogin == 0) {
|
|
|
+ ctx()->privateState->nextDayLogin = now();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// </editor-fold>
|
|
|
+// </editor-fold>
|
|
|
// <editor-fold defaultstate="collapsed" desc="技能解锁">
|
|
|
|
|
|
/**
|