|  |  |  | 
|---|
|  |  |  | import PlayerBillboard | 
|---|
|  |  |  | import PlayerExam | 
|---|
|  |  |  | import PlayerControl | 
|---|
|  |  |  | import PlayerRecall | 
|---|
|  |  |  | import PlayerFamilyAction | 
|---|
|  |  |  | import PlayerUniversalGameRec | 
|---|
|  |  |  | import PlayerFamily | 
|---|
|  |  |  | import GameWorldOpenServerCampaign | 
|---|
|  |  |  | import ShareDefine | 
|---|
|  |  |  | import GameDataRecord | 
|---|
|  |  |  | import GameWorldShopItem | 
|---|
|  |  |  | import PlayerCompensation | 
|---|
|  |  |  | import PlayerFB | 
|---|
|  |  |  | import UpdatePlayerName | 
|---|
|  |  |  | import PlayerFamilyBoss | 
|---|
|  |  |  | import PlayerManorWar | 
|---|
|  |  |  | import GameWorldBoss | 
|---|
|  |  |  | import GameWorldFamilyWar | 
|---|
|  |  |  | #import PlayerFamilyTech | 
|---|
|  |  |  | import PlayerFamilyRedPacket | 
|---|
|  |  |  | import PlayerFBHelpBattle | 
|---|
|  |  |  | import PlayerHorsePetBoss | 
|---|
|  |  |  | #import PlayerFamilyStore | 
|---|
|  |  |  | import PlayerFamilySWRH | 
|---|
|  |  |  | import GameWorldProcess | 
|---|
|  |  |  | 
|---|
|  |  |  | import ChPyNetSendPack | 
|---|
|  |  |  | import NetPackCommon | 
|---|
|  |  |  | import AuctionHouse | 
|---|
|  |  |  | import PlayerFairyDomain | 
|---|
|  |  |  | import GameWorldSkyTower | 
|---|
|  |  |  | import GameWorldArena | 
|---|
|  |  |  | import GameWorldItem | 
|---|
|  |  |  | import PlayerAssist | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import time | 
|---|
|  |  |  | import datetime | 
|---|
|  |  |  | import json | 
|---|
|  |  |  | #--------------------------------------------------------------------- | 
|---|
|  |  |  | #全局变量 | 
|---|
|  |  |  | #--------------------------------------------------------------------- | 
|---|
|  |  |  | 
|---|
|  |  |  | 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() | 
|---|
|  |  |  | 
|---|
|  |  |  | 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": | 
|---|
|  |  |  | msgType, dataMsg = eval(resultName) | 
|---|
|  |  |  | CrossRealmMsg.SendMsgToCrossServer(msgType, dataMsg) | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | PlayerFamily.MapServer_PyAddFamilyInfoValue(curPlayer, eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'UpdRechargeRankBillboard':     #地图服务器更新玩家通知特惠累计充值排行榜 | 
|---|
|  |  |  | PlayerBillboard.MapServer_UpdateRechargeRankBillboard(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'UpdCostRankBillboard':     #地图服务器更新玩家通知特惠累计消费排行榜 | 
|---|
|  |  |  | PlayerBillboard.MapServer_UpdateCostRankBillboard(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'UpdateTotalRechargeBillboard':    #地图服务器更新玩家充值总数排行榜 | 
|---|
|  |  |  | PlayerBillboard.MapServer_UpdateTotalRechargeBillboard(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | msg, msgList = eval(resultName) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | PlayerControl.TeamNotify(teamID, msg, msgList) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'ReveiveRecallAward': | 
|---|
|  |  |  | #召回奖励领取情况 | 
|---|
|  |  |  | PlayerRecall.ReveiveRecallAwardResult(srcPlayerID, resultName) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == "NotifyTruckDestroy": | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 领地争夺战拔旗消耗 | 
|---|
|  |  |  | if callName =="ManorWarGetFlagCost": | 
|---|
|  |  |  | PlayerManorWar.ManorWarGetFlagCost(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 领地争夺战获胜战盟 | 
|---|
|  |  |  | if callName =="ManorWarWinner": | 
|---|
|  |  |  | PlayerManorWar.DoMapServerManorWarWinner(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 战盟副本boss开始、被击杀 | 
|---|
|  |  |  | if callName =="FamilyBossFBState": | 
|---|
|  |  |  | PlayerFamilyBoss.FamilyBossOnKilled(eval(resultName), tick) | 
|---|
|  |  |  | 
|---|
|  |  |  | GameWorldProcess.UpdGlobalKillCount(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 自定义商店全服限购次数清空 | 
|---|
|  |  |  | if callName =="ShopItemClearBuyCnt": | 
|---|
|  |  |  | shopID = eval(resultName)[0] | 
|---|
|  |  |  | GameWorldShopItem.DoShopItemClearBuyCnt(shopID) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 新手指导员天数 | 
|---|
|  |  |  | if callName =="FreshmanGuiderDay": | 
|---|
|  |  |  | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) | 
|---|
|  |  |  | if not curPlayer: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | guiderDay = eval(resultName)[0] | 
|---|
|  |  |  | PlayerControl.SetFreshmanGuiderDay(curPlayer, guiderDay) | 
|---|
|  |  |  | # 缓存装备广播信息中的装备明细信息 | 
|---|
|  |  |  | if callName == "NotifyEquipDetailInfo": | 
|---|
|  |  |  | GameWorldItem.OnCacheNotifyEquipDetailInfo(json.loads(resultName), tick) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #生成仙盟红包 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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": | 
|---|
|  |  |  | 
|---|
|  |  |  | if callName =="AllFamilyBossOver": | 
|---|
|  |  |  | PlayerFamilyBoss.AllFamilyBossKilled() | 
|---|
|  |  |  | return | 
|---|
|  |  |  | #骑宠BOSS结束 | 
|---|
|  |  |  | if callName =="HorsePetBossOver": | 
|---|
|  |  |  | PlayerHorsePetBoss.HorsePetBossKilled(int(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | #缥缈仙域事件出现 | 
|---|
|  |  |  | if callName =="AddFairyDomainEvent": | 
|---|
|  |  |  | PlayerFairyDomain.AddFairyDomainEvent(eval(resultName)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #---return分割线----------------------------------------------------------------- | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return | 
|---|
|  |  |  | resultName = '%s' % ret | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'SendInviteCode': | 
|---|
|  |  |  | #邀请码验证回复 | 
|---|
|  |  |  | resultName = PlayerRecall.PlayerRecall_InviteCode(srcPlayerID, pack.GetQueryID()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if callName == 'OpenServerCampaignAward': | 
|---|
|  |  |  | #可否领取开服活动奖励 | 
|---|
|  |  |  | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) | 
|---|
|  |  |  | 
|---|
|  |  |  | 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": | 
|---|
|  |  |  | 
|---|
|  |  |  | #        if not curPlayer: | 
|---|
|  |  |  | #            return | 
|---|
|  |  |  | #        resultName = '%s' % PlayerFamilyStore.DoMapServerFamilyStore(curPlayer, eval(resultName), tick) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 自定义商店物品 | 
|---|
|  |  |  | if callName == "ShopItem": | 
|---|
|  |  |  | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) | 
|---|
|  |  |  | resultName = '%s' % GameWorldShopItem.DoShopItemQueryResult(curPlayer, eval(resultName)) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 玩家天梯奖励 | 
|---|
|  |  |  | if callName == "HighLadderReward": | 
|---|
|  |  |  | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) | 
|---|
|  |  |  | import HighLadder | 
|---|
|  |  |  | needResult, resultName = HighLadder.MapServer_HighLadderReward(curPlayer, eval(resultName)) | 
|---|
|  |  |  | if not needResult: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | srcPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID) | 
|---|
|  |  |  |  | 
|---|