From 1e7d00e39484a4522fadc88b3386010def98c0b6 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期三, 22 五月 2019 14:45:57 +0800 Subject: [PATCH] 6895 还原技能攻击个数限制 --- ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 53 ++++++++++++++++++++++++++++++++--------------------- 1 files changed, 32 insertions(+), 21 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py index 652d1db..578cae2 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py @@ -27,27 +27,21 @@ import GMCommon import ShareDefine #import PlayerFamilyTech -import PlayerDataCollect import time import ChPyNetSendPack import NetPackCommon import GameDataRecord -import GameConfig -import ReadChConfig import UpdatePlayerName import GameWorldBoss import PlayerFamilyBoss -#import PlayerManorWar import PlayerBourse import PlayerZhuXianBoss import PlayerXMZZ import PlayerTruck -import HighLadder -import EventReport +import PlayerHorsePetBoss import PlayerCompensation import PlayerFamilyRedPacket #import PlayerFamilyStore -import PyDataManager import PlayerSocial import PlayerFamilyParty import PlayerSealDemon @@ -67,6 +61,7 @@ import IPY_PlayerDefine import CrossRealmPK import AuctionHouse +import PlayerFB #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -189,7 +184,8 @@ CrossRealmPK.OnPlayerLogin(curPlayer) #诛仙BOSS PlayerZhuXianBoss.OnPlayerLogin(curPlayer) - + #骑宠boss状态通知 + PlayerHorsePetBoss.OnLogin(curPlayer) GMT_CTG.OnPlayerLogin(curPlayer) return @@ -221,9 +217,6 @@ if checkMark not in ShareDefine.BillboardTypeList: continue - if checkMark in [ShareDefine.Def_BT_HighLadder]: - continue - billboard = GameWorld.GetBillboard().FindBillboard(checkMark) if not billboard: continue @@ -242,11 +235,7 @@ objBillboard = billboard.At(index) if curPlayer.GetID() == objBillboard.GetID(): msgMark = notifyDict[order] - break -# # 竞技场 -# elif checkMark == "HighLadder": -# highLadderOrder = HighLadder.GetPlayerOrder(curPlayer.GetID()) + 1 -# msgMark = notifyDict.get(highLadderOrder, "") + break # 有可以广播的,马上广播,退出,不再检查 if msgMark: @@ -502,6 +491,9 @@ # @remarks 函数详细说明. def __Func_PlayerDisconnect(curPlayer, tick): + if GameWorld.IsCrossServer(): + PlayerFB.OnPlayerDisconnectCrossServer(curPlayer) + #跨服匹配PK CrossRealmPK.OnLeaveServer(curPlayer) @@ -643,6 +635,10 @@ elif packType == IPY_GameServer.CDBPlayerRefresh_VIPLv: curPlayer.SetVIPLv(packValue); # __RefreshTeamState(curPlayer) + + elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr5: + PlayerControl.SetCrossMapID(curPlayer, packValue, False) + elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr9: PlayerControl.SetVIPExpireTime(curPlayer, packValue) @@ -765,6 +761,9 @@ #改到mapServer登录成功通知 #Sync_PyServerDataTimeToClient(curPlayer, tick) + if GameWorld.IsCrossServer(): + PlayerFB.PlayerLoginLoadCrossMapOK(curPlayer) + PlayerTeam.OnPlayerReadMapOK(curPlayer, tick) #刷新人物日期状态 @@ -878,17 +877,29 @@ #{ # tagHead Head; # DWORD MapID; -# BYTE FBLineID; -# BYTE IsAllLine; +# BYTE LineCount; +# BYTE LineIDList[LineCount]; //个数为0时代表查全部 #}; def ClinetQueryFBLinePlayerCnt(index, clientData, tick): curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) queryMapID = clientData.MapID - fbLineID = clientData.FBLineID - isAllLine = clientData.IsAllLine + queryFBLineIDList = clientData.LineIDList playerManager = GameWorld.GetPlayerManager() - sendCMD = str([queryMapID, fbLineID, isAllLine]) + if queryMapID in ChConfig.Def_CrossMapIDList: + fbLinePlayerInfoDict = PyGameData.g_crossFBFuncLinePlayerCountInfo.get(queryMapID, {}) + if not queryFBLineIDList: + resultInfo = [queryMapID, fbLinePlayerInfoDict] + else: + defaultInfo = [0] # 与本服结构相同,默认0人 + queryFBLineInfo = {} + for lineID in queryFBLineIDList: + queryFBLineInfo[lineID] = fbLinePlayerInfoDict.get(lineID, defaultInfo) + resultInfo = [queryMapID, queryFBLineInfo] + QueryFBLinePlayerCntResult(curPlayer, resultInfo) + return + + sendCMD = str([queryMapID, queryFBLineIDList]) playerManager.MapServer_QueryPlayer(curPlayer.GetPlayerID(), 0, 0, queryMapID, 'FBLinePlayerCnt', sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex()) return -- Gitblit v1.8.0