From ed212e33cd50eca6ff3b7d5f4cac7de975a1e0b7 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 17 七月 2019 15:20:59 +0800 Subject: [PATCH] 8017 【开发】【主干】玩家退出副本或自定义场景时,如果非死亡状态则血量恢复满血状态 --- ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 80 +++++++++++++++++++++++++--------------- 1 files changed, 50 insertions(+), 30 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py index cc6638a..12d0d56 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py @@ -27,28 +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 GameWorldActionTeHui +import PlayerZhuXianBoss import PlayerXMZZ -import GameWorldShopItem import PlayerTruck -import HighLadder -import EventReport +import PlayerHorsePetBoss import PlayerCompensation import PlayerFamilyRedPacket -import PlayerFamilyStore -import PyDataManager +#import PlayerFamilyStore import PlayerSocial import PlayerFamilyParty import PlayerSealDemon @@ -61,12 +54,15 @@ import PlayerGeTui import PlayerStore import GameWorldActionControl +import GameWorldFamilyWar import PlayerFBHelpBattle import GMT_CTG import PyGameData import GMShell import IPY_PlayerDefine import CrossRealmPK +import AuctionHouse +import PlayerFB #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -149,14 +145,16 @@ PlayerTruck.SyncPlayerTruckStartTime(curPlayer) #通知玩家交易所挂单情况 PlayerBourse.OnPlayerLogin(curPlayer) - + #拍卖行 + AuctionHouse.OnPlayerLogin(curPlayer) + #上线广播 __CheckWorldNotifyOnLogin(curPlayer, tick) #仙盟红包 PlayerFamilyRedPacket.OnPlayerLogin(curPlayer) #仙盟仓库 - PlayerFamilyStore.OnPlayerLogin(curPlayer) + #PlayerFamilyStore.OnPlayerLogin(curPlayer) #仙盟宴会 PlayerFamilyParty.OnPlayerLogin(curPlayer) #封魔坛 @@ -176,6 +174,7 @@ #守卫人皇 PlayerFamilySWRH.OnLogin(curPlayer) PlayerTalk.LoginChatMi(curPlayer) + PlayerTalk.NotifyTalkCache(curPlayer) PlayerGeTui.CleanNewGuyCallBackGeTui(curPlayer.GetID()) #活动 GameWorldActionControl.OnPlayerLogin(curPlayer) @@ -185,7 +184,10 @@ PlayerFBHelpBattle.OnHelpPlayerLogin(curPlayer) #跨服PK CrossRealmPK.OnPlayerLogin(curPlayer) - + #诛仙BOSS + PlayerZhuXianBoss.OnPlayerLogin(curPlayer) + #骑宠boss状态通知 + PlayerHorsePetBoss.OnLogin(curPlayer) GMT_CTG.OnPlayerLogin(curPlayer) return @@ -217,9 +219,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 @@ -238,11 +237,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: @@ -498,6 +493,9 @@ # @remarks 函数详细说明. def __Func_PlayerDisconnect(curPlayer, tick): + if GameWorld.IsCrossServer(): + PlayerFB.OnPlayerDisconnectCrossServer(curPlayer) + #跨服匹配PK CrossRealmPK.OnLeaveServer(curPlayer) @@ -510,7 +508,8 @@ PlayerGeTui.NewGuyCallBackGeTui(curPlayer, tick) # 设置家族成员离线时间 SetPlayerOfflineTime(curPlayer) - + #拍卖行 + AuctionHouse.OnPlayerLeaveServer(curPlayer) #------------镖车逻辑 #TruckPlayerDisconnectProcess(curPlayer, tick) return @@ -617,8 +616,6 @@ elif packType == IPY_GameServer.CDBPlayerRefresh_Job: curPlayer.SetJob(packValue) - elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr1: - PlayerControl.SetJobRank(curPlayer, packValue) # elif packType == IPY_GameServer.CDBPlayerRefresh_CurrentPlayerType: # #这里应该通知组队那边刷新 @@ -640,6 +637,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) @@ -648,7 +649,10 @@ elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr11: PlayerControl.SetTodayXianyuanCoin(curPlayer, packValue) - + + elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr13: + PlayerControl.SetPlayerServerGroupID(curPlayer, packValue) + elif packType == IPY_GameServer.CDBPlayerRefresh_OperateInfo: curPlayer.SetOperateInfo(packValue); @@ -682,6 +686,7 @@ GameWorldBoss.OnPlayerChangeMap(curPlayer) PlayerFamily.OnPlayerChangeMap(curPlayer, tick) PlayerFamilyParty.OnPlayerChangeMap(curPlayer, tick) + GameWorldFamilyWar.OnPlayerChangeMap(curPlayer) return ## 玩家切换真实地图 @@ -759,6 +764,9 @@ #改到mapServer登录成功通知 #Sync_PyServerDataTimeToClient(curPlayer, tick) + if GameWorld.IsCrossServer(): + PlayerFB.PlayerLoginLoadCrossMapOK(curPlayer) + PlayerTeam.OnPlayerReadMapOK(curPlayer, tick) #刷新人物日期状态 @@ -872,17 +880,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