| | |
| | | import os
|
| | | import IPY_GameWorld
|
| | | import ShareDefine
|
| | |
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #MapServer服务器部署之前请根据目录实际情况更改下列参数
|
| | | #MapServerPath 为当前的MapServer的根目录
|
| | |
| | | #初始化python
|
| | | return
|
| | |
|
| | | #调用该函数时,C++已经设置好区服,如果改变区服需重启
|
| | | #在该文件调用此函数为了减少import带来的影响
|
| | | def StartDB(tick):
|
| | | #初始化数据库, 恢复备档(按区服记录), 加载静态表
|
| | | from PyMongoDB import PyMongoMain
|
| | | PyMongoMain.StartDB()
|
| | | return
|
| | |
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##获得MapServer脚本路径
|
| | | # @param 无参数
|
| | |
| | | return MapServerPath
|
| | |
|
| | |
|
| | | ##获得DB路径
|
| | | ##获得DB路径(单服Map里的DB路径)
|
| | | # @param 无参数
|
| | | # @return 返回值当前的DB路径
|
| | | def GetDBPath():
|
| | | return MapServerPath.split("ZoneServerGroup")[0]+ "db\\PyMongoDataServer\\"
|
| | | return MapServerPath.split("ZoneServerGroup")[0] + "ZoneServerGroup\\map1_8G\\MapServer\\MapServerData\\Script\\PyMongoDB"
|
| | |
|
| | | def GetServerRootPath():
|
| | | ##获取服务器根路径
|
| | | return MapServerPath.split("ZoneServerGroup")[0]
|
| | |
|
| | | ##获得ServersRoute路径, 如可获得物理服相关配置 GroupID
|
| | | # @param 无参数
|
| | | # @return 返回值当前的DB路径
|
| | | def GetServersRoutePath():
|
| | | return GetServerRootPath()+ "ServersRoute\\"
|
| | |
|
| | |
|
| | | def GetSizeof(o, isAsize=True):
|
| | | return 0
|
| | | #if isAsize:
|