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 |  152 +++++++++++++++++++++++++-------------------------
 1 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 148aff8..578cae2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -27,31 +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 MergeChildMsg
 import PlayerTruck
-import PlayerMergeEvent
-import HighLadder
-import EventReport
-import MergePlayer
+import PlayerHorsePetBoss
 import PlayerCompensation
 import PlayerFamilyRedPacket
-import PlayerFamilyStore
-import PyDataManager
+#import PlayerFamilyStore
 import PlayerSocial
 import PlayerFamilyParty
 import PlayerSealDemon
@@ -70,9 +60,20 @@
 import GMShell
 import IPY_PlayerDefine
 import CrossRealmPK
+import AuctionHouse
+import PlayerFB
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
+
+def DoRefreshMainServerRole(curPlayer):
+    ## 刷新本服角色信息
+    
+    curTeam = curPlayer.GetTeam()
+    if curTeam:
+        PlayerTeam.Sync_TeamMemberInfo(curTeam)
+    return
+
 ## 玩家登录初始化(封包参数)
 #  @param index 玩家索引
 #  @param tick 当前时间
@@ -106,6 +107,20 @@
     InitPlayerOnLineReply(curPlayer, tick)
     # 统计登入人数
     GameDataRecord.PlayerLoginRecord(curPlayer, tick)
+    __DoPlayerLoginServer(curPlayer, tick)
+    
+    #通知地图服务器自己初始化成功
+    curPlayer.MapServer_InitOK()
+    return
+
+def __DoPlayerLoginServer(curPlayer, tick):
+    ''' 玩家登录需要处理的内容,本服及跨服服务器分开
+    '''
+    if GameWorld.IsCrossServer():
+        #跨服PK
+        CrossRealmPK.OnPlayerLoginCrossServer(curPlayer)
+        return
+    
     #玩家家族刷新
     #家族任务需要刷新 FamilyLV, 地图服务器需要知道FamilyLV来通知玩家家族任务次数 
     PlayerFamily.PlayerLoginRefreshFamily(curPlayer, tick)
@@ -126,26 +141,19 @@
         # 通知广播信息
         GMCommon.SendBroadCastToClient(curPlayer)
     
-    
-        # 在非跨服服务器上线时,在跨服PK赛期间如果roomID不为0则重置
-        #if not GameWorld.IsMergeServer() and GameWorldMergePK.IsMergePKMatchOpen() \
-        #    and curPlayer.GetVsRoomId() != 0:
-        #    PlayerControl.SetVsRoomId(curPlayer, 0)
-    
         PlayerTruck.SyncPlayerTruckStartTime(curPlayer)
         #通知玩家交易所挂单情况
         PlayerBourse.OnPlayerLogin(curPlayer)
-
+        #拍卖行
+        AuctionHouse.OnPlayerLogin(curPlayer)
+        
         #上线广播
         __CheckWorldNotifyOnLogin(curPlayer, tick)
-        #上线奖励处理
-        #PlayerMergeEvent.MergeEventOnPlayerLogin(curPlayer)
-        #MergePlayer.OnPlayerLogin(curPlayer)
         
         #仙盟红包
         PlayerFamilyRedPacket.OnPlayerLogin(curPlayer)
         #仙盟仓库
-        PlayerFamilyStore.OnPlayerLogin(curPlayer)
+        #PlayerFamilyStore.OnPlayerLogin(curPlayer)
         #仙盟宴会
         PlayerFamilyParty.OnPlayerLogin(curPlayer)
         #封魔坛
@@ -174,12 +182,11 @@
         PlayerFBHelpBattle.OnHelpPlayerLogin(curPlayer)
         #跨服PK
         CrossRealmPK.OnPlayerLogin(curPlayer)
-        
-        GMShell.OnPlayerLogin(curPlayer)
+        #诛仙BOSS
+        PlayerZhuXianBoss.OnPlayerLogin(curPlayer)
+        #骑宠boss状态通知
+        PlayerHorsePetBoss.OnLogin(curPlayer)
         GMT_CTG.OnPlayerLogin(curPlayer)
-        
-    #通知地图服务器自己初始化成功
-    curPlayer.MapServer_InitOK()
     return
 
 ## 增加高手玩家上线广播
@@ -187,7 +194,7 @@
 #  @return None
 def __CheckWorldNotifyOnLogin(curPlayer, tick):
     # 跨服服务器不广播
