| | |
| | | return NotifyCodeList
|
| | |
|
| | | #------------------------------------------------------------------------------
|
| | | def LoadDBPlayer():
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | PlayerDBOper.FindDBOper(PlayerDBOper.Table_DBPlayer, {}, {"PlayerID":1, "AccID":1, "_id":0}, LoadDBPlayerRet)
|
| | | return
|
| | |
|
| | | def LoadDBPlayerRet(resultSetList, extendValueList):
|
| | | for resultDict in resultSetList:
|
| | | PyGameData.g_dbPlayerIDMap[resultDict["PlayerID"]] = resultDict["AccID"]
|
| | | GameWorld.Log("启动服务器加载DBPlayer玩家账号ID对应关系! %s, %s" % (len(PyGameData.g_dbPlayerIDMap), PyGameData.g_dbPlayerIDMap))
|
| | | return
|
| | |
|
| | | def GetDBPlayerAccIDByID(playerID):
|
| | | ## 获取玩家表账号ID - 根据玩家ID, 可用于判断是否本服玩家
|
| | | return PyGameData.g_dbPlayerIDMap.get(playerID, "")
|