瀏覽代碼

功能解锁

cyzhao 6 月之前
父節點
當前提交
a18a614530

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-05 10:54:55
+ // 日期: 2024-11-28 09:12:24
 ////////////////////
 
 namespace loyalsoft;
@@ -1007,6 +1007,38 @@ class GameConfig {
         return self::get_hash_item('equip_compose', $itemid);
     }
     /**
+    * 装备套装
+    * @return \equip_suit
+    */
+    public static function equip_suit()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'equip_suit');
+    }
+    /**
+    * @return \sm_equip_suit equip_suit item数据 
+    */
+    public static function equip_suit_getItem($itemid)
+    { 
+        return self::get_hash_item('equip_suit', $itemid);
+    }
+    /**
+    * 新手7日签到
+    * @return \activity_day7sign_newplayer
+    */
+    public static function activity_day7sign_newplayer()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_day7sign_newplayer');
+    }
+    /**
+    * @return \sm_activity_day7sign_newplayer activity_day7sign_newplayer item数据 
+    */
+    public static function activity_day7sign_newplayer_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_day7sign_newplayer', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-26 10:43:45
+ // 日期: 2024-11-28 09:12:24
 ////////////////////
 
 /**
@@ -1021,6 +1021,22 @@ class GameConfig {
         return self::get_hash_item('equip_suit', $itemid);
     }
     /**
+    * 新手7日签到
+    * @return \activity_day7sign_newplayer
+    */
+    public static function activity_day7sign_newplayer()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_day7sign_newplayer');
+    }
+    /**
+    * @return \sm_activity_day7sign_newplayer activity_day7sign_newplayer item数据 
+    */
+    public static function activity_day7sign_newplayer_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_day7sign_newplayer', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-20 09:35:54
+ // 日期: 2024-11-28 09:05:31
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-20 09:35:54
+ // 日期: 2024-11-28 09:05:31
 ////////////////////
 
 

+ 37 - 0
Gameserver/App/model/Const/sm_activity_day7sign_newplayer.php

@@ -0,0 +1,37 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-11-28 09:13:30
+////////////////////
+
+
+/**
+ * Static Model activity_day7sign_newplayer 新手7日签到
+ */
+class sm_activity_day7sign_newplayer
+{
+
+    /**
+    * @var Int32 主键  
+    */
+    public $tid;
+
+    /**
+    * @var Int32 第x天(1~7)  
+    */
+    public $day;
+
+    /**
+    * @var String 奖励:itemId,num  
+    */
+    public $reward;
+
+    /**
+    * @var String 备注  
+    */
+    public $desc;
+
+}
+

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-25 18:09:06
+ // 日期: 2024-11-26 16:20:00
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-15 15:35:52
+ // 日期: 2024-11-27 14:44:43
 ////////////////////
 
 

+ 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 
- // 日期: 2024-11-21 16:50:27
+ // 日期: 2024-11-26 14:56:34
 ////////////////////
 
 

+ 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 
- // 日期: 2024-11-21 16:50:27
+ // 日期: 2024-11-26 14:56:34
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-26 10:35:54
+ // 日期: 2024-11-26 17:02:02
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-26 10:35:54
+ // 日期: 2024-11-26 17:02:02
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-25 17:45:34
+ // 日期: 2024-11-27 11:37:28
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-20 10:50:39
+ // 日期: 2024-11-27 15:32:04
 ////////////////////
 
 

+ 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-11-21 17:49:25
+ // 日期: 2024-11-27 15:34:09
 ////////////////////
 
 

+ 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-11-21 17:49:25
+ // 日期: 2024-11-27 15:34:09
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/User/Enum_FunUnlockType.php

@@ -28,7 +28,7 @@ class Enum_FunUnlockType {
     /*
      * 初次开启璀璨宝箱
      */
-    const shopBox_bright_open = 3;
+    const equip_firstTime = 3;
     
     /*
      * 玩家等级要求

+ 14 - 15
Gameserver/App/process/FightProc.php

@@ -621,16 +621,11 @@ class FightProc {
         if ($tag) {
             my_Assert(!in_array($mask, $gateInfo->FirstReward), ErrCode::gate_GatePriceHasReceive);
             $gateInfo->FirstReward[] = $mask;
-
-//            $pStr = explode(';', $prize);
-//            foreach ($pStr as $val) {
-//                $arr = explode(',', $val);
-//                if (GameConfig::item_getItem($arr[0]) == 201 || GameConfig::item_getItem($arr[0]) == 701) {
-//                    FightProc::funUnlock_Gem();
-//                    break;
-//                }
-//            }
             StoreProc::AddMultiItemInStore($prize);
+            
+            if(count(StoreProc::$reward_equip) > 0){
+                self::funUnlock_equip_firstTime();
+            }
         }
         ctx()->gates->GateList->$gateId = $gateInfo;
         TaskProc::OnReceiveGateBoxReward();
@@ -724,6 +719,10 @@ class FightProc {
         if ($waveMo->rewardItem != null) {
             $reward = StoreProc::Distribute_Rewards($waveMo->rewardItem);
             StoreProc::AddMultiItemInStore($reward);
+            
+            if(count(StoreProc::$reward_equip) > 0){
+                self::funUnlock_equip_firstTime();
+            }
         }
 
         # 图纸奖励: 数量min-max, 部位随机
@@ -870,18 +869,18 @@ class FightProc {
     }
 
     /**
-     *  初次开启璀璨宝箱 功能解锁
+     *  初次得到装备 功能解锁
      */
-    static function funUnlock_shopBox_bright_open() {
+    static function funUnlock_equip_firstTime() {
         $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::shopBox_bright_open && ctx()->privateState->buyNum_ShopBoxBright == 0) {
+                if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::equip_firstTime && ctx()->store->equip == null) {
                     $tag = true;
                 }
 
-                if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::shopBox_bright_open && ctx()->privateState->buyNum_ShopBoxBright == 0) {
+                if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::equip_firstTime && ctx()->store->equip == null) {
                     $tag = true;
                 }
             }
@@ -990,8 +989,8 @@ class FightProc {
                 }
 
                 break;
-            case Enum_FunUnlockType::funUnlock_shopBox_bright_open:
-                if (ctx()->privateState->buyNum_ShopBoxBright > 0) {
+            case Enum_FunUnlockType::equip_firstTime:
+                if (ctx()->store->equip != null) {
                     $funUnlock = true;
                 }
 

+ 2 - 2
Gameserver/App/process/ShopProc.php

@@ -303,8 +303,7 @@ class ShopProc {
                 my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxBright >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
                 ctx()->privateState->lastFreeGetTs_ShopBoxBright = now();
             }
-            
-            FightProc::funUnlock_shopBox_bright_open();
+                        
         }
 
         $arr = array();
@@ -368,6 +367,7 @@ class ShopProc {
             }
         }
         TaskProc::OnOpenNumBrightBox_state($typeId, $buyNum);
+        FightProc::funUnlock_equip_firstTime();
     }
 
     /**