hxp
2018-12-18 32e3c66bc7738107e53208edc4efe644f0aee229
5424 【后端】【1.4】跨服竞技场开发(封包、表格)
6个文件已修改
1223 ■■■■■ 已修改文件
PySysDB/PySysDBG.h 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -439,4 +439,13 @@
    dict        NotifyInfoEnd;    //全服提示信息 - 相对结束时间
    list        NotifyInfoLoop;    //全服提示信息 - 循环广播[间隔分钟, 广播key]
    BYTE        IsDayReset;    //是否每天重置
};
};
//跨服竞技场段位表
struct tagCrossRealmPKDan
{
    BYTE        _DanLV;    //段位等级
    WORD        LVUpScore;    //升段位所需积分
};
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -8825,6 +8825,220 @@
#------------------------------------------------------
# A5 1C 聚魂合成 #tagCMGatherSoulCompound
class  tagCMGatherSoulCompound(Structure):
    Head = tagHead()
    Cnt = 0    #(BYTE Cnt)
    PackList = list()    #(vector<BYTE> PackList)//所在位置 0-背包 1-孔
    IndexList = list()    #(vector<WORD> IndexList)//物品索引
    TagItemID = 0    #(DWORD TagItemID)//合成目标物品ID
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x1C
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Cnt):
            value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
            self.PackList.append(value)
        for i in range(self.Cnt):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.IndexList.append(value)
        self.TagItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x1C
        self.Cnt = 0
        self.PackList = list()
        self.IndexList = list()
        self.TagItemID = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1 * self.Cnt
        length += 2 * self.Cnt
        length += 4
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Cnt)
        for i in range(self.Cnt):
            data = CommFunc.WriteBYTE(data, self.PackList[i])
        for i in range(self.Cnt):
            data = CommFunc.WriteWORD(data, self.IndexList[i])
        data = CommFunc.WriteDWORD(data, self.TagItemID)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Cnt:%d,
                                PackList:%s,
                                IndexList:%s,
                                TagItemID:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Cnt,
                                "...",
                                "...",
                                self.TagItemID
                                )
        return DumpString
m_NAtagCMGatherSoulCompound=tagCMGatherSoulCompound()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulCompound.Head.Cmd,m_NAtagCMGatherSoulCompound.Head.SubCmd))] = m_NAtagCMGatherSoulCompound
#------------------------------------------------------
# A5 19 聚魂分解 #tagCMGatherSoulDecompose
class  tagCMGatherSoulDecompose(Structure):
    Head = tagHead()
    IsAuto = 0    #(BYTE IsAuto)// 是否自动分解
    Count = 0    #(BYTE Count)// 指定批量分解数,最大不超过50个
    PlaceIndexList = list()    #(vector<WORD> PlaceIndexList)// 批量分解位置索引列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x19
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.IsAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.PlaceIndexList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x19
        self.IsAuto = 0
        self.Count = 0
        self.PlaceIndexList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 2 * self.Count
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.IsAuto)
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteWORD(data, self.PlaceIndexList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                IsAuto:%d,
                                Count:%d,
                                PlaceIndexList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.IsAuto,
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagCMGatherSoulDecompose=tagCMGatherSoulDecompose()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulDecompose.Head.Cmd,m_NAtagCMGatherSoulDecompose.Head.SubCmd))] = m_NAtagCMGatherSoulDecompose
#------------------------------------------------------
# A5 18 聚魂升级 #tagCMGatherSoulUp
class  tagCMGatherSoulUp(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("PlaceType", c_ubyte),    # 位置类型;0-背包,1-孔
                  ("PlaceIndex", c_ushort),    # 位置索引
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA5
        self.SubCmd = 0x18
        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.Cmd = 0xA5
        self.SubCmd = 0x18
        self.PlaceType = 0
        self.PlaceIndex = 0
        return
    def GetLength(self):
        return sizeof(tagCMGatherSoulUp)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A5 18 聚魂升级 //tagCMGatherSoulUp:
                                Cmd:%s,
                                SubCmd:%s,
                                PlaceType:%d,
                                PlaceIndex:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.PlaceType,
                                self.PlaceIndex
                                )
        return DumpString
