From 6a875d29696c5625a779a379b0de523b2383d7ef Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 28 十一月 2024 16:41:11 +0800 Subject: [PATCH] 10312 【越南】【英文】【bt】【砍树】查看跨服玩家数据向对应子服查询 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetCrossPK.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 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 da34ebb..74ae10c 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,6 +18,8 @@ import GameWorld import PlayerControl import PlayerCrossRealmPK +import CrossRealmPlayer +import IpyGameDataPY import ShareDefine import ChConfig @@ -32,6 +34,49 @@ if not msgList: __PrintHelp(curPlayer) + return + + 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 + 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)) return if len(msgList) == 1: @@ -122,6 +167,7 @@ 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 段位 [积分]") return -- Gitblit v1.8.0