Sfoglia il codice sorgente

功能解锁条件修改

cyzhao 6 mesi fa
parent
commit
f565ddcaa4

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

@@ -26,9 +26,9 @@ class Enum_FunUnlockType {
     const passBattle_Gate = 2;
     
     /*
-     * 初次得到宝石
+     * 初次开启璀璨宝箱
      */
-    const getGem = 3;
+    const shopBox_bright_open = 3;
     
     /*
      * 玩家等级要求

+ 6 - 6
Gameserver/App/process/EmailProc.php

@@ -178,9 +178,9 @@ class EmailProc {
         my_Assert($mail->drawedts <= 0, ErrCode::email_appendix_drawed);        # 邮件不可重复领取
         $prize = explode(',', $mail->appendix);
         $itemMo = GameConfig::item_getItem($prize[0]);
-        if ($itemMo->itemType == 201) {
-            FightProc::funUnlock_Gem();
-        }
+//        if ($itemMo->itemType == 201) {
+//            FightProc::funUnlock_Gem();
+//        }
 
         $err = StoreProc::AddMultiItemInStore($mail->appendix, 4);              # 发放奖励
 //        echoLine(json_encode(ctx()->store()->equip));
@@ -233,9 +233,9 @@ class EmailProc {
                 }
                 $prize = explode(',', $m->appendix);
                 $itemMo = GameConfig::item_getItem($prize[0]);
-                if ($itemMo->itemType == 201) {
-                    FightProc::funUnlock_Gem();
-                }
+//                if ($itemMo->itemType == 201) {
+//                    FightProc::funUnlock_Gem();
+//                }
 
                 $err = StoreProc::AddMultiItemInStore($m->appendix, 4);
                 my_Assert(ErrCode::ok == $err, $err);                           # 发奖成功

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

@@ -622,14 +622,14 @@ class FightProc {
             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;
-                }
-            }
+//            $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);
         }
         ctx()->gates->GateList->$gateId = $gateInfo;
@@ -739,7 +739,7 @@ class FightProc {
         }
         # 宝石奖励: 数量min-max;品质:权重,品质:权重...
         if (strlen($waveMo->rewardGem) > 0) {
-            self::funUnlock_Gem();
+            //self::funUnlock_Gem();
 
             list($gs_num, $gs_props) = explode(';', $waveMo->rewardGem);
             list($gem_min, $gem_max) = explode('-', $gs_num);                   # 宝石数量
@@ -870,18 +870,18 @@ class FightProc {
     }
 
     /**
-     *  初次得到宝石 功能解锁
+     *  初次开启璀璨宝箱 功能解锁
      */
-    static function funUnlock_Gem() {
+    static function funUnlock_shopBox_bright_open() {
         $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::getGem && ctx()->store->gemStore == null) {
+                if ($mo->unlockType1 != null && $mo->unlockType1 == Enum_FunUnlockType::shopBox_bright_open && ctx()->privateState->buyNum_ShopBoxBright == 0) {
                     $tag = true;
                 }
 
-                if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::getGem && ctx()->store->gemStore == null) {
+                if ($mo->unlockType2 != null && $mo->unlockType2 == Enum_FunUnlockType::shopBox_bright_open && ctx()->privateState->buyNum_ShopBoxBright == 0) {
                     $tag = true;
                 }
             }
@@ -990,8 +990,8 @@ class FightProc {
                 }
 
                 break;
-            case Enum_FunUnlockType::getGem:
-                if (ctx()->store->gemStore != null) {
+            case Enum_FunUnlockType::funUnlock_shopBox_bright_open:
+                if (ctx()->privateState->buyNum_ShopBoxBright > 0) {
                     $funUnlock = true;
                 }
 

+ 3 - 1
Gameserver/App/process/ShopProc.php

@@ -303,6 +303,8 @@ 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();
@@ -313,7 +315,7 @@ class ShopProc {
         }
         TaskProc::OnOpenNumBrightBox($typeId, $buyNum);
         TaskProc::OnOpenNumAnyBox($buyNum);
-        FightProc::funUnlock_Gem();
+        //FightProc::funUnlock_Gem();
 
         $perList = explode(';', $mo->percent);
         $allNum = 0;