浏览代码

装备红点

cyzhao 1 周之前
父节点
当前提交
ad15fc6996
共有 1 个文件被更改,包括 12 次插入4 次删除
  1. 12 4
      Gameserver/App/process/StoreProc.php

+ 12 - 4
Gameserver/App/process/StoreProc.php

@@ -846,11 +846,19 @@ class StoreProc {
      * @return Resp
      */
     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;
+        list($type,$uid) = req()->paras; //宝石uid       
 
+        if($type == 1){
+            my_Assert(StlUtil::dictHasProperty(ctx()->store()->equip, $uid), ErrCode::user_store_NoEquip);
+            ctx()->store(true)->equip->$uid->isNew = 0;
+        } else {
+            $dic = ctx()->store(true)->equip;
+            foreach ($dic as $equip_uid => $equip) {
+                if($equip->isNew == 1){
+                    ctx()->store(true)->equip->$equip_uid->isNew = 0;
+                }
+            }     
+        }            
         UserProc::updateUserInfo();
         return Resp::ok(array());
     }