cyzhao hai 10 meses
pai
achega
afcab53942

+ 17 - 1
Gameserver/App/configs/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-20 17:10:35
+ // 日期: 2024-07-23 15:41:07
 ////////////////////
 
 namespace loyalsoft;
@@ -751,6 +751,22 @@ class GameConfig {
         return self::get_hash_item('token_publicgift', $itemid);
     }
     /**
+    * 游戏功能解锁信息
+    * @return \fun_unlock
+    */
+    public static function fun_unlock()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'fun_unlock');
+    }
+    /**
+    * @return \sm_fun_unlock fun_unlock item数据 
+    */
+    public static function fun_unlock_getItem($itemid)
+    { 
+        return self::get_hash_item('fun_unlock', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

+ 1 - 1
Gameserver/App/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-23 14:34:07
+ // 日期: 2024-07-23 16:50:13
 ////////////////////
 
 /**

+ 0 - 62
Gameserver/App/model/Const/sm_fununlock.php

@@ -1,62 +0,0 @@
-<?php
-////////////////////
- // 由CodeGenerator创建。
- // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
- // author: gwang 
- // 日期: 2024-07-23 12:13:42
-////////////////////
-
-
-/**
- * Static Model fununlock 游戏功能解锁信息
- */
-class sm_fununlock
-{
-
-    /**
-    * @var Int32 功能id  
-    */
-    public $id;
-
-    /**
-    * @var String 功能名称  
-    */
-    public $name;
-
-    /**
-    * @var String 功能图片名称  
-    */
-    public $iconName;
-
-    /**
-    * @var String 用途未知!!请到数据库中添加字段注释。  
-    */
-    public $moduleName;
-
-    /**
-    * @var String 用途未知!!请到数据库中添加字段注释。  
-    */
-    public $cmptPath;
-
-    /**
-    * @var Int32 1:参与战斗结束即可  2战斗胜利  3某场战斗参加N次数才行  
-    */
-    public $unlockType;
-
-    /**
-    * @var Int32 关卡id  
-    */
-    public $unlockGateId;
-
-    /**
-    * @var Int32 解锁顺序  
-    */
-    public $unlockIndex;
-
-    /**
-    * @var Int32 解锁提示  
-    */
-    public $unlockTip;
-
-}
-

+ 36 - 6
Gameserver/App/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-23 11:55:36
+ // 日期: 2024-07-23 16:47:41
 ////////////////////
 
 
@@ -27,12 +27,12 @@ class sm_gate
     public $gateName;
 
     /**
-    * @var Int32 所属于某个章节的章节Id  
+    * @var Int32 【废弃2024.7.23】所属于某个章节的章节Id  
     */
     public $challengeGateId;
 
     /**
-    * @var Int32 挑战关卡解锁的条件关卡id  
+    * @var Int32 【废弃2024.7.23】挑战关卡解锁的条件关卡id  
     */
     public $challengeUnlockId;
 
@@ -141,7 +141,7 @@ class sm_gate
     public $sweep_qiling;
 
     /**
-    * @var String 章节磁条Id  
+    * @var String 【废弃2024.7.23】章节磁条Id  
     */
     public $gatePredicateId;
 
@@ -156,14 +156,44 @@ class sm_gate
     public $sweepNum;
 
     /**
-    * @var String 挑战模式里奖励的描述信息  
+    * @var String 【废弃2024.7.23】挑战模式里奖励的描述信息  
     */
     public $layerPriceDesc;
 
     /**
-    * @var String 挑战模式里说明描述信息  
+    * @var String 【废弃2024.7.23】挑战模式里说明描述信息  
     */
     public $layerRuleDesc;
 
+    /**
+    * @var String 主线挑战: 难度1-词条列表  
+    */
+    public $tz_predicates1;
+
+    /**
+    * @var String 主线挑战: 难度1-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward1;
+
+    /**
+    * @var String 主线挑战: 难度2-词条列表  
+    */
+    public $tz_predicates2;
+
+    /**
+    * @var String 主线挑战: 难度2-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward2;
+
+    /**
+    * @var String 主线挑战: 难度3-词条列表  
+    */
+    public $tz_predicates3;
+
+    /**
+    * @var String 主线挑战: 难度2-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward3;
+
 }
 

+ 31 - 1
Gameserver/App/model/Const/sm_gate_unlock.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-23 11:55:36
+ // 日期: 2024-07-23 16:47:41
 ////////////////////
 
 
@@ -21,5 +21,35 @@ class sm_gate_unlock
     */
     public $gateId;
 
+    /**
+    * @var String 主线挑战: 难度1-词条列表  
+    */
+    public $tz_predicates1;
+
+    /**
+    * @var String 主线挑战: 难度1-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward1;
+
+    /**
+    * @var String 主线挑战: 难度2-词条列表  
+    */
+    public $tz_predicates2;
+
+    /**
+    * @var String 主线挑战: 难度2-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward2;
+
+    /**
+    * @var String 主线挑战: 难度3-词条列表  
+    */
+    public $tz_predicates3;
+
+    /**
+    * @var String 主线挑战: 难度2-奖励列表(id,num;id,num...)  
+    */
+    public $tz_reward3;
+
 }
 

+ 1 - 1
Gameserver/App/model/Const/sm_predicate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-23 11:31:52
+ // 日期: 2024-07-23 14:51:26
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_waveItem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-22 18:35:47
+ // 日期: 2024-07-23 16:27:56
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_waves.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-22 18:35:47
+ // 日期: 2024-07-23 16:27:56
 ////////////////////
 
 

+ 13 - 0
Gameserver/App/model/User/Info_PrivateState.php

@@ -244,6 +244,19 @@ class Info_PrivateState extends Object_ext {
      */
     public $redTip_RewardFightPowerRank = 0;
 
+    /**
+     * 解锁的功能记录
+     * @var array()
+     */
+    #[ArrayType]
+    public $funUnlockRecord = array();
+    
+    /**
+     * 解锁的技能记录
+     * @var array()
+     */
+    #[ArrayType]
+    public $skillUnlockRecord = array();
 
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();

+ 40 - 0
Gameserver/App/process/FightProc.php

@@ -507,6 +507,8 @@ class FightProc {
         if ($curTs >= $ts) {
             $gateInfo->MaxSeconds = $curTs;
         }
+        
+        self::funUnlock($resultType, $gateId);//备注:这个接口的位置不能动 里面有关卡第一次胜利解锁的功能提示校验
         if ($resultType) {                                                      # 胜利
             if (ctx()->gates->GateList->$gateId->pass == 0) {
                 ctx()->gates->GateList->$gateId->pass = 1;
@@ -609,9 +611,47 @@ class FightProc {
             'reward_Gem' => StoreProc::$reward_Gem,
             'oldLevel' => $oldLevel,
             'newLevel' => $newLevel,
+            'funUnlockRecord'=> ctx()->privateState->funUnlockRecord,
+            'skillUnlockRecord'=> ctx()->privateState->skillUnlockRecord,
         );
         return Resp::ok($ret);
     }
+    
+    /**
+     * 检测功能解锁的
+     * @param type $resultType
+     * @param type $gateId
+     * @return type
+     */
+    static function funUnlock($resultType,$gateId) {
+        $dic = GameConfig::fun_unlock();                  
+        foreach ($dic as $id => $mo) {
+            if($mo->unlockTip == 1 && $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){
+                    ctx()->privateState->funUnlockRecord[] = $id;
+                }
+            }
+        }
+                      
+    }
 
 // <editor-fold defaultstate="collapsed" desc="排行榜">