Browse Source

bug修复

cyzhao 1 year ago
parent
commit
5d269d7c5e

+ 2 - 2
Gameserver/App/base/Resp.php

@@ -103,11 +103,11 @@ class Resp extends Object_ext {
         if (count($this->events) > 0) {                                         # 对于出现event的情况下自动附带store到客户端.
             if (is_array($this->result)) {
                 if (!array_key_exists('store', (array) $this->result)) {
-                    $this->result['store'] = ctx()->store;
+                    //$this->result['store'] = ctx()->store;
                 }
             } else {
                 if (!array_key_exists('store', (array) $this->result)) {
-                    $this->result->store = ctx()->store;
+                    //$this->result->store = ctx()->store;
                 }
             }
         }

+ 6 - 1
Gameserver/App/configs/GameConfig.php

@@ -108,7 +108,12 @@ class GameConfig {
         return self::get_hash_item('service_schedule', $itemid);
     }
     
-    
+    /**
+     * @return \sm_errmsg errmsg item数据
+     */
+    public static function errmsg_getItem($itemid) {
+        return self::get_hash_item('errmsg', $itemid);
+    }
     
     
 // </editor-fold>

+ 2 - 1
Gameserver/App/model/User/Data_UserGame.php

@@ -37,7 +37,8 @@ class Data_UserGame extends HashSaver {
      * @return \UserGameModel
      */
     public function initialize() {
-        my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御        
+        //my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御        
+        $this->baseInfo = new Info_UserBase();
         $this->baseInfo->initialize();
 
     

+ 7 - 7
Gameserver/App/model/User/Info_UserBase.php

@@ -93,16 +93,16 @@ class Info_UserBase extends Object_ext {
 
     public function initialize() {
 //        my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御
-//        $this->gold = GameConfig::primordial_data()->User_Gold;
-//        $this->cash = GameConfig::primordial_data()->User_Cash;
+       $this->gold = 0;
+        $this->cash = 0;
 //        $this->xp = GameConfig::primordial_data()->User_XP;
 //        $this->tili = GameConfig::globalsettings()->TiliMaxVal;                 # 最大体力
 //        $this->maxXp = 0;
-//        $this->level = 1;
-//        $this->name = '步惊云';
-//        $this->spar = 0;
-//        $this->headImg = GameConfig::primordial_data()->User_head;
-//        $this->img = GameConfig::primordial_data()->User_img;
+        $this->level = 1;
+        $this->name = '';
+      
+        $this->headImg = "";
+        $this->img = "";
     }
 
     // <editor-fold defaultstate="collapsed" desc="  方法  ">

+ 1 - 1
Gameserver/App/process/UserProc.php

@@ -244,7 +244,7 @@ class UserProc {
         }
         ctx()->baseInfo->lastLogin = now();                                     # 更新下访问时间
 
-        TapDBUtil::SOnUserLogin();                                              # 向tapdb上报玩家登录 2023.5.10
+        //TapDBUtil::SOnUserLogin();                                              # 向tapdb上报玩家登录 2023.5.10
         
         return $ret;
     }