From f87b69ad9c32c75d74d40689e0d0427f0a1a6e46 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 09 四月 2019 11:41:44 +0800 Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(奇遇) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 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 06afc43..8b7eeae 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -13748,6 +13748,118 @@ #------------------------------------------------------ +# A3 07 缥缈奇遇信息 #tagMCFairyAdventuresInfo + +class tagMCFairyAdventuresData(Structure): + _pack_ = 1 + _fields_ = [ + ("EventID", c_ubyte), + ("Gear", c_ubyte), #第几档 + ("Condition", c_int), #条件 + ] + + 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.EventID = 0 + self.Gear = 0 + self.Condition = 0 + return + + def GetLength(self): + return sizeof(tagMCFairyAdventuresData) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 07 缥缈奇遇信息 //tagMCFairyAdventuresInfo: + EventID:%d, + Gear:%d, + Condition:%d + '''\ + %( + self.EventID, + self.Gear, + self.Condition + ) + return DumpString + + +class tagMCFairyAdventuresInfo(Structure): + Head = tagHead() + Cnt = 0 #(BYTE Cnt) + InfoList = list() #(vector<tagMCFairyAdventuresData> InfoList)// 信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x07 + 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): + temInfoList = tagMCFairyAdventuresData() + _pos = temInfoList.ReadData(_lpData, _pos) + self.InfoList.append(temInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x07 + self.Cnt = 0 + self.InfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Cnt): + length += self.InfoList[i].GetLength() + + 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.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Cnt:%d, + InfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Cnt, + "..." + ) + return DumpString + + +m_NAtagMCFairyAdventuresInfo=tagMCFairyAdventuresInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFairyAdventuresInfo.Head.Cmd,m_NAtagMCFairyAdventuresInfo.Head.SubCmd))] = m_NAtagMCFairyAdventuresInfo + + +#------------------------------------------------------ # A3 06 缥缈仙域信息 #tagMCFairyDomainInfo class tagMCFairyDomainEvent(Structure): -- Gitblit v1.8.0