| | |
| | | class tagGCCrossBattlefieldBuyPlayer(Structure):
|
| | | BuyPlayerID = 0 #(DWORD BuyPlayerID)//购买的玩家ID,即召集人
|
| | | Faction = 0 #(BYTE Faction)//阵营 1-红;2-蓝
|
| | | ServerOnly = 0 #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是
|
| | | FactionPlayerCount = 0 #(BYTE FactionPlayerCount)
|
| | | FactionPlayerList = list() #(vector<tagGCCrossBattlefieldPlayer> FactionPlayerList)//阵营所有玩家列表,包含召集人
|
| | | data = None
|
| | |
| | | self.Clear()
|
| | | self.BuyPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerOnly,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FactionPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | temFactionPlayerList = tagGCCrossBattlefieldPlayer()
|
| | |
| | | def Clear(self):
|
| | | self.BuyPlayerID = 0
|
| | | self.Faction = 0
|
| | | self.ServerOnly = 0
|
| | | self.FactionPlayerCount = 0
|
| | | self.FactionPlayerList = list()
|
| | | return
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.FactionPlayerCount):
|
| | |
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.BuyPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteBYTE(data, self.ServerOnly)
|
| | | data = CommFunc.WriteBYTE(data, self.FactionPlayerCount)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | data = CommFunc.WriteString(data, self.FactionPlayerList[i].GetLength(), self.FactionPlayerList[i].GetBuffer())
|
| | |
| | | DumpString = '''
|
| | | BuyPlayerID:%d,
|
| | | Faction:%d,
|
| | | ServerOnly:%d,
|
| | | FactionPlayerCount:%d,
|
| | | FactionPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.BuyPlayerID,
|
| | | self.Faction,
|
| | | self.ServerOnly,
|
| | | self.FactionPlayerCount,
|
| | | "..."
|
| | | )
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 55 炼体信息 #tagMCLianTiInfo
|
| | |
|
| | | class tagMCLianTiInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("LianTiLV", c_ubyte), #炼体等级
|
| | | ("EatItemCount", c_int), #当前等级已吃丹个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x55
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x55
|
| | | self.LianTiLV = 0
|
| | | self.EatItemCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCLianTiInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 55 炼体信息 //tagMCLianTiInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | LianTiLV:%d,
|
| | | EatItemCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.LianTiLV,
|
| | | self.EatItemCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCLianTiInfo=tagMCLianTiInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLianTiInfo.Cmd,m_NAtagMCLianTiInfo.SubCmd))] = m_NAtagMCLianTiInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo
|
| | |
|
| | | class tagMCMagicWeaponInfo(Structure):
|