Kaynağa Gözat

启灵引导加记录

cyzhao 5 ay önce
ebeveyn
işleme
1196ab1b1d

+ 5 - 0
Gameserver/App/base/CmdCode.php

@@ -128,6 +128,11 @@ class CmdCode {
      * 提交新手引导步骤
      */
     const cmd_user_completeNewbieGuide = 6011;
+    
+    /**
+     * 重置启灵 坊市的引导记录
+     */
+    const cmd_user_clearGuideInfo = 6012;
 
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="活动操作码 - 61xx">

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-01-03 10:07:32
+ // 日期: 2025-01-03 14:56:02
 ////////////////////
 
 /**
@@ -1073,9 +1073,9 @@ class GameConfig {
     /**
     * @return \sm_guide guide item数据 
     */
-    public static function guide_getItem($type, $stepId)
+    public static function guide_getItem($id, $stepId)
     { 
-        return self::get_hash_item('guide', "$type-$stepId");
+        return self::get_hash_item('guide', "$id-$stepId");
     }
     /**
     * 当前版本(时间戳)

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-09 18:05:52
+ // 日期: 2025-01-03 10:47:29
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-01-02 16:51:57
+ // 日期: 2025-01-03 12:21:57
 ////////////////////
 
 

+ 1 - 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 
- // 日期: 2025-01-02 16:51:57
+ // 日期: 2025-01-03 12:21:57
 ////////////////////
 
 

+ 6 - 1
Gameserver/App/model/Const/sm_glc2.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-01-03 10:09:28
+ // 日期: 2025-01-03 10:54:49
 ////////////////////
 
 
@@ -43,5 +43,10 @@ class sm_glc2
     */
     public $guide_equipLevel_triggerGateBoxIndex;
 
+    /**
+    * @var String 引导阶段必出的技能列表,逗号分隔(每次三选一出一个)  
+    */
+    public $guide_skillids;
+
 }
 

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

@@ -14,7 +14,7 @@ class sm_guide
 {
 
     /**
-    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    * @var Int32 引导模块  
     */
     public $id;
 

+ 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 
- // 日期: 2025-01-03 09:35:07
+ // 日期: 2025-01-03 14:21:57
 ////////////////////
 
 

+ 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 
- // 日期: 2025-01-03 10:09:27
+ // 日期: 2025-01-03 10:12:29
 ////////////////////
 
 

+ 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 
- // 日期: 2025-01-03 10:09:27
+ // 日期: 2025-01-03 10:12:29
 ////////////////////
 
 

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

@@ -247,6 +247,13 @@ class Info_PrivateState extends Object_ext {
      */
     #[ArrayType]
     public $funUnlockRecord_2 = array();
+    
+    /**
+     * 为启灵 坊市的引导 用的 
+     * @var type
+     */
+    #[ArrayType]
+    public $funUnlockRecord_3 = array();
 
     /**
      * 解锁的技能记录

+ 5 - 2
Gameserver/App/process/FightProc.php

@@ -874,7 +874,10 @@ class FightProc {
 
                 if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
                     ctx()->privateData(true)->funUnlockRecord[] = $id;
-                    ctx()->privateData(true)->funUnlockRecord_2[] = $id;
+                    ctx()->privateData(true)->funUnlockRecord_2[] = $id;                  
+                    if($id == 13 || $id == 16){
+                        ctx()->privateData(true)->funUnlockRecord_3[] = $id;
+                    }                  
                     self::SubFunDateInit_FunUnlock($id);
                 }
             }
@@ -900,7 +903,7 @@ class FightProc {
 
             if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
                 ctx()->privateData(true)->funUnlockRecord[] = $id;
-                ctx()->privateData(true)->funUnlockRecord_2[] = $id;
+                ctx()->privateData(true)->funUnlockRecord_2[] = $id;                
                 self::SubFunDateInit_FunUnlock($id);
             }
         }

+ 13 - 1
Gameserver/App/process/UserProc.php

@@ -43,12 +43,24 @@ class UserProc {
                 return self::ReName();
             case CmdCode::cmd_user_completeNewbieGuide:                         # 6011 新手引导更新
                 return self::completeNewbieGuide();    
-                
+            case CmdCode::cmd_user_clearGuideInfo:                              # 6012 清理引导记录
+                return self::clearGuideInfo();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
     
+    public static function clearGuideInfo(){
+        list($id) = req()->paras;                                               # 参数:引导模块
+                                        
+        if(in_array($id, ctx()->privateState->funUnlockRecord_3)){
+            ctx()->privateState->funUnlockRecord_3 = array();
+        }
+               
+        UserProc::updateUserInfo();                                             # 回写数据
+        return Resp::ok(array());
+    }
+    
     /**
      * 更新新手引导阶段步骤   
      */