m_NAtagCMGatherSoulUp=tagCMGatherSoulUp()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulUp.Cmd,m_NAtagCMGatherSoulUp.SubCmd))] = m_NAtagCMGatherSoulUp
#------------------------------------------------------
# A5 41 领取投资理财回报 #tagCMGetInvestReward
class  tagCMGetInvestReward(Structure):
@@ -15023,6 +15237,58 @@
#------------------------------------------------------
# C1 01 跨服PK匹配 #tagCMCrossRealmPKMatch
class  tagCMCrossRealmPKMatch(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Type", c_ubyte),    # 0-取消匹配; 1-进行匹配
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC1
        self.SubCmd = 0x01
        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.Cmd = 0xC1
        self.SubCmd = 0x01
        self.Type = 0
        return
    def GetLength(self):
        return sizeof(tagCMCrossRealmPKMatch)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C1 01 跨服PK匹配 //tagCMCrossRealmPKMatch:
                                Cmd:%s,
                                SubCmd:%s,
                                Type:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Type
                                )
        return DumpString
m_NAtagCMCrossRealmPKMatch=tagCMCrossRealmPKMatch()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCrossRealmPKMatch.Cmd,m_NAtagCMCrossRealmPKMatch.SubCmd))] = m_NAtagCMCrossRealmPKMatch
#------------------------------------------------------
# C1 11 跨服王者争霸押注 #tagCMMergeKingSupport
class  tagCMMergeKingSupport(Structure):
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -8047,6 +8047,269 @@
#------------------------------------------------------
# C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
class  tagGCCrossRealmPKMatchOK(Structure):
    Head = tagHead()
    NameLen = 0    #(BYTE NameLen)
    PlayerName = ""    #(String PlayerName)// 跨服名字
    TagNameLen = 0    #(BYTE TagNameLen)
    TagPlayerName = ""    #(String TagPlayerName)// 对手名字
    TagJob = 0    #(BYTE TagJob)// 对手职业
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x01
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.TagJob,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x01
        self.NameLen = 0
        self.PlayerName = ""
        self.TagNameLen = 0
        self.TagPlayerName = ""
        self.TagJob = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.PlayerName)
        length += 1
        length += len(self.TagPlayerName)
        length += 1
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.NameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
        data = CommFunc.WriteBYTE(data, self.TagNameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.TagPlayerName)
        data = CommFunc.WriteBYTE(data, self.TagJob)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                NameLen:%d,
                                PlayerName:%s,
                                TagNameLen:%d,
                                TagPlayerName:%s,
                                TagJob:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.NameLen,
                                self.PlayerName,
                                self.TagNameLen,
                                self.TagPlayerName,
                                self.TagJob
                                )
        return DumpString
