From 22c964784d465c77365c2495f6d43117618d8482 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 26 十二月 2024 16:52:25 +0800
Subject: [PATCH] 10350 【后端】【越南】【英文】【BT】【砍树】跨服竞技场优化

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py |   49 +++++++++++--------------------------------------
 1 files changed, 11 insertions(+), 38 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py
index 74ae10c..48cb47d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py
@@ -18,7 +18,6 @@
 import GameWorld
 import PlayerControl
 import PlayerCrossRealmPK
-import CrossRealmPlayer
 import IpyGameDataPY
 import ShareDefine
 import ChConfig
@@ -39,44 +38,18 @@
     if msgList[0] == "b":        
         danLV = msgList[1] if len(msgList) > 1 else 0
         pkScore = msgList[2] if len(msgList) > 2 else 0
-        
-        billboardCfg = IpyGameDataPY.GetFuncEvalCfg("CrossRealmPKCfg", 1, [])
-        danLVLimit = billboardCfg[1] if len(billboardCfg) > 1 else 0
-        if danLV < danLVLimit:
-            GameWorld.DebugAnswer(curPlayer, "最低上榜段位为:%s" % danLVLimit)
-            return
+        cWinCount = msgList[3] if len(msgList) > 3 else None
         danIpyData = IpyGameDataPY.GetIpyGameData("CrossRealmPKDan", danLV)
         if not danIpyData:
             GameWorld.DebugAnswer(curPlayer, "不存在该段位:%s" % danLV)
             return
         if pkScore <= 0:
             pkScore = danIpyData.GetLVUpScore()
-            
-        zoneID = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
-        seasonID = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
-        if not zoneID or not seasonID:
-            GameWorld.DebugAnswer(curPlayer, "没有分区或赛季!zoneID:%s,seasonID:%s" % (zoneID, seasonID))
-            return
-        
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLV, danLV)
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TotalScore, pkScore)
-            
-        # 请求查询跨服服务器
-        playerInfoDict = {"accID":curPlayer.GetAccID(),
-                          "playerID":curPlayer.GetPlayerID(),
-                          "playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer),
-                          "playerJob":curPlayer.GetJob(),
-                          "face":curPlayer.GetFace(),
-                          "facePic":curPlayer.GetFacePic(),
-                          "fightPower":PlayerControl.GetFightPower(curPlayer),
-                          "realmLV":curPlayer.GetOfficialRank(),
-                          "ondayScore":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_OnDayScore),
-                          "pkScore":pkScore, "danLV":danLV, "cWinCount":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_CWinCount),
-                          }
-        dataMsg = {"ZoneID":zoneID, "SeasonID":seasonID, "GMSetCrossPK":1, "PlayerInfo":playerInfoDict}
-        GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PKBillboard, dataMsg)
-        PlayerCrossRealmPK.SyncCrossRealmPKPlayerInfo(curPlayer)
-        GameWorld.DebugAnswer(curPlayer, "设置上榜段位:%s,积分:%s" % (danLV, pkScore))
+        errorMsg = PlayerCrossRealmPK.GMSetPlayerCrossPKData(curPlayer, danLV, pkScore, cWinCount)
+        if errorMsg:
+            GameWorld.DebugAnswer(curPlayer, "分区赛季异常!")
+        else:
+            GameWorld.DebugAnswer(curPlayer, "设置上榜段位:%s,积分:%s" % (danLV, pkScore))
         return
     
     if len(msgList) == 1:
@@ -86,7 +59,6 @@
         
         # 重置数据
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TotalScore, 0)
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_OnDayScore, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLV, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_PKCount, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_WinCount, 0)
@@ -95,6 +67,7 @@
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayPKCount, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayWinCount, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayBuyCount, 0)
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_RefreshCount, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayPKCountAwardState, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayWinCountAwardState, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLVAwardState, 0)
@@ -115,7 +88,6 @@
     
     if len(msgList) == 2 or len(msgList) % 2 == 0:
         setTypeDict = {0:[ChConfig.Def_PDict_CrossPK_TotalScore, "积分"],
-                       1:[ChConfig.Def_PDict_CrossPK_OnDayScore, "过天积分"],
                        2:[ChConfig.Def_PDict_CrossPK_DanLV, "段位"],
                        3:[ChConfig.Def_PDict_CrossPK_PKCount, "PK次数"],
                        4:[ChConfig.Def_PDict_CrossPK_WinCount, "胜利次数"],
@@ -124,6 +96,7 @@
                        7:[ChConfig.Def_PDict_CrossPK_TodayPKCount, "今日PK次数"],
                        8:[ChConfig.Def_PDict_CrossPK_TodayWinCount, "今日胜利次数"],
                        9:[ChConfig.Def_PDict_CrossPK_TodayBuyCount, "今日购买次数"],
+                       10:[ChConfig.Def_PDict_CrossPK_RefreshCount, "今日刷新次数"],
                        }
         indexList = range(len(msgList))
         for i in indexList[::2]:
@@ -162,12 +135,12 @@
 def __PrintHelp(curPlayer):
     GameWorld.DebugAnswer(curPlayer, "重置数据: SetCrossPK 0")
     GameWorld.DebugAnswer(curPlayer, "设置数据: SetCrossPK 类型  值")
-    GameWorld.DebugAnswer(curPlayer, "类型:0-积分,1-过天积分,2-段位,3-PK次数,4-胜利次数,5-连胜次数,6-连败次数")
-    GameWorld.DebugAnswer(curPlayer, "7-今日PK次数,8-今日胜利次数,9-今日购买次数")
+    GameWorld.DebugAnswer(curPlayer, "类型:0-积分,2-段位,3-PK次数,4-胜利次数,5-连胜次数,6-连败次数")
+    GameWorld.DebugAnswer(curPlayer, "7-今日PK次数,8-今日胜利次数,9-今日购买次数,10-今日刷新次数")
     GameWorld.DebugAnswer(curPlayer, "设置历史记录: SetCrossPK 赛季ID 类型 数值")
     GameWorld.DebugAnswer(curPlayer, "类型:0-段位,1-名次,2-积分,3-奖励等级")
     GameWorld.DebugAnswer(curPlayer, "当前连败次数: %s" % curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_CLoseCount))
-    GameWorld.DebugAnswer(curPlayer, "设置上榜: SetCrossPK b 段位 [积分]")
+    GameWorld.DebugAnswer(curPlayer, "设置上榜: SetCrossPK b 段位 [积分 连胜]")
     return
 
 

--
Gitblit v1.8.0