gwang %!s(int64=4) %!d(string=hai) anos
pai
achega
c432905d28

+ 1 - 1
Gameserver/Amfphp/Services/AppServer.php

@@ -59,7 +59,7 @@ class AppServer {
             }
             }
         }
         }
         $resp->AfterProc();
         $resp->AfterProc();
-        GAME_ONLINE and self::LogCmd($resp);                             # 记录操作日志
+        GAME_ONLINE and self::LogCmd($resp);                                    # 记录操作日志
         CLog::flush();                                                          # flush日志
         CLog::flush();                                                          # flush日志
     }
     }
 
 

+ 12 - 13
Gameserver/Amfphp/model/User/UserInfoMo.php

@@ -8,18 +8,17 @@ namespace loyalsoft;
  * @author gwang
  * @author gwang
  */
  */
 class UserInfoMo {
 class UserInfoMo {
-
-    /**
-     * 分区Id
-     * @var string
-     */
-    public $zoneid;
-
-    /**
-     * 玩家唯一id
-     * @var string
-     */
-    public $uid;
+//    /**
+//     * 分区Id
+//     * @var string
+//     */
+//    public $zoneid;
+//
+//    /**
+//     * 玩家唯一id
+//     * @var string
+//     */
+//    public $uid;
 
 
     /**
     /**
      * 玩家游戏数据
      * 玩家游戏数据
@@ -39,7 +38,7 @@ class UserInfoMo {
                 return 'ios';                                                   # only ios
                 return 'ios';                                                   # only ios
             case 'and':                                                         # 安卓版/默认
             case 'and':                                                         # 安卓版/默认
             default :
             default :
-                return substr($this->uid, 0, strrpos($this->uid, '-'));        # 提取平台字符串
+                return substr(req()->uid, 0, strrpos(req()->uid, '-'));         # 提取平台字符串
             //substr() 函数返回字符串的一部分 strrpos() 函数查找字符串在另一字符串中最后一次出现的位置。
             //substr() 函数返回字符串的一部分 strrpos() 函数查找字符串在另一字符串中最后一次出现的位置。
         }
         }
     }
     }

+ 7 - 7
Gameserver/Amfphp/process/UserProc.php

@@ -404,8 +404,8 @@ class UserProc {
     static function createUser($rolename, $gender, $profile_img) {
     static function createUser($rolename, $gender, $profile_img) {
         $userInfo = new UserInfoMo();
         $userInfo = new UserInfoMo();
         req()->userInfo = $userInfo;                                             # 更新Req的userinfo,
         req()->userInfo = $userInfo;                                             # 更新Req的userinfo,
-        $userInfo->uid = req()->uid;
-        $userInfo->zoneid = req()->zoneid;
+//        $userInfo->uid = req()->uid;
+//        $userInfo->zoneid = req()->zoneid;
         $userInfo->game = new Data_UserGame();
         $userInfo->game = new Data_UserGame();
         $userInfo->game->initialize();                                          # 初始化玩家数据
         $userInfo->game->initialize();                                          # 初始化玩家数据
         $userInfo->game->baseInfo->name = $rolename;
         $userInfo->game->baseInfo->name = $rolename;
@@ -469,8 +469,8 @@ class UserProc {
             return null;
             return null;
         }
         }
         $usrInfo = new UserInfoMo();
         $usrInfo = new UserInfoMo();
-        $usrInfo->zoneid = $zoneid;
-        $usrInfo->uid = $uid;
+//        $usrInfo->zoneid = $zoneid;
+//        $usrInfo->uid = $uid;
         $g = new Data_UserGame($a);
         $g = new Data_UserGame($a);
         $usrInfo->game = $g;
         $usrInfo->game = $g;
         return $usrInfo;
         return $usrInfo;
@@ -489,10 +489,10 @@ class UserProc {
      * 回写玩家数据
      * 回写玩家数据
      * @param UserInfoMo $userInfo
      * @param UserInfoMo $userInfo
      */
      */
-    public static function setUserInfo(UserInfoMo $userInfo) {
+    public static function setUserInfo($userInfo) {
         if ($userInfo) {
         if ($userInfo) {
-            $zoneid = $userInfo->zoneid;
-            $uid = $userInfo->uid;
+            $zoneid = req()->zoneid;
+            $uid = req()->uid;
             $userInfo->game->baseInfo->lastSaveTs = now();
             $userInfo->game->baseInfo->lastSaveTs = now();
             $key = MemKey_User::Info_hash($zoneid, $uid);
             $key = MemKey_User::Info_hash($zoneid, $uid);
             return $userInfo->game->updateData($key);
             return $userInfo->game->updateData($key);