Przeglądaj źródła

装备新字段

cyzhao 1 tydzień temu
rodzic
commit
3d2dafa213

+ 2 - 2
Gameserver/App/base/CmdCode.php

@@ -313,9 +313,9 @@ class CmdCode {
     const store_gemLockState = 6409;
 
     /**
-     * 移除装备可以升级的提示 -------废弃
+     * 移除装备的提示
      */
-    const store_equip_removeEquipUpgradeTip = 6410;
+    const store_equip_removeNewEquipTip = 6410;
 
     /**
      * 移除新宝石提示 -------废弃

+ 6 - 0
Gameserver/App/model/User/Ins_Equip.php

@@ -41,6 +41,12 @@ class Ins_Equip extends Object_ext{
      * @var type
      */
     public $qual;
+    
+    /**
+     * 
+     * @var type
+     */
+    public $isNew = 0;
 
     /**
      * 构造函数

+ 26 - 17
Gameserver/App/process/StoreProc.php

@@ -38,8 +38,8 @@ class StoreProc {
                 return StoreProc::SwitchEquipPag();
             case CmdCode::store_gemLockState:                                   # 6409 宝石开锁解锁
                 return StoreProc::GemLockState();
-            case CmdCode::store_equip_removeEquipUpgradeTip:                    # 6410 移除装备可以升级绿点提示 -------废弃
-                return StoreProc::RemoveEquipUpgradeTip();
+            case CmdCode::store_equip_removeNewEquipTip:                        # 6410 移除new装备提示
+                return StoreProc::RemoveNewEquipTip();
             case CmdCode::store_equip_removeNewGemTip:                          # 6411 移除是新宝石绿点提示
                 return StoreProc::RemoveNewGemTip();
             case CmdCode::store_allEquipUpgrade:                                # 6412 所有装备的一键升级-----------废弃
@@ -842,22 +842,17 @@ class StoreProc {
     }
 
     /**
-     * 移除装备可以升级绿点提示 -------废弃
+     * 移除new装备提示
      * @return Resp
      */
-    public static function RemoveEquipUpgradeTip() {
-//        list($posId) = req()->paras; //装备部位
-//        $user = ctx();
-//
-//        my_Assert(StlUtil::dictHasProperty($user->store->equipPosition, $posId), ErrCode::user_store_NoEquip);
-//
-//        $user->store->equipPosition->$posId->tip = 0;
-//
-//        ctx($user);
-//        UserProc::updateUserInfo();
-//        return Resp::ok(array(
-//                    'gold' => 0,
-//                    'store' => $user->store,));
+    public static function RemoveNewEquipTip() {
+        list($uid) = req()->paras; //宝石uid       
+
+        my_Assert(StlUtil::dictHasProperty(ctx()->store()->equip, $uid), ErrCode::user_store_NoEquip);
+        ctx()->store(true)->equip->$uid->isNew = 0;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
     }
 
     /**
@@ -1385,7 +1380,21 @@ class StoreProc {
             $dic->$i = 1;
         }
         $ins_equip->gemSetSlot = $dic;
-        
+        $equipDic = ctx()->store()->equip;
+        $isExist = false;
+        foreach ($equipDic as $key => $value) {
+            if($key == $uid){
+                continue;
+            }
+            if($value->typeId == $typeId){
+                $isExist = true;
+                break;
+            }
+        }
+        if(!$isExist){
+            $ins_equip->isNew = 1;
+        }
+          
         return $ins_equip;
     }