瀏覽代碼

修改在线时间计算

gwang 4 年之前
父節點
當前提交
a0d6a65fc5
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      Gameserver/Amfphp/model/Const/GameConfig.php
  2. 2 0
      Gameserver/Amfphp/process/ActiveProc.php

+ 1 - 1
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-08-20 19:57:41
+ // 日期: 2020-08-21 08:55:03
 ////////////////////
 
 /**

+ 2 - 0
Gameserver/Amfphp/process/ActiveProc.php

@@ -141,6 +141,8 @@ class ActiveProc {
      * @param req $req
      */
     static function getTotayOnlineInfos($req) {
+        $req->userInfo->game->privateState->onlineGiftts = now() - $req->userInfo->game->baseInfo->lastLogin;
+        UserProc::updateUserInfo();
         return Resp::ok(array(
                     "onlineGiftIDs" => $req->userInfo->game->privateState->onlineGiftIDs,
                     "onlineGiftts" => $req->userInfo->game->privateState->onlineGiftts