Forráskód Böngészése

Merge branch 'dev' into TTT

王刚 2 éve
szülő
commit
774144729f

+ 5 - 0
Gameserver/Amfphp/Services/TestServer.php

@@ -135,6 +135,11 @@ SCR;
             }
         }
 
+        // <editor-fold defaultstate="collapsed" desc="清理mongodb中的数据">
+
+        gMongo()->delete("playerMapInfo", array('Uid' => $uid, 'ZoneId' => $zoneid)); # 地图
+        gMongo()->delete("userInfoBack", array('key' => $gameInfoKey));              # 游戏数据备份
+// </editor-fold>
 
 
 

+ 3 - 3
Gameserver/Amfphp/configs/config_and.php

@@ -12,9 +12,9 @@ class config_and extends config {
 
     function _InitTester() {
         $this->testerArr = array(
-            "gwang", //  王刚
-            "8796-any", //  王倩倩
-            "wanggangzero.cn", // 王刚
+            "gwang", //                王刚
+            "8796-any", //             王倩倩
+            "wanggangzero.cn", //      王刚
         );
     }
 

+ 18 - 18
Gameserver/Amfphp/model/User/Data_UserGame.php

@@ -49,11 +49,11 @@ class Data_UserGame extends HashSaver {
      */
     public $gates;
 
-    /**
-     * 地图解锁信息
-     * @var Info_Map
-     */
-    public $map;
+//    /**
+//     * 地图解锁信息
+//     * @var Info_Map
+//     */
+//    public $map;
 
     /**
      * 新版地图信息v2022.3
@@ -160,7 +160,7 @@ class Data_UserGame extends HashSaver {
             $this->heros = new Info_UserGameHero();                             # 英雄数据
 //            $this->heros->InitializeHero();                                     # 添加初始英雄
             $this->gates = new Info_UserGateDifficulty();                            # 初始化关卡默认数据
-            $this->map = new Info_Map();                                        # 初始化地图解锁数据
+//            $this->map = new Info_Map();                                        # 初始化地图解锁数据
             $this->newMap = new Info_NewMap();                                  # 初始化改版地图2022.3
 //            $this->heroManual = new HeroManualModel();                          # 初始化图鉴数据结构
             $this->NewbieGuide = new Info_NewbieGuide();                        # 初始化新手引导结构
@@ -271,18 +271,18 @@ class Data_UserGame extends HashSaver {
         return $this->gates;
     }
 
-    /**
-     * 地图数据
-     * @param bool $save 是否需要回存
-     * @return Info_Map
-     */
-    public function map($save = true) {
-        $this->map = new Info_Map($this->map);
-        if ($save) {
-            self::save_tag("map");
-        }
-        return $this->map;
-    }
+//    /**
+//     * 地图数据
+//     * @param bool $save 是否需要回存
+//     * @return Info_Map
+//     */
+//    public function map($save = true) {
+//        $this->map = new Info_Map($this->map);
+//        if ($save) {
+//            self::save_tag("map");
+//        }
+//        return $this->map;
+//    }
 
     /**
      * 新地图数据

+ 16 - 16
Gameserver/Amfphp/model/User/Info_NewMap.php

@@ -12,7 +12,7 @@ namespace loyalsoft;
 class Info_NewMap extends Object_ext {
 
     /**
-     * 当前所在据点id
+     * 当前所在地图的id
      * @var type
      */
     public $curMapId;
@@ -22,31 +22,33 @@ class Info_NewMap extends Object_ext {
      * @var dic< 据点id, Ins_FootHold >
      */
     public $unlockedFootholds;
-    
+
     /**
      * 已经解锁的地图上的区域、npc、道具等等信息
      * @var type
      */
     public $unlockMapTypeList;
-    
+
     /**
      * 回城券使用的传送阵记录
      * @var type
      */
     public $huichengquanRecord = null;
-    
+
     /**
-     * 当前地图所在区里面的回城券使用地的mapid
+     * 当前地图所在区里面的传送门目的地的mapid
+     * 回城券=>从当前地图回据点
+     * 传送门=>从据点回到回城前的地图
      * @var type
      */
     public $lastMapId = 0;
-    
+
     /**
      * 当前据点id
      * @var type
      */
     public $curFootholdId = 0;
-            
+
     function __construct($arg = null) {
         if (null === $arg) {
             // 直接初始化8个大陆的基本数据
@@ -55,10 +57,10 @@ class Info_NewMap extends Object_ext {
             $this->curMapId = $initMapid;                                       # 当前位置为新手村
             $this->curFootholdId = $initMapid;                                      # 当前据点id
             $this->unlockedFootholds = ObjectInit();
-            
+
             $gateZonemo = GameConfig::gate_zone_getItem(501007);
-            if($gateZonemo!=null){
-                $list = explode(',',$gateZonemo->contains); 
+            if ($gateZonemo != null) {
+                $list = explode(',', $gateZonemo->contains);
                 foreach ($list as $id) {
                     $mo = GameConfig::gate_getItem($id);
                     $footHold = new Ins_FootHold();
@@ -66,11 +68,10 @@ class Info_NewMap extends Object_ext {
                     $footHold->curMapType = $mo->mapType;
                     $this->unlockedFootholds->$id = $footHold;
                 }
-                
             }
-            
-            
-            
+
+
+
 //            $mo = GameConfig::gate_getItem($initMapid);
 //            $footHold = new Ins_FootHold();
 //            $footHold->mapId = $mo->gateId;
@@ -94,14 +95,13 @@ class Info_NewMap extends Object_ext {
 //            $footHold->curMapType = $mo->mapType;
 //            $this->unlockedFootholds->$dixiachengId = $footHold; 
 //            
-            
 //            $dixiachengId = 503002;
 //            $mo = GameConfig::gate_getItem($dixiachengId);
 //            $footHold = new Ins_FootHold();
 //            $footHold->mapId = $mo->gateId;
 //            $footHold->curMapType = $mo->mapType;
 //            $this->unlockedFootholds->$dixiachengId = $footHold;
-            
+
             $this->unlockMapTypeList = ObjectInit();                            #初始化--已经解锁的地图上的区域、npc、道具等等信息      
             $this->huichengquanRecord = ObjectInit();                                #                      
         } else {

+ 2 - 2
Gameserver/Amfphp/process/FightProc/SweepGatesProc.php

@@ -161,8 +161,8 @@ class SweepGatesProc {
                 break;
         }
 
-        $map = new Info_Map();
-        $map->addBattleRecord($gateId);
+//        $map = new Info_Map();
+//        $map->addBattleRecord($gateId);
         //$map->addBattleNumRecord($gateId, $ret);
         $user = ctx();
         $result = array(

+ 5 - 23
Gameserver/Amfphp/test.php

@@ -11,27 +11,9 @@ echoLine("tsDay:" . totalDays());
 
 //SelfChecker::CheckAll();
 //
-//set_time_limit(15);                                                           # 设置执行超时时间
 //
-
-$id = 19463;
-//$id = ftok(__FILE__, 't');
-//$data = now();
-//$shm = new ShmopBlock($id);
-//$shm->write($data);
-//if ($shm->exists()) {
-//    $shm->write("wanggangzero.cn");
-//    echoLine("existing:" . $shm->read());
-//} else {
-//    echoLine("not existing.");
-//    $shm->write($data);
-//}
-//echoLine("reading:" . $shm->read());
-$yac = new \Yac();
-$a = $yac->get("wg");
-if ($a) {
-    echoLine($a);
-} else {
-    $yac->set("wg", "wanggangzero.cn");
-}
-  
+//set_time_limit(15);                                                           #  
+//
+$uid = "D51D63CA040982E406BDE9898AD757AE";
+$zoneid = 1;
+gMongo()->delete("playerMapInfo", array('Uid' => $uid, 'ZoneId' => $zoneid)); # 地图

+ 8 - 8
Gameserver/Public/BackOffice/core.php

@@ -562,7 +562,7 @@ class core {
                         } elseif ($value === false) {
                             $value = '0';
                         } elseif (is_int($value) || is_float($value)) {
-
+                            
                         } else {
                             $value = '\'' . mysqli_real_escape_string($dbh, (string) $value) . '\'';
                         }
@@ -672,7 +672,7 @@ class core {
                             } elseif ($value2 === false) {
                                 $value2 = '0';
                             } elseif (is_int($value2) || is_float($value2)) {
-
+                                
                             } else {
                                 $value2 = '\'' . str_replace($mysql_escape_search, $mysql_escape_replace, $value2) . '\'';
                             }
@@ -684,7 +684,7 @@ class core {
                     } elseif ($value === false) {
                         $value = '0';
                     } elseif (is_int($value) || is_float($value)) {
-
+                        
                     } else {
                         $value = '\'' . str_replace($mysql_escape_search, $mysql_escape_replace, $value) . '\'';
                     }
@@ -1180,7 +1180,7 @@ class core {
                                 } elseif ($value === false) {
                                     $value = '0';
                                 } elseif (is_int($value) || is_float($value)) {
-
+                                    
                                 } else {
                                     $value = '\'' . str_replace($mysql_escape_search, $mysql_escape_replace, $value) . '\'';
                                 }
@@ -1341,7 +1341,7 @@ class core {
             return;
         }
         foreach ($class_arr as $classkey => $classname) {
-
+            
         }
         unset($class_arr [$classkey]);
         if (is_int($classkey)) {
@@ -1525,7 +1525,7 @@ class core {
             return;
         }
         foreach ($class_arr as $classkey => $classname) {
-
+            
         }
         unset($class_arr [$classkey]);
         if (is_int($classkey)) {
@@ -1568,7 +1568,7 @@ class core {
         } else {
             if ($table_param === null) {
                 if (isset($table_class)) {
-
+                    
                 } elseif (is_string($classname)) {
                     if (class_exists($classname)) {
                         $table_class = $classname;
@@ -3288,7 +3288,7 @@ class core {
                         } else {
                             list ($str1, $str2) = explode('::', $str);
                             if ($str1 === '' || $str2 === '') {
-                                continue;
+                                continue 2;
                             }
                             $result_array [] = array($str1, $str2);
                         }