From 0d5d93d5adc8035d2a140ecb363fdb464cde9ed0 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 10 七月 2024 19:29:28 +0800 Subject: [PATCH] 10192 【越南】【主干】【港台】【砍树】上线增加膜拜主动推送(膜拜玩家信息转json格式) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py index 3c0ca30..2c05255 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py @@ -31,6 +31,7 @@ import IPY_GameServer import PlayerDBGSEvent import CrossChampionship +import GameWorldMineArea import IpyGameDataPY import CrossRealmMsg import ShareDefine @@ -207,18 +208,6 @@ 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, "") @@ -385,6 +374,12 @@ curPlayer.MapServer_QueryPlayerResult(0, 0, "DelItem", result, len(result)) return +def MapServerGiveAward(curPlayer, eventName, moneyInfo={}, itemList=[], drDict={}): + ## 地图给奖励 + result = str([eventName, moneyInfo, itemList, drDict]) + curPlayer.MapServer_QueryPlayerResult(0, 0, "GiveAward", result, len(result)) + return + ## 增加仙盟活跃 # @param curPlayer # @param successType: 成就类型 @@ -437,6 +432,7 @@ playerID = curPlayer.GetPlayerID() FuncOpenLogicDict = { ShareDefine.GameFuncID_Championship:lambda curObj:CrossChampionship.DoChampionshipOpen(curObj), + ShareDefine.GameFuncID_MineArea:lambda curObj:GameWorldMineArea.DoMineAreaFuncOpen(curObj), } for funcID in funcIDList: if funcID in FuncOpenLogicDict: -- Gitblit v1.8.0