7954 【主干】【后端】跨服PVP匹配机器人规则优化
| | |
| | | {
|
| | | BYTE _DanLV; //段位等级
|
| | | WORD LVUpScore; //升段位所需积分
|
| | | BYTE MatchRobotRate; //匹配机器人基础概率,百分率
|
| | | BYTE MatchRobotRateEx; //匹配机器人失败次数附加概率,百分率
|
| | | };
|
| | |
|
| | | //跨服竞技场段位奖励表
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsRobot", c_ubyte), # 是否匹配机器人
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x02
|
| | | self.IsRobot = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''// C0 02 跨服PK开始匹配 //tagGCCrossRealmPKStartMatch:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | SubCmd:%s,
|
| | | IsRobot:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | self.SubCmd,
|
| | | self.IsRobot
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 12 通知骑宠觉醒信息 #tagMCHorsePetSkinData
|
| | |
|
| | | class tagMCHorsePetSkinInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Type", c_ubyte), # 1-坐骑 2-灵宠
|
| | | ("ID", c_int), # 对应坐骑表灵宠表ID
|
| | | ("Exp", c_int), #经验
|
| | | ("SkinLV", c_ubyte), #觉醒等级
|
| | | ("SkinIndex", c_ubyte), #当前选择外观
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Type = 0
|
| | | self.ID = 0
|
| | | self.Exp = 0
|
| | | self.SkinLV = 0
|
| | | self.SkinIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHorsePetSkinInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 12 通知骑宠觉醒信息 //tagMCHorsePetSkinData:
|
| | | Type:%d,
|
| | | ID:%d,
|
| | | Exp:%d,
|
| | | SkinLV:%d,
|
| | | SkinIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Type,
|
| | | self.ID,
|
| | | self.Exp,
|
| | | self.SkinLV,
|
| | | self.SkinIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHorsePetSkinData(Structure):
|
| | | Head = tagHead()
|
| | | Num = 0 #(BYTE Num)//个数
|
| | | InfoList = list() #(vector<tagMCHorsePetSkinInfo> InfoList)// 数据列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x12
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Num,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Num):
|
| | | temInfoList = tagMCHorsePetSkinInfo()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x12
|
| | | self.Num = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Num):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Num)
|
| | | for i in range(self.Num):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Num:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Num,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHorsePetSkinData=tagMCHorsePetSkinData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHorsePetSkinData.Head.Cmd,m_NAtagMCHorsePetSkinData.Head.SubCmd))] = m_NAtagMCHorsePetSkinData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo
|
| | |
|
| | | class tagMCMagicWeaponInfo(Structure):
|
| | |
| | | Def_PDict_CrossPK_DanLV = "CrossPK_DanLV" # 当前段位
|
| | | Def_PDict_CrossPK_PKCount = "CrossPK_PKCount" # 当前总PK次数
|
| | | Def_PDict_CrossPK_WinCount = "CrossPK_WinCount" # 当前胜利次数
|
| | | Def_PDict_CrossPK_CWinCount = "CrossPK_CWinCount" # 跨当前连胜次数
|
| | | Def_PDict_CrossPK_CWinCount = "CrossPK_CWinCount" # 当前连胜次数
|
| | | Def_PDict_CrossPK_CLoseCount = "CrossPK_CLoseCount" # 当前连败次数
|
| | | Def_PDict_CrossPK_IsMatchRobot = "CrossPK_IsMatchRobot" # 本次是否匹配机器人,1-是,0-否
|
| | | Def_PDict_CrossPK_TodayPKCount = "CrossPK_TodayPKCount" # 今日已PK次数
|
| | | Def_PDict_CrossPK_TodayWinCount = "CrossPK_TodayWinCount" # 今日已胜利次数
|
| | | Def_PDict_CrossPK_TodayBuyCount = "CrossPK_TodayBuyCount" # 今日已购买PK次数
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsRobot", c_ubyte), # 是否匹配机器人
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x02
|
| | | self.IsRobot = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''// C0 02 跨服PK开始匹配 //tagGCCrossRealmPKStartMatch:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | SubCmd:%s,
|
| | | IsRobot:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | self.SubCmd,
|
| | | self.IsRobot
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 12 通知骑宠觉醒信息 #tagMCHorsePetSkinData
|
| | |
|
| | | class tagMCHorsePetSkinInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Type", c_ubyte), # 1-坐骑 2-灵宠
|
| | | ("ID", c_int), # 对应坐骑表灵宠表ID
|
| | | ("Exp", c_int), #经验
|
| | | ("SkinLV", c_ubyte), #觉醒等级
|
| | | ("SkinIndex", c_ubyte), #当前选择外观
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Type = 0
|
| | | self.ID = 0
|
| | | self.Exp = 0
|
| | | self.SkinLV = 0
|
| | | self.SkinIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHorsePetSkinInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 12 通知骑宠觉醒信息 //tagMCHorsePetSkinData:
|
| | | Type:%d,
|
| | | ID:%d,
|
| | | Exp:%d,
|
| | | SkinLV:%d,
|
| | | SkinIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Type,
|
| | | self.ID,
|
| | | self.Exp,
|
| | | self.SkinLV,
|
| | | self.SkinIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHorsePetSkinData(Structure):
|
| | | Head = tagHead()
|
| | | Num = 0 #(BYTE Num)//个数
|
| | | InfoList = list() #(vector<tagMCHorsePetSkinInfo> InfoList)// 数据列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x12
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Num,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Num):
|
| | | temInfoList = tagMCHorsePetSkinInfo()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x12
|
| | | self.Num = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Num):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Num)
|
| | | for i in range(self.Num):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Num:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Num,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHorsePetSkinData=tagMCHorsePetSkinData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHorsePetSkinData.Head.Cmd,m_NAtagMCHorsePetSkinData.Head.SubCmd))] = m_NAtagMCHorsePetSkinData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo
|
| | |
|
| | | class tagMCMagicWeaponInfo(Structure):
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_PKCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_WinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CWinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CLoseCount, 0)
|
| | | 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)
|
| | |
| | | 3:[ChConfig.Def_PDict_CrossPK_PKCount, "PK次数"],
|
| | | 4:[ChConfig.Def_PDict_CrossPK_WinCount, "胜利次数"],
|
| | | 5:[ChConfig.Def_PDict_CrossPK_CWinCount, "连胜次数"],
|
| | | 6:[ChConfig.Def_PDict_CrossPK_TodayPKCount, "今日PK次数"],
|
| | | 7:[ChConfig.Def_PDict_CrossPK_TodayWinCount, "今日胜利次数"],
|
| | | 8:[ChConfig.Def_PDict_CrossPK_TodayBuyCount, "今日购买次数"],
|
| | | 6:[ChConfig.Def_PDict_CrossPK_CLoseCount, "连败次数"],
|
| | | 7:[ChConfig.Def_PDict_CrossPK_TodayPKCount, "今日PK次数"],
|
| | | 8:[ChConfig.Def_PDict_CrossPK_TodayWinCount, "今日胜利次数"],
|
| | | 9:[ChConfig.Def_PDict_CrossPK_TodayBuyCount, "今日购买次数"],
|
| | | }
|
| | | indexList = range(len(msgList))
|
| | | for i in indexList[::2]:
|
| | |
| | | def __PrintHelp(curPlayer):
|
| | | GameWorld.DebugAnswer(curPlayer, "重置数据: SetCrossPK 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置数据: SetCrossPK 类型 值")
|
| | | GameWorld.DebugAnswer(curPlayer, "类型:0-积分,1-过天积分,2-段位,3-PK次数,4-胜利次数,5-连胜次数")
|
| | | GameWorld.DebugAnswer(curPlayer, "6-今日PK次数,7-今日胜利次数,8-今日购买次数")
|
| | | GameWorld.DebugAnswer(curPlayer, "类型:0-积分,1-过天积分,2-段位,3-PK次数,4-胜利次数,5-连胜次数,6-连败次数")
|
| | | GameWorld.DebugAnswer(curPlayer, "7-今日PK次数,8-今日胜利次数,9-今日购买次数")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置历史记录: SetCrossPK 赛季ID 类型 数值")
|
| | | GameWorld.DebugAnswer(curPlayer, "类型:0-段位,1-名次,2-积分,3-奖励等级")
|
| | | return
|
| | |
| | | "CrossRealmPKDan":(
|
| | | ("BYTE", "DanLV", 1),
|
| | | ("WORD", "LVUpScore", 0),
|
| | | ("BYTE", "MatchRobotRate", 0),
|
| | | ("BYTE", "MatchRobotRateEx", 0),
|
| | | ),
|
| | |
|
| | | "CrossRealmPKDanAward":(
|
| | |
| | | def __init__(self): |
| | | self.DanLV = 0
|
| | | self.LVUpScore = 0 |
| | | self.MatchRobotRate = 0
|
| | | self.MatchRobotRateEx = 0 |
| | | return |
| | | |
| | | def GetDanLV(self): return self.DanLV # 段位等级
|
| | | def GetLVUpScore(self): return self.LVUpScore # 升段位所需积分 |
| | | def GetMatchRobotRate(self): return self.MatchRobotRate # 匹配机器人基础概率,百分率
|
| | | def GetMatchRobotRateEx(self): return self.MatchRobotRateEx # 匹配机器人失败次数附加概率,百分率 |
| | | |
| | | # 跨服竞技场段位奖励表 |
| | | class IPY_CrossRealmPKDanAward(): |
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_PKCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_WinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CWinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CLoseCount, 0)
|
| | | 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)
|
| | |
| | | if requestType == 1:
|
| | | if not CheckHavePKCount(curPlayer):
|
| | | return
|
| | | |
| | | danLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_DanLV)
|
| | | danIpyData = IpyGameDataPY.GetIpyGameData("CrossRealmPKDan", danLV)
|
| | | if not danIpyData:
|
| | | return
|
| | | cLoseCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_CLoseCount)
|
| | | matchRobotRate = danIpyData.GetMatchRobotRate() + danIpyData.GetMatchRobotRateEx() * cLoseCount
|
| | | isMatchRobot = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_IsMatchRobot)
|
| | | GameWorld.Log("isMatchRobot=%s,danLV=%s,cLoseCount=%s,匹配机器人概率=%s" % (isMatchRobot, danLV, cLoseCount, matchRobotRate), playerID)
|
| | | if isMatchRobot or (matchRobotRate and GameWorld.CanHappen(matchRobotRate, 100)):
|
| | | GameWorld.Log(" 本次匹配到机器人!", playerID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_IsMatchRobot, 1)
|
| | | startMatchPack = ChPyNetSendPack.tagGCCrossRealmPKStartMatch()
|
| | | startMatchPack.IsRobot = 1
|
| | | NetPackCommon.SendFakePack(curPlayer, startMatchPack)
|
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_IsMatchRobot, 0)
|
| | |
|
| | | dataMsg = {
|
| | | "seasonID":GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID), # 赛季ID
|
| | |
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TotalScore, pkScore)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLV, danLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_IsMatchRobot, 0)
|
| | |
|
| | | pkCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_PKCount) + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_PKCount, pkCount)
|
| | |
| | | winCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_WinCount) + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_WinCount, winCount)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CWinCount, cWinCount)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CLoseCount, 0)
|
| | | GameWorld.Log(" winner winCount=%s,cWinCount=%s" % (winCount, cWinCount), playerID)
|
| | | else:
|
| | | cLoseCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_CLoseCount) + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CLoseCount, cLoseCount)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CWinCount, 0)
|
| | | GameWorld.Log(" loser cWinCount=0", playerID)
|
| | | GameWorld.Log(" loser cLoseCount=%s" % cLoseCount, playerID)
|
| | |
|
| | | # 同一天的话增加当日PK次数
|
| | | if isToday:
|
| | |
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | isWinner = clientData.IsWin
|
| | | # billboardCfg = IpyGameDataPY.GetFuncEvalCfg("CrossRealmPKCfg", 1, [])
|
| | | # if not billboardCfg or len(billboardCfg) != 2:
|
| | | # GameWorld.ErrLog("跨服竞技场排行榜配置错误!")
|
| | | # return
|
| | | # danLVLimit = billboardCfg[1]
|
| | | # playerDanLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_DanLV)
|
| | | # #策划设计该机器人目的为了前期体验,这里只验证是否超过上榜段位即可,即使作弊也不管,只要有次数即可
|
| | | # if playerDanLV >= danLVLimit:
|
| | | # GameWorld.ErrLog("该段位不允许与机器人匹配PK!playerDanLV=%s,danLVLimit=%s" % (playerDanLV, danLVLimit), playerID)
|
| | | # return
|
| | |
|
| | | if not CheckHavePKCount(curPlayer):
|
| | | return
|
| | | |
| | | isMatchRobot = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_IsMatchRobot)
|
| | | if not isMatchRobot:
|
| | | GameWorld.DebugLog("当前不允许结算跨服匹配机器人!IsMatchRobot=%s" % isMatchRobot, playerID)
|
| | | return
|
| | |
|
| | | zoneID = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
|
| | |
| | | if winIpyData and winIpyData.GetLVUpScore() and pkScore >= winIpyData.GetLVUpScore():
|
| | | danLV += 1
|
| | |
|
| | | isToday = True # 机器人结算的默认当天
|
| | | if not __DoAddPKOverData(curPlayer, zoneID, seasonID, danLV, pkScore, cWinCount, isWinner, isToday):
|
| | | return
|
| | | |
| | | # 只同步以下信息,其他信息前端自行补全
|
| | | overPack = ChPyNetSendPack.tagGCCrossRealmPKOverInfo()
|
| | | overPack.AddScore = addScore
|
| | |
| | | overPack.CWinCnt = cWinCount
|
| | | NetPackCommon.SendFakePack(curPlayer, overPack)
|
| | |
|
| | | isToday = True # 机器人结算的默认当天
|
| | | __DoAddPKOverData(curPlayer, zoneID, seasonID, danLV, pkScore, cWinCount, isWinner, isToday)
|
| | | # 通知跨服更新榜单积分数据
|
| | | 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)
|
| | | |
| | | return
|
| | |
|
| | |
|