cyzhao 1 viikko sitten
vanhempi
commit
881ac26514

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

@@ -462,6 +462,10 @@ class CmdCode {
      */
     const store_pet_removeFightPosition = 6439;
     
+    /**
+     * 
+     */
+    const store_clearNewPetShow = 6440;
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="商城操作码 - 65xx">
 

+ 9 - 3
Gameserver/App/model/User/Info_Store.php

@@ -116,12 +116,18 @@ class Info_Store extends Object_ext {
      */
     public $exploreArea;
     
+//    /**
+//     * 背包新获得的技能宝石加个标识
+//     * @var type
+//     */
+//    #[ArrayType]
+//    public $newGem_Store = array();
+    
     /**
-     * 背包新获得的技能宝石加个标识
+     * 
      * @var type
      */
-    #[ArrayType]
-    public $newGem_Store = array();
+    public $newPetShow = 0; 
 
     public function initialize() {
         StoreProc::AddMultiItemInStore(glc()->Init_Packet_Items, "UsrInit");

+ 20 - 15
Gameserver/App/process/StoreProc.php

@@ -98,27 +98,28 @@ class StoreProc {
             case CmdCode::store_pet_resetDispatchPet:                           # 6438 某区域的派遣宠物信息    
                 return PetProc::ResetDispatchPet();
             case CmdCode::store_pet_removeFightPosition:                        # 6439 
-                return PetProc::RemoveFightPosition();                                
+                return PetProc::RemoveFightPosition();        
+                
+            case CmdCode::store_clearNewPetShow:
+                return StoreProc::ClearNewPetShow();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
     
     /**
-     * 6440 清理背包里新宝石标识
+     * 6440 清理新lingchon空闲展示
      */
-//    public static function clearNewGemTip(){
-//        list($uid) = req()->paras;
-//      
-//        if(in_array($uid, ctx()->store()->newGem_Store)){
-//            StlUtil::arrayRemove( ctx()->store()->newGem_Store, $uid);
-//        }
-//        
-//        UserProc::updateUserInfo();
-//        return Resp::ok(array(               
-//                    'store' => ctx()->store,
-//        ));
-//    }
+    public static function ClearNewPetShow(){
+        //list() = req()->paras;
+      
+        ctx()->store()->newPetShow = 0;
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(               
+                    'store' => ctx()->store,
+        ));
+    }
 
     /**
      * 6420 降品
@@ -1321,7 +1322,11 @@ class StoreProc {
                     for ($i = 0; $i < $num; $i++) {
                         $pet = self::initPet($itemId);                  
                         $uid = $pet->uid;
-                        ctx()->store(true)->pet->$uid = $pet;  
+                        ctx()->store(true)->pet->$uid = $pet; 
+                        if(count(StlUtil::dictToArray(ctx()->store(true)->pet)) == 1){
+                            ctx()->store(true)->newPetShow = 1;   
+                        }
+                        
                     }                                                       
                     break;
                 case 701://道具宝箱