From 8c4813b40cff97893a73d07105d950425ea98e9f Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 21 六月 2024 19:31:23 +0800 Subject: [PATCH] 10185 【越南】【港台】【主干】BOSS凭证修改(增加仙盟充值互助活动;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 267 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index f53ab2e..0bc4cf4 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -32764,6 +32764,273 @@ #------------------------------------------------------ +# AA 77 仙盟充值互助活动信息 #tagMCActFamilyCTGAssistInfo + +class tagMCActFamilyCTGAssistItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActFamilyCTGAssistItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 77 仙盟充值互助活动信息 //tagMCActFamilyCTGAssistInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActFamilyCTGAssistAward(Structure): + NeedCTGPlayers = 0 #(BYTE NeedCTGPlayers)//所需充值人数 + RecordIndex = 0 #(BYTE RecordIndex)//对应领奖记录索引 + Count = 0 #(BYTE Count) + AwardItemList = list() #(vector<tagMCActFamilyCTGAssistItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedCTGPlayers,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActFamilyCTGAssistItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedCTGPlayers = 0 + self.RecordIndex = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.NeedCTGPlayers) + data = CommFunc.WriteBYTE(data, self.RecordIndex) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedCTGPlayers:%d, + RecordIndex:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedCTGPlayers, + self.RecordIndex, + self.Count, + "..." + ) + return DumpString + + +class tagMCActFamilyCTGAssistInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + AwardCount = 0 #(BYTE AwardCount) + AwardInfoList = list() #(vector<tagMCActFamilyCTGAssistAward> AwardInfoList)// 互助奖励列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x77 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardInfoList = tagMCActFamilyCTGAssistAward() + _pos = temAwardInfoList.ReadData(_lpData, _pos) + self.AwardInfoList.append(temAwardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x77 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.AwardCount = 0 + self.AwardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + for i in range(self.AwardCount): + length += self.AwardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardInfoList[i].GetLength(), self.AwardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + AwardCount:%d, + AwardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActFamilyCTGAssistInfo=tagMCActFamilyCTGAssistInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActFamilyCTGAssistInfo.Head.Cmd,m_NAtagMCActFamilyCTGAssistInfo.Head.SubCmd))] = m_NAtagMCActFamilyCTGAssistInfo + + +#------------------------------------------------------ +# AA 78 仙盟充值互助活动玩家信息 #tagMCActFamilyCTGAssistPlayerInfo + +class tagMCActFamilyCTGAssistPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("AwardRecord", c_int), # 奖励记录,按奖励记录索引位运算判断是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x78 + 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 = 0xAA + self.SubCmd = 0x78 + self.ActNum = 0 + self.AwardRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCActFamilyCTGAssistPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 78 仙盟充值互助活动玩家信息 //tagMCActFamilyCTGAssistPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + AwardRecord:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.AwardRecord + ) + return DumpString + + +m_NAtagMCActFamilyCTGAssistPlayerInfo=tagMCActFamilyCTGAssistPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActFamilyCTGAssistPlayerInfo.Cmd,m_NAtagMCActFamilyCTGAssistPlayerInfo.SubCmd))] = m_NAtagMCActFamilyCTGAssistPlayerInfo + + +#------------------------------------------------------ # AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo class tagMCActGarbageSortingInfo(Structure): -- Gitblit v1.8.0