ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
@@ -46,6 +46,7 @@
        self.playerJob = 0
        self.playerLV = 0
        self.maxHP = 0
        self.maxProDef = 0
        self.fightPower = 0
        self.realmLV = 0
        self.pkScore = 0
@@ -850,6 +851,7 @@
    job = playerInfoDict["playerJob"] # ְҵ
    playerLV = playerInfoDict["playerLV"] # ְҵ
    maxHP = playerInfoDict["maxHP"] # ְҵ
    maxProDef = playerInfoDict["maxProDef"] # 护盾
    fightPower = playerInfoDict["fightPower"] # 战斗力
    realmLV = playerInfoDict["realmLV"] # 境界
    pkScore = playerInfoDict["pkScore"] # 当前积分
@@ -874,6 +876,7 @@
    pkPlayer.playerJob = job
    pkPlayer.playerLV = playerLV
    pkPlayer.maxHP = maxHP
    pkPlayer.maxProDef = maxProDef
    pkPlayer.pkScore = pkScore
    pkPlayer.danLV = danLV
    pkPlayer.fightPower = fightPower
@@ -1015,7 +1018,7 @@
            pkZoneID = roomPlayer.pkZoneID
            roomGroupIDList.append(roomPlayer.serverGroupID)
            readyMemberDict[roomPlayerID] = {"ServerGroupID":roomPlayer.serverGroupID, "Name":roomPlayer.playerName, "Number":num,
                                             "Job":roomPlayer.playerJob, "LV":roomPlayer.playerLV, "MaxHP":roomPlayer.maxHP}
                                             "Job":roomPlayer.playerJob, "LV":roomPlayer.playerLV, "MaxHP":roomPlayer.maxHP, "MaxProDef":roomPlayer.maxProDef}
                    
        if not isAllReady:
            continue
@@ -1573,6 +1576,26 @@
##================================== 以下是子服逻辑 ==========================================
def OnGameServerInitOK():
    if GameWorld.IsCrossServer():
        return
    dbZoneID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    dbSeasonID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
    dbSeasonState = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
    GameWorld.Log("OnGameServerInitOK dbZoneID=%s,dbSeasonID=%s,dbSeasonState=%s" % (dbZoneID, dbSeasonID, dbSeasonState))
    gameWorld = GameWorld.GetGameWorld()
    zoneID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    if not zoneID:
        gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID, dbZoneID)
        gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID, dbSeasonID)
        gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState, dbSeasonState)
        GameWorld.Log("    服务器启动取DB值设置本服赛区赛季信息: ")
    return
def OnMapServerInitOK():
    # 通知地图服务器状态
    
@@ -1612,6 +1635,20 @@
    gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID, seasonID)
    gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState, seasonState)
    gameWorld.SetDict(ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % ShareDefine.DailyActionID_CrossReamPK, matchState)
    # 强制覆盖存DB
    dbZoneID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    dbSeasonID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
    dbSeasonState = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
    GameWorld.Log("    before dbZoneID=%s,dbSeasonID=%s,dbSeasonState=%s" % (dbZoneID, dbSeasonID, dbSeasonState))
    PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID, zoneID)
    PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID, seasonID)
    PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState, seasonState)
    dbZoneID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    dbSeasonID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
    dbSeasonState = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
    GameWorld.Log("    update dbZoneID=%s,dbSeasonID=%s,dbSeasonState=%s" % (dbZoneID, dbSeasonID, dbSeasonState))
    
    if curSeasonState == 1 and seasonState == 2:
        pass
@@ -1701,6 +1738,10 @@
    GameWorld.Log("===收到跨服服务器通知已准备好的对战PK房间信息处理=== curServerGroupID=%s" % curServerGroupID)
    # serverGroupID, playerName, playerJob
    
    if not CrossRealmPlayer.IsCrossServerOpen():
        GameWorld.Log("跨服服务器维护中,不处理!")
        return
    for roomID, readyMemberDict in readyOKRoomList:
        for playerID, playerInfo in readyMemberDict.items():
            serverGroupID = playerInfo["ServerGroupID"]
@@ -1729,6 +1770,7 @@
                    matchPlayer.Job = readyPlayerInfo["Job"]
                    matchPlayer.LV = readyPlayerInfo["LV"]
                    matchPlayer.MaxHP = readyPlayerInfo["MaxHP"]
                    matchPlayer.MaxProDef = readyPlayerInfo["MaxProDef"]
                    break
                
            PlayerControl.SetCrossRealmState(player, 1)