From 63d429647aae8b63517b2fd67977a2fb7692462a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 10 十一月 2021 12:07:33 +0800 Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(主干冲突 补充) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 812 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 808 insertions(+), 4 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index d7a20ed..9956b8f 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -7276,6 +7276,571 @@ #------------------------------------------------------ +# B3 24 喜糖列表 #tagGCCandyList + +class tagGCCandyInfo(Structure): + PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方 + NameALen = 0 #(BYTE NameALen) + PlayerNameA = "" #(String PlayerNameA) + PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方 + NameBLen = 0 #(BYTE NameBLen) + PlayerNameB = "" #(String PlayerNameB) + BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID + MarryTime = 0 #(DWORD MarryTime)// 成亲时间戳,秒 + EndTime = 0 #(DWORD EndTime)// 结束时间戳,秒 + Prosperity = 0 #(DWORD Prosperity)// 当前繁荣度 + FireworksTotalBuyCount = 0 #(BYTE FireworksTotalBuyCount)// 烟花总已购买次数 + FireworksPlayerBuyCount = 0 #(BYTE FireworksPlayerBuyCount)// 烟花玩家已购买次数 + PlayerFreeEatCandyCount = 0 #(BYTE PlayerFreeEatCandyCount)// 玩家已免费吃该喜糖总次数,包含免费次数、烟花赠送次数 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen) + self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen) + self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Prosperity,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FireworksTotalBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FireworksPlayerBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerFreeEatCandyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerIDA = 0 + self.NameALen = 0 + self.PlayerNameA = "" + self.PlayerIDB = 0 + self.NameBLen = 0 + self.PlayerNameB = "" + self.BridePriceID = 0 + self.MarryTime = 0 + self.EndTime = 0 + self.Prosperity = 0 + self.FireworksTotalBuyCount = 0 + self.FireworksPlayerBuyCount = 0 + self.PlayerFreeEatCandyCount = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += len(self.PlayerNameA) + length += 4 + length += 1 + length += len(self.PlayerNameB) + length += 1 + length += 4 + length += 4 + length += 4 + length += 1 + length += 1 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerIDA) + data = CommFunc.WriteBYTE(data, self.NameALen) + data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA) + data = CommFunc.WriteDWORD(data, self.PlayerIDB) + data = CommFunc.WriteBYTE(data, self.NameBLen) + data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB) + data = CommFunc.WriteBYTE(data, self.BridePriceID) + data = CommFunc.WriteDWORD(data, self.MarryTime) + data = CommFunc.WriteDWORD(data, self.EndTime) + data = CommFunc.WriteDWORD(data, self.Prosperity) + data = CommFunc.WriteBYTE(data, self.FireworksTotalBuyCount) + data = CommFunc.WriteBYTE(data, self.FireworksPlayerBuyCount) + data = CommFunc.WriteBYTE(data, self.PlayerFreeEatCandyCount) + return data + + def OutputString(self): + DumpString = ''' + PlayerIDA:%d, + NameALen:%d, + PlayerNameA:%s, + PlayerIDB:%d, + NameBLen:%d, + PlayerNameB:%s, + BridePriceID:%d, + MarryTime:%d, + EndTime:%d, + Prosperity:%d, + FireworksTotalBuyCount:%d, + FireworksPlayerBuyCount:%d, + PlayerFreeEatCandyCount:%d + '''\ + %( + self.PlayerIDA, + self.NameALen, + self.PlayerNameA, + self.PlayerIDB, + self.NameBLen, + self.PlayerNameB, + self.BridePriceID, + self.MarryTime, + self.EndTime, + self.Prosperity, + self.FireworksTotalBuyCount, + self.FireworksPlayerBuyCount, + self.PlayerFreeEatCandyCount + ) + return DumpString + + +class tagGCCandyList(Structure): + Head = tagHead() + CandyCount = 0 #(WORD CandyCount) + CandyInfoList = list() #(vector<tagGCCandyInfo> CandyInfoList)// 可吃喜糖列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x24 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.CandyCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.CandyCount): + temCandyInfoList = tagGCCandyInfo() + _pos = temCandyInfoList.ReadData(_lpData, _pos) + self.CandyInfoList.append(temCandyInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x24 + self.CandyCount = 0 + self.CandyInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.CandyCount): + length += self.CandyInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.CandyCount) + for i in range(self.CandyCount): + data = CommFunc.WriteString(data, self.CandyInfoList[i].GetLength(), self.CandyInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + CandyCount:%d, + CandyInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.CandyCount, + "..." + ) + return DumpString + + +m_NAtagGCCandyList=tagGCCandyList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCandyList.Head.Cmd,m_NAtagGCCandyList.Head.SubCmd))] = m_NAtagGCCandyList + + +#------------------------------------------------------ +# B3 28 收到离婚信息 #tagGCMarryBreakInfo + +class tagGCMarryBreakInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID) + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x28 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x28 + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.PlayerName) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + NameLen:%d, + PlayerName:%s + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.NameLen, + self.PlayerName + ) + return DumpString + + +m_NAtagGCMarryBreakInfo=tagGCMarryBreakInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryBreakInfo.Head.Cmd,m_NAtagGCMarryBreakInfo.Head.SubCmd))] = m_NAtagGCMarryBreakInfo + + +#------------------------------------------------------ +# B3 22 收到提亲信息 #tagGCMarryReqInfo + +class tagGCMarryReqInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 同一个玩家ID多次提亲时可能同步多次,前端覆盖数据即可 + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x22 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x22 + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + self.BridePriceID = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.PlayerName) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.BridePriceID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + NameLen:%d, + PlayerName:%s, + BridePriceID:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.NameLen, + self.PlayerName, + self.BridePriceID + ) + return DumpString + + +m_NAtagGCMarryReqInfo=tagGCMarryReqInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqInfo.Head.Cmd,m_NAtagGCMarryReqInfo.Head.SubCmd))] = m_NAtagGCMarryReqInfo + + +#------------------------------------------------------ +# B3 21 提亲发送成功 #tagGCMarryReqOK + +class tagGCMarryReqOK(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + 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 = 0xB3 + self.SubCmd = 0x21 + return + + def GetLength(self): + return sizeof(tagGCMarryReqOK) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 21 提亲发送成功 //tagGCMarryReqOK: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagGCMarryReqOK=tagGCMarryReqOK() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqOK.Cmd,m_NAtagGCMarryReqOK.SubCmd))] = m_NAtagGCMarryReqOK + + +#------------------------------------------------------ +# B3 23 提亲回应结果 #tagGCMarryResponseRet + +class tagGCMarryResponseRet(Structure): + Head = tagHead() + PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方 + NameALen = 0 #(BYTE NameALen) + PlayerNameA = "" #(String PlayerNameA) + PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方 + NameBLen = 0 #(BYTE NameBLen) + PlayerNameB = "" #(String PlayerNameB) + IsOK = 0 #(BYTE IsOK)// 是否同意,0-否,1-是; 如果同意则双方都会收到该包,根据玩家ID判断自己是请求或接受方,显示不同的同意结果界面;不同意只有请求方会收到 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen) + self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen) + self.IsOK,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x23 + self.PlayerIDA = 0 + self.NameALen = 0 + self.PlayerNameA = "" + self.PlayerIDB = 0 + self.NameBLen = 0 + self.PlayerNameB = "" + self.IsOK = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.PlayerNameA) + length += 4 + length += 1 + length += len(self.PlayerNameB) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerIDA) + data = CommFunc.WriteBYTE(data, self.NameALen) + data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA) + data = CommFunc.WriteDWORD(data, self.PlayerIDB) + data = CommFunc.WriteBYTE(data, self.NameBLen) + data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB) + data = CommFunc.WriteBYTE(data, self.IsOK) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerIDA:%d, + NameALen:%d, + PlayerNameA:%s, + PlayerIDB:%d, + NameBLen:%d, + PlayerNameB:%s, + IsOK:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerIDA, + self.NameALen, + self.PlayerNameA, + self.PlayerIDB, + self.NameBLen, + self.PlayerNameB, + self.IsOK + ) + return DumpString + + +m_NAtagGCMarryResponseRet=tagGCMarryResponseRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryResponseRet.Head.Cmd,m_NAtagGCMarryResponseRet.Head.SubCmd))] = m_NAtagGCMarryResponseRet + + +#------------------------------------------------------ +# B3 20 送花成功通知 #tagGCSendFlowersOK + +class tagGCSendFlowersOK(Structure): + Head = tagHead() + NameLen = 0 #(BYTE NameLen)// 赠送方玩家名 + Name = "" #(String Name)//size = SrcNameLen + PlayerID = 0 #(DWORD PlayerID)// 赠送方玩家ID + FlowerCount = 0 #(DWORD FlowerCount)// 赠送花数量 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x20 + 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.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FlowerCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x20 + self.NameLen = 0 + self.Name = "" + self.PlayerID = 0 + self.FlowerCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.Name) + length += 4 + length += 4 + + 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.Name) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteDWORD(data, self.FlowerCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + NameLen:%d, + Name:%s, + PlayerID:%d, + FlowerCount:%d + '''\ + %( + self.Head.OutputString(), + self.NameLen, + self.Name, + self.PlayerID, + self.FlowerCount + ) + return DumpString + + +m_NAtagGCSendFlowersOK=tagGCSendFlowersOK() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendFlowersOK.Head.Cmd,m_NAtagGCSendFlowersOK.Head.SubCmd))] = m_NAtagGCSendFlowersOK + + +#------------------------------------------------------ #B3 01 添加社交对象 #tagGCAddSocialPlayer class tagGCAddSocialPlayer(Structure): @@ -7507,6 +8072,7 @@ LV = 0 #(WORD LV)//等级 RealmLV = 0 #(WORD RealmLV)//境界 OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线 + CoupleID = 0 #(DWORD CoupleID)//伴侣ID data = None def __init__(self): @@ -7521,6 +8087,7 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -7530,6 +8097,7 @@ self.LV = 0 self.RealmLV = 0 self.OnlineType = 0 + self.CoupleID = 0 return def GetLength(self): @@ -7540,6 +8108,7 @@ length += 2 length += 2 length += 1 + length += 4 return length @@ -7551,6 +8120,7 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteBYTE(data, self.OnlineType) + data = CommFunc.WriteDWORD(data, self.CoupleID) return data def OutputString(self): @@ -7560,7 +8130,8 @@ Job:%d, LV:%d, RealmLV:%d, - OnlineType:%d + OnlineType:%d, + CoupleID:%d '''\ %( self.PlayerID, @@ -7568,7 +8139,8 @@ self.Job, self.LV, self.RealmLV, - self.OnlineType + self.OnlineType, + self.CoupleID ) return DumpString @@ -7647,6 +8219,7 @@ _fields_ = [ ("PlayerID", c_int), ("SortValue", c_int), + ("Intimacy", c_int), #亲密度 - 好友组才有值 ] def __init__(self): @@ -7661,6 +8234,7 @@ def Clear(self): self.PlayerID = 0 self.SortValue = 0 + self.Intimacy = 0 return def GetLength(self): @@ -7672,11 +8246,13 @@ def OutputString(self): DumpString = '''//B3 08 通知玩家分组信息 //tagGCGroupPlayers: PlayerID:%d, - SortValue:%d + SortValue:%d, + Intimacy:%d '''\ %( self.PlayerID, - self.SortValue + self.SortValue, + self.Intimacy ) return DumpString @@ -12281,6 +12857,234 @@ #------------------------------------------------------ +# B3 25 魅力值信息 #tagMCCharmInfo + +class tagMCCharmInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("CharmTotal", c_int), # 魅力值 - 总 + ("CharmToday", c_int), # 魅力值 - 今日 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x25 + 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 = 0xB3 + self.SubCmd = 0x25 + self.CharmTotal = 0 + self.CharmToday = 0 + return + + def GetLength(self): + return sizeof(tagMCCharmInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 25 魅力值信息 //tagMCCharmInfo: + Cmd:%s, + SubCmd:%s, + CharmTotal:%d, + CharmToday:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.CharmTotal, + self.CharmToday + ) + return DumpString + + +m_NAtagMCCharmInfo=tagMCCharmInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCharmInfo.Cmd,m_NAtagMCCharmInfo.SubCmd))] = m_NAtagMCCharmInfo + + +#------------------------------------------------------ +# B3 26 伴侣信息 #tagMCCoupleInfo + +class tagMCCoupleInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("CoupleID", c_int), # 伴侣玩家ID,一定是好友,社交信息从好友系统中获取 + ("NewMarryTime", c_int), # 新婚时间戳, 秒,计算结婚天数按该时间计算 + ("MarryTime", c_int), # 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算 + ("BridePriceState", c_int), # 聘礼状态,按二进制位存储是否已购买 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x26 + 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 = 0xB3 + self.SubCmd = 0x26 + self.CoupleID = 0 + self.NewMarryTime = 0 + self.MarryTime = 0 + self.BridePriceState = 0 + return + + def GetLength(self): + return sizeof(tagMCCoupleInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 26 伴侣信息 //tagMCCoupleInfo: + Cmd:%s, + SubCmd:%s, + CoupleID:%d, + NewMarryTime:%d, + MarryTime:%d, + BridePriceState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.CoupleID, + self.NewMarryTime, + self.MarryTime, + self.BridePriceState + ) + return DumpString + + +m_NAtagMCCoupleInfo=tagMCCoupleInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCoupleInfo.Cmd,m_NAtagMCCoupleInfo.SubCmd))] = m_NAtagMCCoupleInfo + + +#------------------------------------------------------ +# B3 27 情戒信息 #tagMCLoveRingInfo + +class tagMCLoveRingInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ClassLV", c_ubyte), # 阶 + ("StarLV", c_ubyte), # 星 + ("EatCount", c_int), # 本星已淬炼道具数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x27 + 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 = 0xB3 + self.SubCmd = 0x27 + self.ClassLV = 0 + self.StarLV = 0 + self.EatCount = 0 + return + + def GetLength(self): + return sizeof(tagMCLoveRingInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 27 情戒信息 //tagMCLoveRingInfo: + Cmd:%s, + SubCmd:%s, + ClassLV:%d, + StarLV:%d, + EatCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ClassLV, + self.StarLV, + self.EatCount + ) + return DumpString + + +m_NAtagMCLoveRingInfo=tagMCLoveRingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingInfo.Cmd,m_NAtagMCLoveRingInfo.SubCmd))] = m_NAtagMCLoveRingInfo + + +#------------------------------------------------------ +# B3 29 情戒解锁成功 #tagMCLoveRingUnlockOK + +class tagMCLoveRingUnlockOK(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x29 + 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 = 0xB3 + self.SubCmd = 0x29 + return + + def GetLength(self): + return sizeof(tagMCLoveRingUnlockOK) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 29 情戒解锁成功 //tagMCLoveRingUnlockOK: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagMCLoveRingUnlockOK=tagMCLoveRingUnlockOK() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingUnlockOK.Cmd,m_NAtagMCLoveRingUnlockOK.SubCmd))] = m_NAtagMCLoveRingUnlockOK + + +#------------------------------------------------------ #A1 25 请求切换地图失败#tagMCChangeMapFail class tagMCChangeMapFail(Structure): -- Gitblit v1.8.0