m_NAtagGCCrossRealmPKMatchOK=tagGCCrossRealmPKMatchOK()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKMatchOK.Head.Cmd,m_NAtagGCCrossRealmPKMatchOK.Head.SubCmd))] = m_NAtagGCCrossRealmPKMatchOK
#------------------------------------------------------
# C0 03 跨服PK战斗结果 #tagGCCrossRealmPKOverInfo
class  tagGCCrossRealmPKOverInfo(Structure):
    Head = tagHead()
    TimeStr = ""    #(char TimeStr[19])// 结算时间,格式 yyyy-MM-dd HH:mm:ss
    OverType = 0    #(BYTE OverType)// 0-正常,1-有人离线
    WinnerID = 0    #(DWORD WinnerID)// 胜方ID
    RoundCount = 0    #(BYTE RoundCount)// PK回合数
    RoundWinnerID = list()    #(vector<DWORD> RoundWinnerID)// 回合获胜ID列表
    AddScore = 0    #(WORD AddScore)// 本场加分
    Score = 0    #(WORD Score)// 当前积分
    DanLV = 0    #(BYTE DanLV)// 当前段位
    CWinCnt = 0    #(WORD CWinCnt)// 当前连胜数
    TagNameLen = 0    #(BYTE TagNameLen)
    TagName = ""    #(String TagName)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x03
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.TimeStr,_pos = CommFunc.ReadString(_lpData, _pos,19)
        self.OverType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.WinnerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RoundCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.RoundCount):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.RoundWinnerID.append(value)
        self.AddScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.Score,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.CWinCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagName,_pos = CommFunc.ReadString(_lpData, _pos,self.TagNameLen)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x03
        self.TimeStr = ""
        self.OverType = 0
        self.WinnerID = 0
        self.RoundCount = 0
        self.RoundWinnerID = list()
        self.AddScore = 0
        self.Score = 0
        self.DanLV = 0
        self.CWinCnt = 0
        self.TagNameLen = 0
        self.TagName = ""
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 19
        length += 1
        length += 4
        length += 1
        length += 4 * self.RoundCount
        length += 2
        length += 2
        length += 1
        length += 2
        length += 1
        length += len(self.TagName)
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteString(data, 19, self.TimeStr)
        data = CommFunc.WriteBYTE(data, self.OverType)
        data = CommFunc.WriteDWORD(data, self.WinnerID)
        data = CommFunc.WriteBYTE(data, self.RoundCount)
        for i in range(self.RoundCount):
            data = CommFunc.WriteDWORD(data, self.RoundWinnerID[i])
        data = CommFunc.WriteWORD(data, self.AddScore)
        data = CommFunc.WriteWORD(data, self.Score)
        data = CommFunc.WriteBYTE(data, self.DanLV)
        data = CommFunc.WriteWORD(data, self.CWinCnt)
        data = CommFunc.WriteBYTE(data, self.TagNameLen)
        data = CommFunc.WriteString(data, self.TagNameLen, self.TagName)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                TimeStr:%s,
                                OverType:%d,
                                WinnerID:%d,
                                RoundCount:%d,
                                RoundWinnerID:%s,
                                AddScore:%d,
                                Score:%d,
                                DanLV:%d,
                                CWinCnt:%d,
                                TagNameLen:%d,
                                TagName:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.TimeStr,
                                self.OverType,
                                self.WinnerID,
                                self.RoundCount,
                                "...",
                                self.AddScore,
                                self.Score,
                                self.DanLV,
                                self.CWinCnt,
                                self.TagNameLen,
                                self.TagName
                                )
        return DumpString
m_NAtagGCCrossRealmPKOverInfo=tagGCCrossRealmPKOverInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKOverInfo.Head.Cmd,m_NAtagGCCrossRealmPKOverInfo.Head.SubCmd))] = m_NAtagGCCrossRealmPKOverInfo
#------------------------------------------------------
# C0 02 跨服PK开始匹配 #tagGCCrossRealmPKStartMatch
class  tagGCCrossRealmPKStartMatch(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x02
        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.Cmd = 0xC0
        self.SubCmd = 0x02
        return
    def GetLength(self):
        return sizeof(tagGCCrossRealmPKStartMatch)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 02 跨服PK开始匹配 //tagGCCrossRealmPKStartMatch:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch
#------------------------------------------------------
# D1 25 通知可进入跨服王者争霸 #tagCanEnterMergeKing
class  tagCanEnterMergeKing(Structure):
@@ -12347,6 +12610,73 @@
#------------------------------------------------------
# A3 1E 玩家聚魂孔信息 #tagMCGatherSoulHoleInfo
class  tagMCGatherSoulHoleInfo(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)// 孔信息数
    GatherSoulDataList = list()    #(vector<DWORD> GatherSoulDataList)// 孔数据信息, 数据与背包数据相同
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x1E
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.GatherSoulDataList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x1E
        self.Count = 0
        self.GatherSoulDataList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 4 * self.Count
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteDWORD(data, self.GatherSoulDataList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                GatherSoulDataList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagMCGatherSoulHoleInfo=tagMCGatherSoulHoleInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherSoulHoleInfo.Head.Cmd,m_NAtagMCGatherSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherSoulHoleInfo
#------------------------------------------------------
# A3 1D 神兵等级信息 #tagMCGodWeaponLVList
class  tagMCGodWeaponLVInfo(Structure):
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -376,6 +376,11 @@
                        ("list", "NotifyInfoLoop", 0),
                        ("BYTE", "IsDayReset", 0),
                        ),
                "CrossRealmPKDan":(
                        ("BYTE", "DanLV", 1),
                        ("WORD", "LVUpScore", 0),
                        ),
                }
@@ -1100,6 +1105,17 @@
    def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
    def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
    def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
# 跨服竞技场段位表
class IPY_CrossRealmPKDan():
    def __init__(self):
        self.DanLV = 0
        self.LVUpScore = 0
        return
    def GetDanLV(self): return self.DanLV # 段位等级
    def GetLVUpScore(self): return self.LVUpScore # 升段位所需积分
