From 80f11b590ece01d82d2af052876366bd2c1df2eb Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 21 八月 2018 16:10:09 +0800 Subject: [PATCH] add:【1891】神兽地界 --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py index 84656ef..d777f7e 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py @@ -256,6 +256,10 @@ elif queryType == ChConfig.queryType_NPCInfo: __QueryMapNPCInfo(curPlayer, queryCallName, sendCMD) return + # 查询地图NPC数量 + elif queryType == ChConfig.queryType_NPCCnt: + __QueryMapNPCCntInfo(curPlayer, queryCallName, sendCMD) + return else: GameWorld.ErrLog('unKnow queryType = %s' % (queryType)) @@ -290,6 +294,26 @@ queryCallName, sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex()) return +## 查询目标地图NPC数量 +# @param curPlayer: 请求玩家 +# @param queryCallName: 请求回调名 +# @param sendCMD: 请求的命令 根据请求类型和请求命令来决定最终操作 +# @return None +def __QueryMapNPCCntInfo(curPlayer, queryCallName, sendCMD): + playerManager = GameWorld.GetPlayerManager() + try: + mapInfo = eval(sendCMD) + except BaseException: + GameWorld.ErrLog("__QueryMapNPCCntInfo() sendCMD=%s error" % sendCMD) + return + + if not mapInfo: + return + + tagMapID = mapInfo[0] + playerManager.MapServer_QueryPlayer(curPlayer.GetPlayerID(), ChConfig.queryType_NPCCnt, 0, tagMapID, + queryCallName, sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex()) + return ## 获得家族属性(等级,人数)获得自己所在家族的属性 # @param curPlayer 请求的玩家 @@ -727,7 +751,10 @@ if callName =="AddBossRebornPoint": GameWorldBoss.AddBossRebornPoint(eval(resultName)) return - + #通知神兽副本NPC刷新时间 + if callName =="DogzNPCTime": + GameWorldBoss.Sync_DogzNPCRefreshTime(eval(resultName)) + return #---return分割线----------------------------------------------------------------- -- Gitblit v1.8.0