From 1f8acf4823f6d7c2e19f0db8bd11d3b07d168a5c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 10 七月 2019 16:21:52 +0800 Subject: [PATCH] 7954 【主干】【后端】跨服PVP匹配机器人规则优化 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py | 46 +++++++++++++++++++++++++--------------------- 1 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py index 16cdb27..85b32c2 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py @@ -412,6 +412,16 @@ danLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_DanLV) cWinCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_CWinCount) + if GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState) != 1: + GameWorld.Log("OnCrossRealmPKRobotOver 跨服赛季未开启,不可进行机器人结算!", playerID) + overPack = ChPyNetSendPack.tagGCCrossRealmPKOverInfo() + overPack.AddScore = 0 + overPack.Score = pkScore + overPack.DanLV = danLV + overPack.CWinCnt = cWinCount + NetPackCommon.SendFakePack(curPlayer, overPack) + return + ondayScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_OnDayScore) dayScore = max(0, pkScore - ondayScore) # 今日已获得积分,正积分 @@ -452,29 +462,23 @@ overPack.CWinCnt = cWinCount NetPackCommon.SendFakePack(curPlayer, overPack) - # 通知跨服更新榜单积分数据 + # 如果能上榜的,则通知跨服更新榜单积分数据 billboardCfg = IpyGameDataPY.GetFuncEvalCfg("CrossRealmPKCfg", 1, []) if billboardCfg and len(billboardCfg) > 1 or danLV >= billboardCfg[1]: - pass -# dataMsg = { -# "seasonID":seasonID, -# "pkZoneID":zoneID, -# "accID":curPlayer.GetAccID(), -# "playerID":playerID, -# "playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer), -# "playerJob":curPlayer.GetJob(), -# "playerLV":curPlayer.GetLV(), -# "maxHP":curPlayer.GetMaxHP(), -# "maxProDef":PlayerControl.GetMaxProDef(curPlayer), -# "fightPower":curPlayer.GetFightPower(), -# "realmLV":curPlayer.GetOfficialRank(), -# "pkScore":pkScore, -# "danLV":danLV, -# "cWinCount":cWinCount, -# "ondayScore":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_OnDayScore), # 过天时的积分 -# } -# GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PKMatch, dataMsg) -# GameWorld.Log(" 更新积分到跨服服务器 dataMsg=%s" % str(dataMsg), playerID) + dataMsg = { + "seasonID":seasonID, + "pkZoneID":zoneID, + "accID":curPlayer.GetAccID(), + "playerID":playerID, + "playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer), + "playerJob":curPlayer.GetJob(), + "fightPower":curPlayer.GetFightPower(), + "realmLV":curPlayer.GetOfficialRank(), + "pkScore":pkScore, + "danLV":danLV, + } + GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PKScore, dataMsg) + GameWorld.Log(" 更新积分到跨服服务器 dataMsg=%s" % str(dataMsg), playerID) return -- Gitblit v1.8.0