def Log(msg, playerID=0, par=0):
@@ -1189,6 +1205,8 @@
        self.ipyActWishingWellLen = len(self.ipyActWishingWellCache)
        self.ipyActTotalRechargeCache = self.__LoadFileData("ActTotalRecharge", IPY_ActTotalRecharge)
        self.ipyActTotalRechargeLen = len(self.ipyActTotalRechargeCache)
        self.ipyCrossRealmPKDanCache = self.__LoadFileData("CrossRealmPKDan", IPY_CrossRealmPKDan)
        self.ipyCrossRealmPKDanLen = len(self.ipyCrossRealmPKDanCache)
        Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
        Log("IPY_DataMgr InitOK!")
        return
@@ -1419,6 +1437,8 @@
    def GetActWishingWellByIndex(self, index): return self.ipyActWishingWellCache[index]
    def GetActTotalRechargeCount(self): return self.ipyActTotalRechargeLen
    def GetActTotalRechargeByIndex(self, index): return self.ipyActTotalRechargeCache[index]
    def GetCrossRealmPKDanCount(self): return self.ipyCrossRealmPKDanLen
    def GetCrossRealmPKDanByIndex(self, index): return self.ipyCrossRealmPKDanCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -8825,6 +8825,220 @@
#------------------------------------------------------
# A5 1C 聚魂合成 #tagCMGatherSoulCompound
class  tagCMGatherSoulCompound(Structure):
    Head = tagHead()
    Cnt = 0    #(BYTE Cnt)
    PackList = list()    #(vector<BYTE> PackList)//所在位置 0-背包 1-孔
    IndexList = list()    #(vector<WORD> IndexList)//物品索引
    TagItemID = 0    #(DWORD TagItemID)//合成目标物品ID
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x1C
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Cnt):
            value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
            self.PackList.append(value)
        for i in range(self.Cnt):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.IndexList.append(value)
        self.TagItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x1C
        self.Cnt = 0
        self.PackList = list()
        self.IndexList = list()
        self.TagItemID = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1 * self.Cnt
        length += 2 * self.Cnt
        length += 4
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Cnt)
        for i in range(self.Cnt):
            data = CommFunc.WriteBYTE(data, self.PackList[i])
        for i in range(self.Cnt):
            data = CommFunc.WriteWORD(data, self.IndexList[i])
        data = CommFunc.WriteDWORD(data, self.TagItemID)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Cnt:%d,
                                PackList:%s,
                                IndexList:%s,
                                TagItemID:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Cnt,
                                "...",
                                "...",
                                self.TagItemID
                                )
        return DumpString
m_NAtagCMGatherSoulCompound=tagCMGatherSoulCompound()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulCompound.Head.Cmd,m_NAtagCMGatherSoulCompound.Head.SubCmd))] = m_NAtagCMGatherSoulCompound
#------------------------------------------------------
# A5 19 聚魂分解 #tagCMGatherSoulDecompose
class  tagCMGatherSoulDecompose(Structure):
    Head = tagHead()
    IsAuto = 0    #(BYTE IsAuto)// 是否自动分解
    Count = 0    #(BYTE Count)// 指定批量分解数,最大不超过50个
    PlaceIndexList = list()    #(vector<WORD> PlaceIndexList)// 批量分解位置索引列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x19
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.IsAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.PlaceIndexList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x19
        self.IsAuto = 0
        self.Count = 0
        self.PlaceIndexList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 2 * self.Count
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.IsAuto)
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteWORD(data, self.PlaceIndexList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                IsAuto:%d,
                                Count:%d,
                                PlaceIndexList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.IsAuto,
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagCMGatherSoulDecompose=tagCMGatherSoulDecompose()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulDecompose.Head.Cmd,m_NAtagCMGatherSoulDecompose.Head.SubCmd))] = m_NAtagCMGatherSoulDecompose
#------------------------------------------------------
# A5 18 聚魂升级 #tagCMGatherSoulUp
class  tagCMGatherSoulUp(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("PlaceType", c_ubyte),    # 位置类型;0-背包,1-孔
                  ("PlaceIndex", c_ushort),    # 位置索引
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA5
        self.SubCmd = 0x18
        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.Cmd = 0xA5
        self.SubCmd = 0x18
        self.PlaceType = 0
        self.PlaceIndex = 0
        return
    def GetLength(self):
        return sizeof(tagCMGatherSoulUp)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A5 18 聚魂升级 //tagCMGatherSoulUp:
                                Cmd:%s,
                                SubCmd:%s,
                                PlaceType:%d,
                                PlaceIndex:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.PlaceType,
                                self.PlaceIndex
                                )
        return DumpString
