From fd85134c0d4ac18f7286d1d92eb84fa64c8defc5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 30 五月 2025 10:23:20 +0800 Subject: [PATCH] 16 卡牌服务端(首登修改) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 659 +++++++++-------------------------------------------------- 1 files changed, 108 insertions(+), 551 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index 6cefeb0..5d07bd5 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -2175,54 +2175,6 @@ #------------------------------------------------------ -# AE 07 运镖时间倒计时结束 #tagCGTruckTimeEnd - -class tagCGTruckTimeEnd(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - self.SubCmd = 0x07 - 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 = 0xAE - self.SubCmd = 0x07 - return - - def GetLength(self): - return sizeof(tagCGTruckTimeEnd) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 07 运镖时间倒计时结束 //tagCGTruckTimeEnd: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagCGTruckTimeEnd=tagCGTruckTimeEnd() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGTruckTimeEnd.Cmd,m_NAtagCGTruckTimeEnd.SubCmd))] = m_NAtagCGTruckTimeEnd - - -#------------------------------------------------------ # B0 13 取消协助Boss #tagCGCancelAssistBoss class tagCGCancelAssistBoss(Structure): @@ -5632,126 +5584,6 @@ #------------------------------------------------------ -# A1 01 玩家电脑信息 #tagCMPCInfo - -class tagCMPCInfo(Structure): - Head = tagHead() - PCOSLen = 0 #(BYTE PCOSLen) - PCOS = "" #(String PCOS)// 操作系统 - ResolutionLen = 0 #(BYTE ResolutionLen) - Resolution = "" #(String Resolution)// 分辨率 - BrowserLen = 0 #(BYTE BrowserLen) - Browser = "" #(String Browser)// 浏览器 - ScribeTypeLen = 0 #(BYTE ScribeTypeLen) - ScribeType = "" #(String ScribeType)// 记录类型 - ScribeDataLen = 0 #(BYTE ScribeDataLen) - ScribeData = "" #(String ScribeData)// 记录扩展信息 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA1 - self.Head.SubCmd = 0x01 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.PCOSLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.PCOS,_pos = CommFunc.ReadString(_lpData, _pos,self.PCOSLen) - self.ResolutionLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Resolution,_pos = CommFunc.ReadString(_lpData, _pos,self.ResolutionLen) - self.BrowserLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Browser,_pos = CommFunc.ReadString(_lpData, _pos,self.BrowserLen) - self.ScribeTypeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.ScribeType,_pos = CommFunc.ReadString(_lpData, _pos,self.ScribeTypeLen) - self.ScribeDataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.ScribeData,_pos = CommFunc.ReadString(_lpData, _pos,self.ScribeDataLen) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA1 - self.Head.SubCmd = 0x01 - self.PCOSLen = 0 - self.PCOS = "" - self.ResolutionLen = 0 - self.Resolution = "" - self.BrowserLen = 0 - self.Browser = "" - self.ScribeTypeLen = 0 - self.ScribeType = "" - self.ScribeDataLen = 0 - self.ScribeData = "" - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - length += len(self.PCOS) - length += 1 - length += len(self.Resolution) - length += 1 - length += len(self.Browser) - length += 1 - length += len(self.ScribeType) - length += 1 - length += len(self.ScribeData) - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.PCOSLen) - data = CommFunc.WriteString(data, self.PCOSLen, self.PCOS) - data = CommFunc.WriteBYTE(data, self.ResolutionLen) - data = CommFunc.WriteString(data, self.ResolutionLen, self.Resolution) - data = CommFunc.WriteBYTE(data, self.BrowserLen) - data = CommFunc.WriteString(data, self.BrowserLen, self.Browser) - data = CommFunc.WriteBYTE(data, self.ScribeTypeLen) - data = CommFunc.WriteString(data, self.ScribeTypeLen, self.ScribeType) - data = CommFunc.WriteBYTE(data, self.ScribeDataLen) - data = CommFunc.WriteString(data, self.ScribeDataLen, self.ScribeData) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - PCOSLen:%d, - PCOS:%s, - ResolutionLen:%d, - Resolution:%s, - BrowserLen:%d, - Browser:%s, - ScribeTypeLen:%d, - ScribeType:%s, - ScribeDataLen:%d, - ScribeData:%s - '''\ - %( - self.Head.OutputString(), - self.PCOSLen, - self.PCOS, - self.ResolutionLen, - self.Resolution, - self.BrowserLen, - self.Browser, - self.ScribeTypeLen, - self.ScribeType, - self.ScribeDataLen, - self.ScribeData - ) - return DumpString - - -m_NAtagCMPCInfo=tagCMPCInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPCInfo.Head.Cmd,m_NAtagCMPCInfo.Head.SubCmd))] = m_NAtagCMPCInfo - - -#------------------------------------------------------ # A1 23 查询充值次数 #tagCMQueryCoinToGoldCount class tagCMQueryCoinToGoldCount(Structure): @@ -6203,77 +6035,6 @@ m_NAtagCMViewBillboard=tagCMViewBillboard() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMViewBillboard.Cmd,m_NAtagCMViewBillboard.SubCmd))] = m_NAtagCMViewBillboard - - -#------------------------------------------------------ -# A2 19 游戏建议收集 #tagCMAdviceSubmit - -class tagCMAdviceSubmit(Structure): - Head = tagHead() - Type = 0 #(BYTE Type)//提交类型 - Len = 0 #(WORD Len) - Content = "" #(String Content)//size = Len - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA2 - self.Head.SubCmd = 0x19 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.Content,_pos = CommFunc.ReadString(_lpData, _pos,self.Len) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA2 - self.Head.SubCmd = 0x19 - self.Type = 0 - self.Len = 0 - self.Content = "" - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - length += 2 - length += len(self.Content) - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.Type) - data = CommFunc.WriteWORD(data, self.Len) - data = CommFunc.WriteString(data, self.Len, self.Content) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - Type:%d, - Len:%d, - Content:%s - '''\ - %( - self.Head.OutputString(), - self.Type, - self.Len, - self.Content - ) - return DumpString - - -m_NAtagCMAdviceSubmit=tagCMAdviceSubmit() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAdviceSubmit.Head.Cmd,m_NAtagCMAdviceSubmit.Head.SubCmd))] = m_NAtagCMAdviceSubmit #------------------------------------------------------ @@ -18393,318 +18154,6 @@ #------------------------------------------------------ -# AE 05 自动运镖 #tagPyAutoTruck - -class tagPyAutoTruck(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("Type", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - self.SubCmd = 0x05 - 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 = 0xAE - self.SubCmd = 0x05 - self.Type = 0 - return - - def GetLength(self): - return sizeof(tagPyAutoTruck) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 05 自动运镖 //tagPyAutoTruck: - Cmd:%s, - SubCmd:%s, - Type:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.Type - ) - return DumpString - - -m_NAtagPyAutoTruck=tagPyAutoTruck() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyAutoTruck.Cmd,m_NAtagPyAutoTruck.SubCmd))] = m_NAtagPyAutoTruck - - -#------------------------------------------------------ -# AE 02 购买镖车等级#tagPyBuyTruckLV - -class tagPyBuyTruckLV(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("TruckLV", c_ubyte), #镖车等级 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - 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 = 0xAE - self.SubCmd = 0x02 - self.TruckLV = 0 - return - - def GetLength(self): - return sizeof(tagPyBuyTruckLV) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 02 购买镖车等级//tagPyBuyTruckLV: - Cmd:%s, - SubCmd:%s, - TruckLV:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.TruckLV - ) - return DumpString - - -m_NAtagPyBuyTruckLV=tagPyBuyTruckLV() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyBuyTruckLV.Cmd,m_NAtagPyBuyTruckLV.SubCmd))] = m_NAtagPyBuyTruckLV - - -#------------------------------------------------------ -# AE 06 立即完成运镖 #tagPyOverTruck - -class tagPyOverTruck(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - self.SubCmd = 0x06 - 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 = 0xAE - self.SubCmd = 0x06 - return - - def GetLength(self): - return sizeof(tagPyOverTruck) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 06 立即完成运镖 //tagPyOverTruck: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagPyOverTruck=tagPyOverTruck() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyOverTruck.Cmd,m_NAtagPyOverTruck.SubCmd))] = m_NAtagPyOverTruck - - -#------------------------------------------------------ -# AE 04 查询劫镖次数#tagPyQueryDestroyTruckCnt - -class tagPyQueryDestroyTruckCnt(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - self.SubCmd = 0x04 - 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 = 0xAE - self.SubCmd = 0x04 - return - - def GetLength(self): - return sizeof(tagPyQueryDestroyTruckCnt) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 04 查询劫镖次数//tagPyQueryDestroyTruckCnt: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagPyQueryDestroyTruckCnt=tagPyQueryDestroyTruckCnt() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyQueryDestroyTruckCnt.Cmd,m_NAtagPyQueryDestroyTruckCnt.SubCmd))] = m_NAtagPyQueryDestroyTruckCnt - - -#------------------------------------------------------ -# AE 03 查询镖车等级#tagPyQueryTruckLV - -class tagPyQueryTruckLV(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - self.SubCmd = 0x03 - 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 = 0xAE - self.SubCmd = 0x03 - return - - def GetLength(self): - return sizeof(tagPyQueryTruckLV) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 03 查询镖车等级//tagPyQueryTruckLV: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagPyQueryTruckLV=tagPyQueryTruckLV() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyQueryTruckLV.Cmd,m_NAtagPyQueryTruckLV.SubCmd))] = m_NAtagPyQueryTruckLV - - -#------------------------------------------------------ -# AE 01 刷新镖车等级#tagPyRefurbishTruckLV - -class tagPyRefurbishTruckLV(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("CostType", c_ubyte), #消耗类型: 0-道具; 1-货币 - ("MoneyType", c_ubyte), #花费金钱类型 - ("ItemID", c_int), #使用的道具ID - ("IsAutoBuy", c_ubyte), #道具刷新时是否自动购买; 0-否;1-是 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAE - 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 = 0xAE - self.SubCmd = 0x01 - self.CostType = 0 - self.MoneyType = 0 - self.ItemID = 0 - self.IsAutoBuy = 0 - return - - def GetLength(self): - return sizeof(tagPyRefurbishTruckLV) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AE 01 刷新镖车等级//tagPyRefurbishTruckLV: - Cmd:%s, - SubCmd:%s, - CostType:%d, - MoneyType:%d, - ItemID:%d, - IsAutoBuy:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.CostType, - self.MoneyType, - self.ItemID, - self.IsAutoBuy - ) - return DumpString - - -m_NAtagPyRefurbishTruckLV=tagPyRefurbishTruckLV() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyRefurbishTruckLV.Cmd,m_NAtagPyRefurbishTruckLV.SubCmd))] = m_NAtagPyRefurbishTruckLV - - -#------------------------------------------------------ # AF 01 领取合服当天登陆奖励 # tagCMGetMixLoginDayAward class tagCMGetMixLoginDayAward(Structure): @@ -20967,6 +20416,114 @@ #------------------------------------------------------ +# B2 23 仙树升级 #tagCMTreeLVUP + +class tagCMTreeLVUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Type", c_ubyte), # 0-开始升级(请求扣除消耗,开始升级倒计时);1-执行升级(前端自行倒计时,时间到后发送该类型) + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x23 + 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 = 0xB2 + self.SubCmd = 0x23 + self.Type = 0 + return + + def GetLength(self): + return sizeof(tagCMTreeLVUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 23 仙树升级 //tagCMTreeLVUP: + Cmd:%s, + SubCmd:%s, + Type:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Type + ) + return DumpString + + +m_NAtagCMTreeLVUP=tagCMTreeLVUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTreeLVUP.Cmd,m_NAtagCMTreeLVUP.SubCmd))] = m_NAtagCMTreeLVUP + + +#------------------------------------------------------ +# B2 24 使用仙树升级减时物品 #tagCMUseTreeLVUPTimeItem + +class tagCMUseTreeLVUPTimeItem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("UseCount", c_int), # 使用个数 + ("IsAutoBuy", c_ubyte), # 不足个数是否自动购买 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x24 + 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 = 0xB2 + self.SubCmd = 0x24 + self.UseCount = 0 + self.IsAutoBuy = 0 + return + + def GetLength(self): + return sizeof(tagCMUseTreeLVUPTimeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 24 使用仙树升级减时物品 //tagCMUseTreeLVUPTimeItem: + Cmd:%s, + SubCmd:%s, + UseCount:%d, + IsAutoBuy:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.UseCount, + self.IsAutoBuy + ) + return DumpString + + +m_NAtagCMUseTreeLVUPTimeItem=tagCMUseTreeLVUPTimeItem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseTreeLVUPTimeItem.Cmd,m_NAtagCMUseTreeLVUPTimeItem.SubCmd))] = m_NAtagCMUseTreeLVUPTimeItem + + +#------------------------------------------------------ # B3 17 情戒解锁 #tagCMLoveRingUnlock class tagCMLoveRingUnlock(Structure): -- Gitblit v1.8.0