ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8515,6 +8515,213 @@
#------------------------------------------------------
# B0 20 膜拜信息列表 #tagGCWorshipInfoList
class  tagGCWorshipInfo(Structure):
    PlayerID = 0    #(DWORD PlayerID)// 目标玩家ID
    WorshipType = 0    #(BYTE WorshipType)// 膜拜类型
    WorshipValue = 0    #(DWORD WorshipValue)// 膜拜类型对应的功能值,如名次或其他,由具体膜拜类型定义对应值含义
    InfoLen = 0    #(WORD InfoLen)
    PlayerInfo = ""    #(String PlayerInfo)// 玩家信息{k:v, ...}
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.WorshipType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.WorshipValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.InfoLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.PlayerInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.InfoLen)
        return _pos
    def Clear(self):
        self.PlayerID = 0
        self.WorshipType = 0
        self.WorshipValue = 0
        self.InfoLen = 0
        self.PlayerInfo = ""
        return
    def GetLength(self):
        length = 0
        length += 4
        length += 1
        length += 4
        length += 2
        length += len(self.PlayerInfo)
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteDWORD(data, self.PlayerID)
        data = CommFunc.WriteBYTE(data, self.WorshipType)
        data = CommFunc.WriteDWORD(data, self.WorshipValue)
        data = CommFunc.WriteWORD(data, self.InfoLen)
        data = CommFunc.WriteString(data, self.InfoLen, self.PlayerInfo)
        return data
    def OutputString(self):
        DumpString = '''
                                PlayerID:%d,
                                WorshipType:%d,
                                WorshipValue:%d,
                                InfoLen:%d,
                                PlayerInfo:%s
                                '''\
                                %(
                                self.PlayerID,
                                self.WorshipType,
                                self.WorshipValue,
                                self.InfoLen,
                                self.PlayerInfo
                                )
        return DumpString
class  tagGCWorshipInfoList(Structure):
    Head = tagHead()
    WorshipCount = 0    #(BYTE WorshipCount)
    WorshipInfoList = list()    #(vector<tagGCWorshipInfo> WorshipInfoList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xB0
        self.Head.SubCmd = 0x20
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.WorshipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.WorshipCount):
            temWorshipInfoList = tagGCWorshipInfo()
            _pos = temWorshipInfoList.ReadData(_lpData, _pos)
            self.WorshipInfoList.append(temWorshipInfoList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xB0
        self.Head.SubCmd = 0x20
        self.WorshipCount = 0
        self.WorshipInfoList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.WorshipCount):
            length += self.WorshipInfoList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.WorshipCount)
        for i in range(self.WorshipCount):
            data = CommFunc.WriteString(data, self.WorshipInfoList[i].GetLength(), self.WorshipInfoList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                WorshipCount:%d,
                                WorshipInfoList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.WorshipCount,
                                "..."
                                )
        return DumpString
m_NAtagGCWorshipInfoList=tagGCWorshipInfoList()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCWorshipInfoList.Head.Cmd,m_NAtagGCWorshipInfoList.Head.SubCmd))] = m_NAtagGCWorshipInfoList
#------------------------------------------------------
# B0 21 膜拜结果 #tagGCWorshipResult
class  tagGCWorshipResult(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("PlayerID", c_int),    # 目标玩家ID
                  ("WorshipType", c_ubyte),    # 膜拜类型
                  ("WorshipValue", c_int),    # 膜拜类型对应的功能值,如名次或其他,由具体膜拜类型定义对应值含义
                  ("Result", c_ubyte),    # 膜拜结果:0-成功;1-不存在该膜拜类型;2-不存在该目标膜拜;3-不能膜拜该目标;
                  ("MoneyType", c_ubyte),    # 货币类型
                  ("MoneyValue", c_int),    # 货币奖励
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB0
        self.SubCmd = 0x21
        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 = 0xB0
        self.SubCmd = 0x21
        self.PlayerID = 0
        self.WorshipType = 0
        self.WorshipValue = 0
        self.Result = 0
        self.MoneyType = 0
        self.MoneyValue = 0
        return
    def GetLength(self):
        return sizeof(tagGCWorshipResult)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B0 21 膜拜结果 //tagGCWorshipResult:
                                Cmd:%s,
                                SubCmd:%s,
                                PlayerID:%d,
                                WorshipType:%d,
                                WorshipValue:%d,
                                Result:%d,
                                MoneyType:%d,
                                MoneyValue:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.PlayerID,
                                self.WorshipType,
                                self.WorshipValue,
                                self.Result,
                                self.MoneyType,
                                self.MoneyValue
                                )
        return DumpString
m_NAtagGCWorshipResult=tagGCWorshipResult()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCWorshipResult.Cmd,m_NAtagGCWorshipResult.SubCmd))] = m_NAtagGCWorshipResult
#------------------------------------------------------
#B3 03 询问是否允许添加好友#tagGCFriendAskIfJoin
class  tagGCFriendAskIfJoin(Structure):