From f4f907ae6ae2f22207859230e8fc88583fe3a723 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 10 十一月 2021 11:26:11 +0800 Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统 --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 88 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 81 insertions(+), 7 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py index 7672c0a..6aac47a 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py @@ -34,6 +34,7 @@ import ChConfig import GMCommon import DirtyList +import CrossBillboard import PlayerBillboard import PlayerExam import PlayerControl @@ -72,9 +73,15 @@ import ChPyNetSendPack import NetPackCommon import AuctionHouse +import PlayerFairyDomain +import GameWorldSkyTower +import GameWorldArena +import GameWorldItem +import PlayerAssist import time import datetime +import json #--------------------------------------------------------------------- #全局变量 #--------------------------------------------------------------------- @@ -329,16 +336,25 @@ SyncPlayerCrossMapNPCInfo(curPlayer, mapID, npcIDList, mapNPCInfoDict) return + serverGroupID = GameWorld.GetServerGroupID() + zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID) + if not zoneIpyData: + return + zoneID = zoneIpyData.GetZoneID() + # 本服缓存超时,发送跨服服务器查询 playerID = curPlayer.GetPlayerID() - CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_QueryNPCInfo, {"PlayerID":playerID, "MapID":mapID, "NPCIDList":npcIDList}) + dataMsg = {"PlayerID":playerID, "ZoneID":zoneID, "MapID":mapID, "NPCIDList":npcIDList} + CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_QueryNPCInfo, dataMsg) return def ClientServerMsg_QueryNPCInfo(serverGroupID, msgData): ## 收到子服请求查看跨服地图NPC个数信息 + zoneID = msgData["ZoneID"] mapID = msgData["MapID"] - zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(mapID, serverGroupID) + + zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(zoneID, mapID) if not zoneIpyData: return realMapID = zoneIpyData.GetMapID() @@ -482,6 +498,13 @@ callName = pack.GetCallName() resultName = pack.GetResultName() #[queryid, 人气值, 物品ID] + if callName == "PlayerRealLoginOK": + curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) + if not curPlayer: + return + ChPlayer.DoPlayerRealLoginOK(curPlayer, tick) + return + if callName == "SendMail": title, content, getDays, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource = eval(resultName) limitTime = str(GameWorld.GetDatetimeByDiffDays(getDays)) @@ -491,6 +514,11 @@ if callName == "SendMailBatch": PlayerCompensation.SendPersonalItemMailBatch(eval(resultName)) + return + + if callName == "SendEntireMail": + mailTypeKey, getDays, limitLV, limitLVType, addItemList, paramList, gold, goldPaper, silver, detail, moneySource = eval(resultName) + PlayerCompensation.SendEntireMail(mailTypeKey, getDays, limitLV, limitLVType, addItemList, paramList, gold, goldPaper, silver, detail, moneySource) return if callName == "SendMsgToCrossServer": @@ -512,6 +540,14 @@ PlayerControl.CrossNotify(serverGroupIDList, crossNotifyList) return + if callName == "DynamicLineMapStateChange": + PlayerFB.OnCrossDynamicLineStateChange(eval(resultName)) + return + + if callName == "DynamicLineMapInitOK": + PlayerFB.OnCrossDynamicMapReset(eval(resultName)) + return + if callName == "CommMapServerInitOK": dataMapID, lineID, realMapID, copyMapID = eval(resultName) PyGameData.g_commMapLineInfo[(dataMapID, lineID)] = (realMapID, copyMapID) @@ -520,6 +556,10 @@ if callName == "UpdateBillboard": #地图服务器更新排行榜 PlayerBillboard.MapServer_UpdateBillboard(eval(resultName), tick) + return + + if callName == "UpdateCrossBillboard": #地图服务器更新跨服排行榜 + CrossBillboard.MapServer_UpdateCrossBillboard(eval(resultName)) return if callName == 'PyAddFamilyInfoValue': #地图服务器增加战盟信息值 @@ -695,6 +735,11 @@ GameWorldProcess.UpdGlobalKillCount(eval(resultName)) return + # 缓存装备广播信息中的装备明细信息 + if callName == "NotifyEquipDetailInfo": + GameWorldItem.OnCacheNotifyEquipDetailInfo(json.loads(resultName), tick) + return + #生成仙盟红包 if callName == "MapServer_CreatRedPacket": PlayerFamilyRedPacket.MapServer_CreatRedPacket(eval(resultName)) @@ -754,15 +799,25 @@ AuctionHouse.MapServer_AuctionHouseLogic(curPlayer, eval(resultName), tick) return + # 协助 + if callName == "PlayerAssist": + curPlayer = None + if srcPlayerID: + curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) + if not curPlayer: + return + PlayerAssist.MapServer_PlayerAssistLogic(curPlayer, eval(resultName), tick) + return + if callName == "TeamMemFuncData": PlayerTeam.MapServer_TeamMemFuncData(srcPlayerID, eval(resultName)) return - #封魔坛结束 - if callName == "SealDemonOver": - playerID, lineID, rank = eval(resultName) - PyDataManager.GetSealDemonRecordManager().UpdateSealDemonRecord(playerID,lineID,rank) - return +# #封魔坛结束 +# if callName == "SealDemonOver": +# playerID, lineID, rank = eval(resultName) +# PyDataManager.GetSealDemonRecordManager().UpdateSealDemonRecord(playerID,lineID,rank) +# return #查询副本功能线路人数 if callName == "FBLinePlayerCnt": @@ -821,6 +876,10 @@ #骑宠BOSS结束 if callName =="HorsePetBossOver": PlayerHorsePetBoss.HorsePetBossKilled(int(resultName)) + return + #缥缈仙域事件出现 + if callName =="AddFairyDomainEvent": + PlayerFairyDomain.AddFairyDomainEvent(eval(resultName)) return #---return分割线----------------------------------------------------------------- @@ -887,6 +946,21 @@ if ret == None: return resultName = '%s' % ret + + # 竞技场 + if callName =="Arena": + curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) + if not curPlayer: + return + ret = GameWorldArena.MapServer_Arena(curPlayer, eval(resultName)) + resultName = '%s' % ret if ret != None else '' # 需要重置间隔,每次都回复 + + # 天星塔 + if callName == "SkyTower": + ret = GameWorldSkyTower.MapServer_SkyTowerInfo(eval(resultName)) + if ret == None: + return + resultName = '%s' % ret # # 战盟仓库 # if callName == "FamilyStore": -- Gitblit v1.8.0