| | |
| | | self.playerJob = 0
|
| | | self.playerLV = 0
|
| | | self.maxHP = 0
|
| | | self.maxProDef = 0
|
| | | self.fightPower = 0
|
| | | self.realmLV = 0
|
| | | self.pkScore = 0
|
| | |
| | | job = playerInfoDict["playerJob"] # ְҵ
|
| | | playerLV = playerInfoDict["playerLV"] # ְҵ
|
| | | maxHP = playerInfoDict["maxHP"] # ְҵ
|
| | | maxProDef = playerInfoDict["maxProDef"] # 护盾
|
| | | fightPower = playerInfoDict["fightPower"] # 战斗力
|
| | | realmLV = playerInfoDict["realmLV"] # 境界
|
| | | pkScore = playerInfoDict["pkScore"] # 当前积分
|
| | |
| | | pkPlayer.playerJob = job
|
| | | pkPlayer.playerLV = playerLV
|
| | | pkPlayer.maxHP = maxHP
|
| | | pkPlayer.maxProDef = maxProDef
|
| | | pkPlayer.pkScore = pkScore
|
| | | pkPlayer.danLV = danLV
|
| | | pkPlayer.fightPower = fightPower
|
| | |
| | | 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
|
| | |
| | |
|
| | | ##================================== 以下是子服逻辑 ==========================================
|
| | |
|
| | | 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():
|
| | | # 通知地图服务器状态
|
| | |
|
| | |
| | | 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
|
| | |
| | | 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"]
|
| | |
| | | matchPlayer.Job = readyPlayerInfo["Job"]
|
| | | matchPlayer.LV = readyPlayerInfo["LV"]
|
| | | matchPlayer.MaxHP = readyPlayerInfo["MaxHP"]
|
| | | matchPlayer.MaxProDef = readyPlayerInfo["MaxProDef"]
|
| | | break
|
| | |
|
| | | PlayerControl.SetCrossRealmState(player, 1)
|