m_NAtagCMGatherSoulUp=tagCMGatherSoulUp()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulUp.Cmd,m_NAtagCMGatherSoulUp.SubCmd))] = m_NAtagCMGatherSoulUp
#------------------------------------------------------
# A5 41 领取投资理财回报 #tagCMGetInvestReward
class  tagCMGetInvestReward(Structure):
@@ -15023,6 +15237,58 @@
#------------------------------------------------------
# C1 01 跨服PK匹配 #tagCMCrossRealmPKMatch
class  tagCMCrossRealmPKMatch(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Type", c_ubyte),    # 0-取消匹配; 1-进行匹配
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC1
        self.SubCmd = 0x01
        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.Cmd = 0xC1
        self.SubCmd = 0x01
        self.Type = 0
        return
    def GetLength(self):
        return sizeof(tagCMCrossRealmPKMatch)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C1 01 跨服PK匹配 //tagCMCrossRealmPKMatch:
                                Cmd:%s,
                                SubCmd:%s,
                                Type:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Type
                                )
        return DumpString
m_NAtagCMCrossRealmPKMatch=tagCMCrossRealmPKMatch()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCrossRealmPKMatch.Cmd,m_NAtagCMCrossRealmPKMatch.SubCmd))] = m_NAtagCMCrossRealmPKMatch
#------------------------------------------------------
# C1 11 跨服王者争霸押注 #tagCMMergeKingSupport
class  tagCMMergeKingSupport(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8047,6 +8047,269 @@
#------------------------------------------------------
# C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
class  tagGCCrossRealmPKMatchOK(Structure):
    Head = tagHead()
    NameLen = 0    #(BYTE NameLen)
    PlayerName = ""    #(String PlayerName)// 跨服名字
    TagNameLen = 0    #(BYTE TagNameLen)
    TagPlayerName = ""    #(String TagPlayerName)// 对手名字
    TagJob = 0    #(BYTE TagJob)// 对手职业
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x01
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.TagJob,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x01
        self.NameLen = 0
        self.PlayerName = ""
        self.TagNameLen = 0
        self.TagPlayerName = ""
        self.TagJob = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += len(self.PlayerName)
        length += 1
        length += len(self.TagPlayerName)
        length += 1
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.NameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
        data = CommFunc.WriteBYTE(data, self.TagNameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.TagPlayerName)
        data = CommFunc.WriteBYTE(data, self.TagJob)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                NameLen:%d,
                                PlayerName:%s,
                                TagNameLen:%d,
                                TagPlayerName:%s,
                                TagJob:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.NameLen,
                                self.PlayerName,
                                self.TagNameLen,
                                self.TagPlayerName,
                                self.TagJob
                                )
        return DumpString
