浏览代码

fixed: 角标记录去重

王刚 3 年之前
父节点
当前提交
7a203df8c8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Gameserver/Amfphp/process/EventProc.php

+ 2 - 2
Gameserver/Amfphp/process/EventProc.php

@@ -33,7 +33,7 @@ class EventProc {
             UserProc::updateUserInfo();
         }
         $arr = array_values(array_unique(req()->userInfo->game->privateState->cornerSignNotifications)); # 返回值去重
-        //        req()->userInfo->game->privateState->cornerSignNotifications = [];       # 清理记录
+        req()->userInfo->game->privateState->cornerSignNotifications = $arr;    # 清理记录
         return Resp::ok(array("notifications" => $arr));                        # 返回
     }
 
@@ -43,7 +43,7 @@ class EventProc {
     static function GetCornerSignNotifications() {
         // 这里直接返回, 将来开发对应的触发逻辑, 给数组中添加相应的值
         $arr = array_values(array_unique(req()->userInfo->game->privateState->cornerSignNotifications)); # 返回值去重
-//        req()->userInfo->game->privateState->cornerSignNotifications = [];       # 清理记录
+        req()->userInfo->game->privateState->cornerSignNotifications = $arr;    # 清理记录
         UserProc::updateUserInfo();
         return Resp::ok(array("notifications" => $arr));                        # 返回
     }