-    if GameWorld.IsMergeServer():
+    if GameWorld.IsCrossServer():
         return
     
     limitLV = IpyGameDataPY.GetFuncCfg("BillBoardPlayerLoginNotify", 2) # 最低等级限制
@@ -210,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
@@ -231,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:
@@ -261,31 +261,6 @@
     diff_Time = loginTime - logoffTime
     #天数 * 24小时 * 60 分钟 + 秒
     return diff_Time.days * 24 * 60 * 60 + diff_Time.seconds
-
-## 统计客户端跨服赛激活时间
-#  @param index 玩家索引
-#  @return None
-def SendMergeWarOpen(curPlayer):
-    # 发送跨服赛服务器信息
-    mapConfig = GameConfig.GetConfig()
-    mergeServerIP = mapConfig.get("MergeServerIP")
-    mergeServerPort = mapConfig.get("MergeServerPort")
-    if not mergeServerIP:
-        return
-    mergeServerInfo = ChPyNetSendPack.tagMergeServerInfo()
-    mergeServerInfo.ServerIPLen = len(mergeServerIP)
-    mergeServerInfo.ServerIP = mergeServerIP
-    mergeServerInfo.Port = mergeServerPort
-    mergeServerInfo.IsMergeServer = GameWorld.IsMergeServer()
-    NetPackCommon.SendFakePack(curPlayer, mergeServerInfo)
-    return
-
-## 跨服赛通知奖励
-#  @param curPlayer: 玩家实例
-#  @return: None
-def MSGetReward(curPlayer):
-    #PlayerCanGetReward.SynClient_CanGetRewardList(curPlayer)
-    return
 
 ## 运营登陆信息处理
 #  @param curPlayer
@@ -516,6 +491,9 @@
 #  @remarks 函数详细说明.
 def __Func_PlayerDisconnect(curPlayer, tick):
     
+    if GameWorld.IsCrossServer():
+        PlayerFB.OnPlayerDisconnectCrossServer(curPlayer)
+        
     #跨服匹配PK
     CrossRealmPK.OnLeaveServer(curPlayer)
     
@@ -528,8 +506,8 @@
     PlayerGeTui.NewGuyCallBackGeTui(curPlayer, tick)
     # 设置家族成员离线时间
     SetPlayerOfflineTime(curPlayer)
-    
-    #MergePlayer.OnPlayerLeaveGotoMergeServer(curPlayer, tick)
+    #拍卖行
+    AuctionHouse.OnPlayerLeaveServer(curPlayer)
     #------------镖车逻辑
     #TruckPlayerDisconnectProcess(curPlayer, tick)
     return
@@ -636,8 +614,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:
 #        #这里应该通知组队那边刷新
@@ -659,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)
         
@@ -667,7 +647,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);
     
@@ -778,6 +761,9 @@
     #改到mapServer登录成功通知
     #Sync_PyServerDataTimeToClient(curPlayer, tick)
     
+    if GameWorld.IsCrossServer():
+        PlayerFB.PlayerLoginLoadCrossMapOK(curPlayer)
+        
     PlayerTeam.OnPlayerReadMapOK(curPlayer, tick)
     
     #刷新人物日期状态
@@ -791,7 +777,7 @@
 #===============================================================================
     #自己已经初始化成功
     curPlayer.SetInitOK(True)
-    
+    GMShell.OnPlayerLogin(curPlayer)
     #发送请求至目标地图(任务需要登陆家族长触发事件)
     __RefreshFamilyToMapServer(curPlayer)
     return
@@ -891,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
@@ -917,11 +915,13 @@
     fblinePack = ChPyNetSendPack.tagGCFBLinePlayerCnt()
     fblinePack.MapID = tagMapID
     fblinePack.FBLineInfoList = []
-    for lineID, playerCnt in fbLinePlayerCntDict.items():
+    for lineID, infoList in fbLinePlayerCntDict.items():
         mapLineState = ChPyNetSendPack.tagGCFBLineInfo()
         mapLineState.Clear()
         mapLineState.FBLineID = lineID
-        mapLineState.PlayerCnt = playerCnt
+        mapLineState.PlayerCnt = infoList[0] if infoList else 0
+        mapLineState.ExtraStr = infoList[1] if len(infoList) > 1 else ''
+        mapLineState.ExtraStrLen = len(mapLineState.ExtraStr)
         fblinePack.FBLineInfoList.append(mapLineState)
     
     fblinePack.Count = len(fblinePack.FBLineInfoList)

--
Gitblit v1.8.0