| | |
| | |
|
| | | return DumpString
|
| | | #------------------------------------------------------
|
| | | # 05 03 玩家离开队伍 #tagGMPlayerLeaveTeam
|
| | |
|
| | | class tagGMPlayerLeaveTeam(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PlayerID", c_int), |
| | | ("CopyMapID", c_int), |
| | | ("TeamID", c_int), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0x05
|
| | | 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 = 0x05
|
| | | self.SubCmd = 0x03
|
| | | self.PlayerID = 0
|
| | | self.CopyMapID = 0
|
| | | self.TeamID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGMPlayerLeaveTeam)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// 05 03 玩家离开队伍 //tagGMPlayerLeaveTeam:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | PlayerID:%d,
|
| | | CopyMapID:%d,
|
| | | TeamID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.PlayerID,
|
| | | self.CopyMapID,
|
| | | self.TeamID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGMPlayerLeaveTeam=tagGMPlayerLeaveTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMPlayerLeaveTeam.Cmd,m_NAtagGMPlayerLeaveTeam.SubCmd))] = m_NAtagGMPlayerLeaveTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 05 02 队伍信息刷新 #tagGMTeamInfo
|
| | |
|
| | | class tagGMTeamMemInfo(Structure):
|
| | |
| | | Gold = 0 #(DWORD Gold)//仙玉
|
| | | GoldPaper = 0 #(DWORD GoldPaper)//绑定仙玉
|
| | | Silver = 0 #(DWORD Silver)//ͭǮ
|
| | | MoneySource = 0 #(BYTE MoneySource)//货币来源
|
| | | Items = list() #(vector<tagGMCompensationItem> Items)//补偿物品信息
|
| | | data = None
|
| | |
|
| | |
| | | self.Gold,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.GoldPaper,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Silver,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MoneySource,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temItems = tagGMCompensationItem()
|
| | | _pos = temItems.ReadData(_lpData, _pos)
|
| | |
| | | self.Gold = 0
|
| | | self.GoldPaper = 0
|
| | | self.Silver = 0
|
| | | self.MoneySource = 0
|
| | | self.Items = list()
|
| | | return
|
| | |
|
| | |
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.Items[i].GetLength()
|
| | |
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.Gold)
|
| | | data = CommFunc.WriteDWORD(data, self.GoldPaper)
|
| | | data = CommFunc.WriteDWORD(data, self.Silver)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneySource)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.Items[i].GetLength(), self.Items[i].GetBuffer())
|
| | | return data
|
| | |
| | | Gold:%d,
|
| | | GoldPaper:%d,
|
| | | Silver:%d,
|
| | | MoneySource:%d,
|
| | | Items:%s
|
| | | '''\
|
| | | %(
|
| | |
| | | self.Gold,
|
| | | self.GoldPaper,
|
| | | self.Silver,
|
| | | self.MoneySource,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|