Bladeren bron

红点接口

cyzhao 11 maanden geleden
bovenliggende
commit
05cf5707f6

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

@@ -106,6 +106,11 @@ class CmdCode {
      * 移除新头像标志
      */
     const cmd_user_removeNewHeadImgTip = 6007;
+    
+    /**
+     * 读公告
+     */
+    const cmd_user_readAnnouncement = 6008;
 
     // </editor-fold>
     // <editor-fold defaultstate="collapsed" desc="活动操作码 - 61xx">

+ 8 - 0
Gameserver/App/model/User/Info_PrivateState.php

@@ -220,6 +220,14 @@ class Info_PrivateState extends Object_ext {
     #[ArrayType]
     public $usedTokens = array();
     
+    /**
+     * 读公告记录
+     * @var array()
+     */
+    #[ArrayType]
+    public $announcement_drawed = array();
+
+
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();
         $this->junbeiShop_AllNumRecord = new \stdClass();

+ 2 - 0
Gameserver/App/process/FightProc.php

@@ -138,6 +138,8 @@ class FightProc {
             'prizeArr' => $prizeArr,
             'store' => ctx()->store,
             'task' => ctx()->task,
+            'reward'=> StoreProc::$reward,
+            'reward_Gem'=> StoreProc::$reward_Gem,
         );
         return Resp::ok($ret);
     }

+ 17 - 0
Gameserver/App/process/UserProc.php

@@ -34,11 +34,28 @@ class UserProc {
                 return UserProc::delUserUid();
             case CmdCode::cmd_user_removeNewHeadImgTip:                         # 6007 移除新头像标志
                 return UserProc::removeNewHeadImgTip();
+            case CmdCode::cmd_user_readAnnouncement:                            # 6008 读公告记录 
+                return UserProc::readAnnouncement();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
     
+    /**
+     * 6008 读公告记录 
+     */
+    public static function readAnnouncement() {       
+        list($id) = req()->paras;
+        
+        if(!in_array($id, ctx()->privateState->announcement_drawed)){
+            ctx()->privateState->announcement_drawed[] = $id;
+        }
+                       
+        UserProc::updateUserInfo();
+      
+        return Resp::ok(array());
+    }
+    
     /**
      * 6007 移除新头像标志
      */