From fa10596d9f3abf523f8e900d7b920e4af8ea6bc5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 07 三月 2019 14:45:41 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
index b53441b..9ae3cb6 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
@@ -35,6 +35,7 @@
 import operator
 import random
 import time
+import json
 
 class CrossPKPlayer():
     ## 跨服PK玩家类
@@ -789,6 +790,8 @@
     seasonStatePack.SeasonID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
     seasonStatePack.SeasonState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
     seasonStatePack.MatchState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % ShareDefine.DailyActionID_CrossReamPK)
+    seasonStatePack.CrossZoneName = GameWorld.GetCrossZoneName()
+    seasonStatePack.CrossZoneNameLen = len(seasonStatePack.CrossZoneName)
     NetPackCommon.SendFakePack(curPlayer, seasonStatePack)
         
     return
@@ -1657,7 +1660,12 @@
     GameWorld.Log("    zoneID=%s,seasonID=%s,seasonState=%s,matchState=%s" % (zoneID, seasonID, seasonState, matchState))
     if not zoneID:
         return
-    
+    if not seasonID:
+        dbSeasonID = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
+        if dbSeasonID:
+            GameWorld.ErrLog("    已经有分配赛季ID的暂定不能被置为0! dbSeasonID=%s" % dbSeasonID)
+            return
+        
     gameWorld = GameWorld.GetGameWorld()
     curSeasonState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
     
@@ -1696,6 +1704,8 @@
     seasonStatePack.SeasonID = seasonID
     seasonStatePack.SeasonState = seasonState
     seasonStatePack.MatchState = matchState
+    seasonStatePack.CrossZoneName = GameWorld.GetCrossZoneName()
+    seasonStatePack.CrossZoneNameLen = len(seasonStatePack.CrossZoneName)
     playerManager = GameWorld.GetPlayerManager()
     for i in xrange(playerManager.GetPlayerCount()):
         curPlayer = playerManager.GetPlayerByIndex(i)
@@ -1913,7 +1923,7 @@
             overInfoData.OverType = overType
             overInfoData.PlayerID = playerID
             overInfoData.WinnerID = winnerID
-            overInfoData.RoundWinnerInfo = str(roundWinnerIDList)
+            overInfoData.RoundWinnerInfo = json.dumps(roundWinnerIDList, ensure_ascii=False)
             overInfoData.RoundWinnerLen = len(overInfoData.RoundWinnerInfo)
             overInfoData.PKScore = pkScore
             overInfoData.DanLV = danLV
@@ -1948,7 +1958,7 @@
     winnerID = overInfoData.WinnerID
     roundWinnerIDList = []
     try:
-        roundWinnerIDList = eval(overInfoData.RoundWinnerInfo)
+        roundWinnerIDList = json.loads(overInfoData.RoundWinnerInfo)
     except:
         GameWorld.ErrLog("__OnLoginNotifyPKOverInfo roundWinnerIDList eval error! RoundWinnerInfo=%s" % overInfoData.RoundWinnerInfo, playerID)
     pkScore = overInfoData.PKScore

--
Gitblit v1.8.0