王刚 há 1 ano atrás
pai
commit
80b46d472a

+ 2 - 6
Gameserver/App/base/Object_ext.php

@@ -43,15 +43,11 @@ class Object_ext {
         $vars = get_class_vars(get_class($this));                               # 后期绑定,获得实例的实际类名称=>属性数组
         foreach ($vars as $name => $value) {
 //            echoLine($name . " : " . ($this->$name != null && is_object($this->$name) ? get_class($this->$name) : "null"));
-//            echoLine($name . " : " . var_export($this->$name, true));
-
             if (isset($para[$name])) {
-                if (is_a($this->$name, "loyalsoft\Object_ext")) {
-//                    echoLine(" load $name");
+                if (is_a($this->$name, __CLASS__)) {                            # 递归加载数据
                     $this->$name->LoadFrom($para[$name]);
-//                    echoLine(" ");
                 } else {
-                    $this->$name = $para[$name];                                    # 取参数中的或者默认值
+                    $this->$name = $para[$name];                                # 取参数中的或者默认值
                 }
             }
         }

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

@@ -324,7 +324,6 @@ class UserProc {
 //            }
 //        }
         $a = new Data_UserGame();
-
         if (null == $a->readDataFromMem($key)) {                                # ps.下面这一段代码和经常删号会有冲突,因此关闭了 --gwang 2022.2.28
             $collection = "userInfoBack";
             $cursor = gMongo()->find($collection, ['key' => $key], ['sort' => array('ts' => -1), 'limit' => 1]); # 提取备份数据
@@ -337,8 +336,6 @@ class UserProc {
                 return null;
             }
         }
-//        echoLine(\json_encode($a));
-//        echoLine();
         return new Data_UserGame($a);
     }