m_NAtagGCCrossRealmPKMatchOK=tagGCCrossRealmPKMatchOK()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKMatchOK.Head.Cmd,m_NAtagGCCrossRealmPKMatchOK.Head.SubCmd))] = m_NAtagGCCrossRealmPKMatchOK
#------------------------------------------------------
# C0 03 跨服PK战斗结果 #tagGCCrossRealmPKOverInfo
class  tagGCCrossRealmPKOverInfo(Structure):
    Head = tagHead()
    TimeStr = ""    #(char TimeStr[19])// 结算时间,格式 yyyy-MM-dd HH:mm:ss
    OverType = 0    #(BYTE OverType)// 0-正常,1-有人离线
    WinnerID = 0    #(DWORD WinnerID)// 胜方ID
    RoundCount = 0    #(BYTE RoundCount)// PK回合数
    RoundWinnerID = list()    #(vector<DWORD> RoundWinnerID)// 回合获胜ID列表
    AddScore = 0    #(WORD AddScore)// 本场加分
    Score = 0    #(WORD Score)// 当前积分
    DanLV = 0    #(BYTE DanLV)// 当前段位
    CWinCnt = 0    #(WORD CWinCnt)// 当前连胜数
    TagNameLen = 0    #(BYTE TagNameLen)
    TagName = ""    #(String TagName)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x03
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.TimeStr,_pos = CommFunc.ReadString(_lpData, _pos,19)
        self.OverType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.WinnerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RoundCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.RoundCount):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.RoundWinnerID.append(value)
        self.AddScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.Score,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.CWinCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagName,_pos = CommFunc.ReadString(_lpData, _pos,self.TagNameLen)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x03
        self.TimeStr = ""
        self.OverType = 0
        self.WinnerID = 0
        self.RoundCount = 0
        self.RoundWinnerID = list()
        self.AddScore = 0
        self.Score = 0
        self.DanLV = 0
        self.CWinCnt = 0
        self.TagNameLen = 0
        self.TagName = ""
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 19
        length += 1
        length += 4
        length += 1
        length += 4 * self.RoundCount
        length += 2
        length += 2
        length += 1
        length += 2
        length += 1
        length += len(self.TagName)
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteString(data, 19, self.TimeStr)
        data = CommFunc.WriteBYTE(data, self.OverType)
        data = CommFunc.WriteDWORD(data, self.WinnerID)
        data = CommFunc.WriteBYTE(data, self.RoundCount)
        for i in range(self.RoundCount):
            data = CommFunc.WriteDWORD(data, self.RoundWinnerID[i])
        data = CommFunc.WriteWORD(data, self.AddScore)
        data = CommFunc.WriteWORD(data, self.Score)
        data = CommFunc.WriteBYTE(data, self.DanLV)
        data = CommFunc.WriteWORD(data, self.CWinCnt)
        data = CommFunc.WriteBYTE(data, self.TagNameLen)
        data = CommFunc.WriteString(data, self.TagNameLen, self.TagName)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                TimeStr:%s,
                                OverType:%d,
                                WinnerID:%d,
                                RoundCount:%d,
                                RoundWinnerID:%s,
                                AddScore:%d,
                                Score:%d,
                                DanLV:%d,
                                CWinCnt:%d,
                                TagNameLen:%d,
                                TagName:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.TimeStr,
                                self.OverType,
                                self.WinnerID,
                                self.RoundCount,
                                "...",
                                self.AddScore,
                                self.Score,
                                self.DanLV,
                                self.CWinCnt,
                                self.TagNameLen,
                                self.TagName
                                )
        return DumpString
m_NAtagGCCrossRealmPKOverInfo=tagGCCrossRealmPKOverInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKOverInfo.Head.Cmd,m_NAtagGCCrossRealmPKOverInfo.Head.SubCmd))] = m_NAtagGCCrossRealmPKOverInfo
#------------------------------------------------------
# C0 02 跨服PK开始匹配 #tagGCCrossRealmPKStartMatch
class  tagGCCrossRealmPKStartMatch(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x02
        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.Cmd = 0xC0
        self.SubCmd = 0x02
        return
    def GetLength(self):
        return sizeof(tagGCCrossRealmPKStartMatch)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 02 跨服PK开始匹配 //tagGCCrossRealmPKStartMatch:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch
#------------------------------------------------------
# D1 25 通知可进入跨服王者争霸 #tagCanEnterMergeKing
class  tagCanEnterMergeKing(Structure):
@@ -12347,6 +12610,73 @@
#------------------------------------------------------
# A3 1E 玩家聚魂孔信息 #tagMCGatherSoulHoleInfo
class  tagMCGatherSoulHoleInfo(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)// 孔信息数
    GatherSoulDataList = list()    #(vector<DWORD> GatherSoulDataList)// 孔数据信息, 数据与背包数据相同
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x1E
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.GatherSoulDataList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x1E
        self.Count = 0
        self.GatherSoulDataList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 4 * self.Count
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteDWORD(data, self.GatherSoulDataList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                GatherSoulDataList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagMCGatherSoulHoleInfo=tagMCGatherSoulHoleInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherSoulHoleInfo.Head.Cmd,m_NAtagMCGatherSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherSoulHoleInfo
#------------------------------------------------------
# A3 1D 神兵等级信息 #tagMCGodWeaponLVList
class  tagMCGodWeaponLVInfo(Structure):