| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #×÷Õß :   | 
|   | 
| import CommFunc  | 
| import binascii  | 
| import copy  | 
| from struct import *  | 
| from ctypes import *  | 
| #²å¼þÍ·  | 
| #   | 
| #  | 
| ChNetPackDict={}  | 
| class  BString:  | 
|     NameLen = 0        # (BYTE NameLen )  | 
|     Name = ""        # (String Name )     //size = NameLen  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|   | 
|         return  | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|   | 
|         self.NameLen, _pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.Name, _pos = CommFunc.ReadString(_lpData, _pos, self.NameLen)  | 
|   | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.NameLen = 0  | 
|         self.Name = ""  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += 1  | 
|         length += self.Name.Length();  | 
|         return  length;  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteBYTE(data, self.NameLen)  | 
|         data = CommFunc.WriteString(data, self.NameLen, self.Name)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = ''':  | 
|                             NameLen:%d,  | 
|                             Name:%s  | 
|                             '''\  | 
|                             %(  | 
|                             self.NameLen,  | 
|                             self.Name  | 
|                             )  | 
|   | 
|         return  DumpString  | 
|   | 
| class  tagHead:  | 
|     Cmd = 0     # (BYTE Cmd )  | 
|     SubCmd = 0      # (BYTE SubCmd )  | 
|     def __init__(self):  | 
|         self.Clear()  | 
|   | 
|         return  | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|   | 
|         self.Cmd, _pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.SubCmd, _pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|   | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Cmd = 0  | 
|         self.SubCmd = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += 1  | 
|         length += 1  | 
|         return  length;  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteBYTE(data, self.Cmd)  | 
|         data = CommFunc.WriteBYTE(data, self.SubCmd)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = ''':  | 
|                             Cmd:%d,  | 
|                             SubCmd:%d  | 
|                             '''\  | 
|                             %(  | 
|                             self.Cmd,  | 
|                             self.SubCmd  | 
|                             )  | 
|   | 
|         return  DumpString  | 
| #------------------------------------------------------  | 
| #02 02 Íæ¼Ò½»Ò×ËùÌí¼Ó³öÊÛµÄÎïÆ·#tagMGAddPlayerSellBourseItem  | 
|   | 
| class  tagMGAddPlayerSellBourseItem(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)  | 
|     PlayerName = ""    #(char PlayerName[33])//³öÊÛÍæ¼Ò½ÇÉ«Ãû£¬size = 33  | 
|     OperateInfo = 0    #(DWORD OperateInfo)//³öÊÛÍæ¼ÒÔËÓªÉ̸½¼ÓÐÅÏ¢  | 
|     ItemGUID = ""    #(char ItemGUID[40])  | 
|     Count = 0    #(WORD Count)//³öÊÛÊýÁ¿  | 
|     PriceType = 0    #(BYTE PriceType)//³öÊÛ¼Û¸ñÀàÐÍ  | 
|     PriceCount = 0    #(DWORD PriceCount)//³öÊÛ¼Û¸ñ  | 
|     ItemTypeID = 0    #(DWORD ItemTypeID)//ÎïÆ·ID  | 
|     UserDataLen = 0    #(DWORD UserDataLen)  | 
|     UserData = ""    #(String UserData)//×Ô¶¨ÒåÊý¾Ý  | 
|     Type = 0    #(DWORD Type)//ÎïÆ·ÀàÐÍ--sys  | 
|     EquipPlace = 0    #(BYTE EquipPlace)//×°±¸Î»ÖÃ--sys  | 
|     LV = 0    #(WORD LV)//ÎïÆ·µÈ¼¶--sys  | 
|     UseLV = 0    #(WORD UseLV)//ʹÓõȼ¶--sys  | 
|     JobLimit = 0    #(DWORD JobLimit)//Ö°ÒµÏÞÖÆ,λ²Ù×÷--sys  | 
|     SuiteID = 0    #(DWORD SuiteID)//Ì××°ID--sys  | 
|     ItemQuality = 0    #(BYTE ItemQuality)//×°±¸Æ·ÖÊ--sys  | 
|     ItemColor = 0    #(BYTE ItemColor)//×°±¸ÑÕɫƷÖÊ--sys  | 
|     Pwd = ""    #(char Pwd[8])//½»Ò×ÃÜÂë  | 
|     EquipGS = 0    #(DWORD EquipGS)//×°±¸ÆÀ·Ö  | 
|     ItemName = ""    #(char ItemName[33])//ÎïÆ·Ãû(Ä£ºý²éѯ)  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x02  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)  | 
|         self.OperateInfo,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)  | 
|         self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.PriceCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemTypeID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.UserDataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen)  | 
|         self.Type,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.EquipPlace,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)  | 
|         self.UseLV,_pos = CommFunc.ReadWORD(_lpData, _pos)  | 
|         self.JobLimit,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.SuiteID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemQuality,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.ItemColor,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8)  | 
|         self.EquipGS,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemName,_pos = CommFunc.ReadString(_lpData, _pos,33)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x02  | 
|         self.PlayerID = 0  | 
|         self.PlayerName = ""  | 
|         self.OperateInfo = 0  | 
|         self.ItemGUID = ""  | 
|         self.Count = 0  | 
|         self.PriceType = 0  | 
|         self.PriceCount = 0  | 
|         self.ItemTypeID = 0  | 
|         self.UserDataLen = 0  | 
|         self.UserData = ""  | 
|         self.Type = 0  | 
|         self.EquipPlace = 0  | 
|         self.LV = 0  | 
|         self.UseLV = 0  | 
|         self.JobLimit = 0  | 
|         self.SuiteID = 0  | 
|         self.ItemQuality = 0  | 
|         self.ItemColor = 0  | 
|         self.Pwd = ""  | 
|         self.EquipGS = 0  | 
|         self.ItemName = ""  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 33  | 
|         length += 4  | 
|         length += 40  | 
|         length += 2  | 
|         length += 1  | 
|         length += 4  | 
|         length += 4  | 
|         length += 4  | 
|         length += len(self.UserData)  | 
|         length += 4  | 
|         length += 1  | 
|         length += 2  | 
|         length += 2  | 
|         length += 4  | 
|         length += 4  | 
|         length += 1  | 
|         length += 1  | 
|         length += 8  | 
|         length += 4  | 
|         length += 33  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 33, self.PlayerName)  | 
|         data = CommFunc.WriteDWORD(data, self.OperateInfo)  | 
|         data = CommFunc.WriteString(data, 40, self.ItemGUID)  | 
|         data = CommFunc.WriteWORD(data, self.Count)  | 
|         data = CommFunc.WriteBYTE(data, self.PriceType)  | 
|         data = CommFunc.WriteDWORD(data, self.PriceCount)  | 
|         data = CommFunc.WriteDWORD(data, self.ItemTypeID)  | 
|         data = CommFunc.WriteDWORD(data, self.UserDataLen)  | 
|         data = CommFunc.WriteString(data, self.UserDataLen, self.UserData)  | 
|         data = CommFunc.WriteDWORD(data, self.Type)  | 
|         data = CommFunc.WriteBYTE(data, self.EquipPlace)  | 
|         data = CommFunc.WriteWORD(data, self.LV)  | 
|         data = CommFunc.WriteWORD(data, self.UseLV)  | 
|         data = CommFunc.WriteDWORD(data, self.JobLimit)  | 
|         data = CommFunc.WriteDWORD(data, self.SuiteID)  | 
|         data = CommFunc.WriteBYTE(data, self.ItemQuality)  | 
|         data = CommFunc.WriteBYTE(data, self.ItemColor)  | 
|         data = CommFunc.WriteString(data, 8, self.Pwd)  | 
|         data = CommFunc.WriteDWORD(data, self.EquipGS)  | 
|         data = CommFunc.WriteString(data, 33, self.ItemName)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 PlayerName:%s,  | 
|                                 OperateInfo:%d,  | 
|                                 ItemGUID:%s,  | 
|                                 Count:%d,  | 
|                                 PriceType:%d,  | 
|                                 PriceCount:%d,  | 
|                                 ItemTypeID:%d,  | 
|                                 UserDataLen:%d,  | 
|                                 UserData:%s,  | 
|                                 Type:%d,  | 
|                                 EquipPlace:%d,  | 
|                                 LV:%d,  | 
|                                 UseLV:%d,  | 
|                                 JobLimit:%d,  | 
|                                 SuiteID:%d,  | 
|                                 ItemQuality:%d,  | 
|                                 ItemColor:%d,  | 
|                                 Pwd:%s,  | 
|                                 EquipGS:%d,  | 
|                                 ItemName:%s  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.PlayerName,  | 
|                                 self.OperateInfo,  | 
|                                 self.ItemGUID,  | 
|                                 self.Count,  | 
|                                 self.PriceType,  | 
|                                 self.PriceCount,  | 
|                                 self.ItemTypeID,  | 
|                                 self.UserDataLen,  | 
|                                 self.UserData,  | 
|                                 self.Type,  | 
|                                 self.EquipPlace,  | 
|                                 self.LV,  | 
|                                 self.UseLV,  | 
|                                 self.JobLimit,  | 
|                                 self.SuiteID,  | 
|                                 self.ItemQuality,  | 
|                                 self.ItemColor,  | 
|                                 self.Pwd,  | 
|                                 self.EquipGS,  | 
|                                 self.ItemName  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGAddPlayerSellBourseItem=tagMGAddPlayerSellBourseItem()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGAddPlayerSellBourseItem.Head.Cmd,m_NAtagMGAddPlayerSellBourseItem.Head.SubCmd))] = m_NAtagMGAddPlayerSellBourseItem  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #02 04 Íæ¼ÒÈ·ÈϹºÂò½»Ò×ËùÎïÆ·#tagMGBuyBourseItemSure  | 
|   | 
| class  tagMGBuyBourseItemSure(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)  | 
|     PlayerName = ""    #(char PlayerName[33])//¹ºÂòÍæ¼Ò½ÇÉ«Ãû£¬size = 33  | 
|     ItemGUID = ""    #(char ItemGUID[40])  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x04  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)  | 
|         self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x04  | 
|         self.PlayerID = 0  | 
|         self.PlayerName = ""  | 
|         self.ItemGUID = ""  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 33  | 
|         length += 40  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 33, self.PlayerName)  | 
|         data = CommFunc.WriteString(data, 40, self.ItemGUID)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 PlayerName:%s,  | 
|                                 ItemGUID:%s  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.PlayerName,  | 
|                                 self.ItemGUID  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGBuyBourseItemSure=tagMGBuyBourseItemSure()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGBuyBourseItemSure.Head.Cmd,m_NAtagMGBuyBourseItemSure.Head.SubCmd))] = m_NAtagMGBuyBourseItemSure  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #02 01 Ñ¯ÎÊÊÇ·ñ¿ÉÒÔÌí¼ÓÍæ¼Ò½»Ò×ËùÎïÆ·#tagMGCheckAddPlayerBourseItem  | 
|   | 
| class  tagMGCheckAddPlayerBourseItem(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)  | 
|     ItemIndex = 0    #(BYTE ItemIndex)//ÎïÆ·ÔÚ±³°üÖÐË÷Òý  | 
|     Count = 0    #(WORD Count)//³öÊÛÊýÁ¿  | 
|     PriceType = 0    #(BYTE PriceType)//³öÊÛ¼Û¸ñÀàÐÍ  | 
|     PriceCount = 0    #(DWORD PriceCount)//³öÊÛ¼Û¸ñ  | 
|     Pwd = ""    #(char Pwd[8])//½»Ò×ÃÜÂë  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x01  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)  | 
|         self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.PriceCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x01  | 
|         self.PlayerID = 0  | 
|         self.ItemIndex = 0  | 
|         self.Count = 0  | 
|         self.PriceType = 0  | 
|         self.PriceCount = 0  | 
|         self.Pwd = ""  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 1  | 
|         length += 2  | 
|         length += 1  | 
|         length += 4  | 
|         length += 8  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteBYTE(data, self.ItemIndex)  | 
|         data = CommFunc.WriteWORD(data, self.Count)  | 
|         data = CommFunc.WriteBYTE(data, self.PriceType)  | 
|         data = CommFunc.WriteDWORD(data, self.PriceCount)  | 
|         data = CommFunc.WriteString(data, 8, self.Pwd)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 ItemIndex:%d,  | 
|                                 Count:%d,  | 
|                                 PriceType:%d,  | 
|                                 PriceCount:%d,  | 
|                                 Pwd:%s  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.ItemIndex,  | 
|                                 self.Count,  | 
|                                 self.PriceType,  | 
|                                 self.PriceCount,  | 
|                                 self.Pwd  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGCheckAddPlayerBourseItem=tagMGCheckAddPlayerBourseItem()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGCheckAddPlayerBourseItem.Head.Cmd,m_NAtagMGCheckAddPlayerBourseItem.Head.SubCmd))] = m_NAtagMGCheckAddPlayerBourseItem  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #02 03 Íæ¼ÒѯÎʹºÂò½»Ò×ËùÎïÆ·#tagMGCheckBuyBourseItem  | 
|   | 
| class  tagMGCheckBuyBourseItem(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)  | 
|     ItemGUID = ""    #(char ItemGUID[40])  | 
|     Pwd = ""    #(char Pwd[8])//½»Ò×ÃÜÂë  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x03  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x03  | 
|         self.PlayerID = 0  | 
|         self.ItemGUID = ""  | 
|         self.Pwd = ""  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 40  | 
|         length += 8  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 40, self.ItemGUID)  | 
|         data = CommFunc.WriteString(data, 8, self.Pwd)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 ItemGUID:%s,  | 
|                                 Pwd:%s  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.ItemGUID,  | 
|                                 self.Pwd  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGCheckBuyBourseItem=tagMGCheckBuyBourseItem()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGCheckBuyBourseItem.Head.Cmd,m_NAtagMGCheckBuyBourseItem.Head.SubCmd))] = m_NAtagMGCheckBuyBourseItem  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #02 05 ½»Ò×ËùÍæ¼ÒÈ¡ÏÂÕýÔÚ³öÊÛµÄÎïÆ·»ò³öÊÛÊÕÒæ#tagMGPlayerRecaptureBourseItem  | 
|   | 
| class  tagMGPlayerRecaptureBourseItem(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)  | 
|     ItemGUID = ""    #(char ItemGUID[40])  | 
|     PackSpaceCount = 0    #(BYTE PackSpaceCount)//µ±Ç°±³°üÊ£Óà¿Õ¼ä  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x05  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         self.PackSpaceCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x02  | 
|         self.Head.SubCmd = 0x05  | 
|         self.PlayerID = 0  | 
|         self.ItemGUID = ""  | 
|         self.PackSpaceCount = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 40  | 
|         length += 1  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 40, self.ItemGUID)  | 
|         data = CommFunc.WriteBYTE(data, self.PackSpaceCount)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 ItemGUID:%s,  | 
|                                 PackSpaceCount:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.ItemGUID,  | 
|                                 self.PackSpaceCount  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGPlayerRecaptureBourseItem=tagMGPlayerRecaptureBourseItem()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGPlayerRecaptureBourseItem.Head.Cmd,m_NAtagMGPlayerRecaptureBourseItem.Head.SubCmd))] = m_NAtagMGPlayerRecaptureBourseItem  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #04 02 µØÍ¼²éÑ¯Íæ¼Ò»º´æÊý¾Ý#tagMGQueryPlayerCache  | 
|   | 
| class  tagMGQueryPlayerCache(Structure):  | 
|     _pack_ = 1  | 
|     _fields_ = [  | 
|                   ("Cmd", c_ubyte),  | 
|                   ("SubCmd", c_ubyte),  | 
|                   ("PlayerID", c_int),    #Íæ¼ÒID  | 
|                   ("FindPlayerID", c_int),    #Òª²éѯµÄÍæ¼ÒID  | 
|                   ]  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Cmd = 0x04  | 
|         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 = 0x04  | 
|         self.SubCmd = 0x02  | 
|         self.PlayerID = 0  | 
|         self.FindPlayerID = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         return sizeof(tagMGQueryPlayerCache)  | 
|   | 
|     def GetBuffer(self):  | 
|         return string_at(addressof(self), self.GetLength())  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''//04 02 µØÍ¼²éÑ¯Íæ¼Ò»º´æÊý¾Ý//tagMGQueryPlayerCache:  | 
|                                 Cmd:%s,  | 
|                                 SubCmd:%s,  | 
|                                 PlayerID:%d,  | 
|                                 FindPlayerID:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Cmd,  | 
|                                 self.SubCmd,  | 
|                                 self.PlayerID,  | 
|                                 self.FindPlayerID  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGQueryPlayerCache=tagMGQueryPlayerCache()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGQueryPlayerCache.Cmd,m_NAtagMGQueryPlayerCache.SubCmd))] = m_NAtagMGQueryPlayerCache  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #04 01 µØÍ¼Í¬²½Íæ¼Ò»º´æÊý¾Ýµ½GameServer#tagMGUpdatePlayerCache  | 
|   | 
| class  tagMGUpdatePlayerCache(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)//Íæ¼ÒID  | 
|     PlayerLV = 0    #(WORD PlayerLV)//Íæ¼ÒµÈ¼¶  | 
|     PropDataSize = 0    #(DWORD PropDataSize)  | 
|     PropData = ""    #(String PropData)//ÊôÐԼǼ  | 
|     ItemDataSize = 0    #(DWORD ItemDataSize)  | 
|     ItemData = ""    #(String ItemData)//ÎïÆ·¼Ç¼  | 
|     PlusDataSize = 0    #(DWORD PlusDataSize)  | 
|     PlusData = ""    #(String PlusData)//À©Õ¹¼Ç¼  | 
|     IsLogouting = 0    #(BYTE IsLogouting)//±¾´ÎÊÇ·ñΪÏÂÏßͬ²½  | 
|     OffTime = 0    #(DWORD OffTime)// ÏÂÏßʱ¼ä´Á  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x04  | 
|         self.Head.SubCmd = 0x01  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos)  | 
|         self.PropDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PropData,_pos = CommFunc.ReadString(_lpData, _pos,self.PropDataSize)  | 
|         self.ItemDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize)  | 
|         self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)  | 
|         self.IsLogouting,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.OffTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x04  | 
|         self.Head.SubCmd = 0x01  | 
|         self.PlayerID = 0  | 
|         self.PlayerLV = 0  | 
|         self.PropDataSize = 0  | 
|         self.PropData = ""  | 
|         self.ItemDataSize = 0  | 
|         self.ItemData = ""  | 
|         self.PlusDataSize = 0  | 
|         self.PlusData = ""  | 
|         self.IsLogouting = 0  | 
|         self.OffTime = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 2  | 
|         length += 4  | 
|         length += len(self.PropData)  | 
|         length += 4  | 
|         length += len(self.ItemData)  | 
|         length += 4  | 
|         length += len(self.PlusData)  | 
|         length += 1  | 
|         length += 4  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteWORD(data, self.PlayerLV)  | 
|         data = CommFunc.WriteDWORD(data, self.PropDataSize)  | 
|         data = CommFunc.WriteString(data, self.PropDataSize, self.PropData)  | 
|         data = CommFunc.WriteDWORD(data, self.ItemDataSize)  | 
|         data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData)  | 
|         data = CommFunc.WriteDWORD(data, self.PlusDataSize)  | 
|         data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)  | 
|         data = CommFunc.WriteBYTE(data, self.IsLogouting)  | 
|         data = CommFunc.WriteDWORD(data, self.OffTime)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 PlayerLV:%d,  | 
|                                 PropDataSize:%d,  | 
|                                 PropData:%s,  | 
|                                 ItemDataSize:%d,  | 
|                                 ItemData:%s,  | 
|                                 PlusDataSize:%d,  | 
|                                 PlusData:%s,  | 
|                                 IsLogouting:%d,  | 
|                                 OffTime:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.PlayerLV,  | 
|                                 self.PropDataSize,  | 
|                                 self.PropData,  | 
|                                 self.ItemDataSize,  | 
|                                 self.ItemData,  | 
|                                 self.PlusDataSize,  | 
|                                 self.PlusData,  | 
|                                 self.IsLogouting,  | 
|                                 self.OffTime  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGUpdatePlayerCache=tagMGUpdatePlayerCache()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGUpdatePlayerCache.Head.Cmd,m_NAtagMGUpdatePlayerCache.Head.SubCmd))] = m_NAtagMGUpdatePlayerCache  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| # 03 05 Ôö¼Ó¼Ò×åÊôÐÔ#tagMGAddFamilyDetail  | 
|   | 
| class  tagMGAddFamilyDetail(Structure):  | 
|     _pack_ = 1  | 
|     _fields_ = [  | 
|                   ("Cmd", c_ubyte),  | 
|                   ("SubCmd", c_ubyte),  | 
|                   ("PlayerID", c_int),    #Íæ¼ÒID  | 
|                   ("AddFamilyHornor", c_int),    #Ôö¼Ó¼Ò×åÈÙÓþ  | 
|                   ("AddFamilyMoney", c_int),    #Ôö¼Ó¼Ò×å×ʽð  | 
|                   ("FamilyActiveValue", c_int),    #¼Ò×å»îÔ¾¶È  | 
|                   ("AddResion", c_ubyte),    #Ôö¼ÓÔÒò  | 
|                   ]  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Cmd = 0x03  | 
|         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 = 0x03  | 
|         self.SubCmd = 0x05  | 
|         self.PlayerID = 0  | 
|         self.AddFamilyHornor = 0  | 
|         self.AddFamilyMoney = 0  | 
|         self.FamilyActiveValue = 0  | 
|         self.AddResion = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         return sizeof(tagMGAddFamilyDetail)  | 
|   | 
|     def GetBuffer(self):  | 
|         return string_at(addressof(self), self.GetLength())  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''// 03 05 Ôö¼Ó¼Ò×åÊôÐÔ//tagMGAddFamilyDetail:  | 
|                                 Cmd:%s,  | 
|                                 SubCmd:%s,  | 
|                                 PlayerID:%d,  | 
|                                 AddFamilyHornor:%d,  | 
|                                 AddFamilyMoney:%d,  | 
|                                 FamilyActiveValue:%d,  | 
|                                 AddResion:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Cmd,  | 
|                                 self.SubCmd,  | 
|                                 self.PlayerID,  | 
|                                 self.AddFamilyHornor,  | 
|                                 self.AddFamilyMoney,  | 
|                                 self.FamilyActiveValue,  | 
|                                 self.AddResion  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGAddFamilyDetail=tagMGAddFamilyDetail()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGAddFamilyDetail.Cmd,m_NAtagMGAddFamilyDetail.SubCmd))] = m_NAtagMGAddFamilyDetail  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #03 04 Íæ¼ÒÁìÈ¡²¹³¥ÎïÆ··¢·Å½á¹û#tagMGGiveCompensationResult  | 
|   | 
| class  tagMGGiveCompensationResult(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)//Íæ¼ÒID  | 
|     CompensationType = 0    #(BYTE CompensationType)//²¹³¥ÀàÐÍ 0 È«·þ 1 ¸öÈË  | 
|     GUID = ""    #(char GUID[40])  | 
|     Result = 0    #(BYTE Result)//·¢·Å²¹³¥½á¹û 1 ³É¹¦ 0 Ê§°Ü  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x04  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.CompensationType,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x04  | 
|         self.PlayerID = 0  | 
|         self.CompensationType = 0  | 
|         self.GUID = ""  | 
|         self.Result = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 1  | 
|         length += 40  | 
|         length += 1  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteBYTE(data, self.CompensationType)  | 
|         data = CommFunc.WriteString(data, 40, self.GUID)  | 
|         data = CommFunc.WriteBYTE(data, self.Result)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 CompensationType:%d,  | 
|                                 GUID:%s,  | 
|                                 Result:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.CompensationType,  | 
|                                 self.GUID,  | 
|                                 self.Result  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGGiveCompensationResult=tagMGGiveCompensationResult()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGGiveCompensationResult.Head.Cmd,m_NAtagMGGiveCompensationResult.Head.SubCmd))] = m_NAtagMGGiveCompensationResult  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #03 03 Íæ¼ÒÇëÇóÁìÈ¡²¹³¥#tagMGRequestCompensation  | 
|   | 
| class  tagMGRequestCompensation(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)//Íæ¼ÒID  | 
|     GUID = ""    #(char GUID[40])  | 
|     PackSpaceCount = 0    #(BYTE PackSpaceCount)//µ±Ç°±³°üÊ£Óà¿Õ¼ä  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x03  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)  | 
|         self.PackSpaceCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x03  | 
|         self.PlayerID = 0  | 
|         self.GUID = ""  | 
|         self.PackSpaceCount = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 40  | 
|         length += 1  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 40, self.GUID)  | 
|         data = CommFunc.WriteBYTE(data, self.PackSpaceCount)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 GUID:%s,  | 
|                                 PackSpaceCount:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.GUID,  | 
|                                 self.PackSpaceCount  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGRequestCompensation=tagMGRequestCompensation()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGRequestCompensation.Head.Cmd,m_NAtagMGRequestCompensation.Head.SubCmd))] = m_NAtagMGRequestCompensation  | 
|   | 
|   | 
| #------------------------------------------------------  | 
| #03 01 Í¨ÖªÑ°±¦»ñµÃÎïÆ· #tagMGNotifyTreasureRecord  | 
|   | 
| class  tagMGNotifyTreasureRecord(Structure):  | 
|     Head = tagHead()  | 
|     PlayerID = 0    #(DWORD PlayerID)//Íæ¼ÒID  | 
|     PlayerName = ""    #(char PlayerName[33])//Ѱ±¦Íæ¼Ò½ÇÉ«Ãû£¬size = 33  | 
|     Type = 0    #(BYTE Type)//Ѱ±¦ÀàÐÍ 1ÈËÎï×°±¸ 2ÈËÎïÊÎÆ· 3×øÆï×°±¸  | 
|     ItemID = 0    #(DWORD ItemID)//Ѱ±¦»ñµÃµÄÎïÆ·ID£¬Èç¹ûÊÇ  | 
|     ItemCount = 0    #(BYTE ItemCount)//ÎïÆ·ÊýÁ¿  | 
|     IsAppoint = 0    #(BYTE IsAppoint)//ÎïÆ·ÊÇ·ñÊǶ¨ÖÆÎïÆ·£¬0·ñ1ÊÇ  | 
|     data = None  | 
|   | 
|     def __init__(self):  | 
|         self.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x01  | 
|         return  | 
|   | 
|     def ReadData(self, _lpData, _pos=0, _Len=0):  | 
|         self.Clear()  | 
|         _pos = self.Head.ReadData(_lpData, _pos)  | 
|         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)  | 
|         self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)  | 
|         self.ItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         self.IsAppoint,_pos = CommFunc.ReadBYTE(_lpData, _pos)  | 
|         return _pos  | 
|   | 
|     def Clear(self):  | 
|         self.Head = tagHead()  | 
|         self.Head.Clear()  | 
|         self.Head.Cmd = 0x03  | 
|         self.Head.SubCmd = 0x01  | 
|         self.PlayerID = 0  | 
|         self.PlayerName = ""  | 
|         self.Type = 0  | 
|         self.ItemID = 0  | 
|         self.ItemCount = 0  | 
|         self.IsAppoint = 0  | 
|         return  | 
|   | 
|     def GetLength(self):  | 
|         length = 0  | 
|         length += self.Head.GetLength()  | 
|         length += 4  | 
|         length += 33  | 
|         length += 1  | 
|         length += 4  | 
|         length += 1  | 
|         length += 1  | 
|   | 
|         return length  | 
|   | 
|     def GetBuffer(self):  | 
|         data = ''  | 
|         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())  | 
|         data = CommFunc.WriteDWORD(data, self.PlayerID)  | 
|         data = CommFunc.WriteString(data, 33, self.PlayerName)  | 
|         data = CommFunc.WriteBYTE(data, self.Type)  | 
|         data = CommFunc.WriteDWORD(data, self.ItemID)  | 
|         data = CommFunc.WriteBYTE(data, self.ItemCount)  | 
|         data = CommFunc.WriteBYTE(data, self.IsAppoint)  | 
|         return data  | 
|   | 
|     def OutputString(self):  | 
|         DumpString = '''  | 
|                                 Head:%s,  | 
|                                 PlayerID:%d,  | 
|                                 PlayerName:%s,  | 
|                                 Type:%d,  | 
|                                 ItemID:%d,  | 
|                                 ItemCount:%d,  | 
|                                 IsAppoint:%d  | 
|                                 '''\  | 
|                                 %(  | 
|                                 self.Head.OutputString(),  | 
|                                 self.PlayerID,  | 
|                                 self.PlayerName,  | 
|                                 self.Type,  | 
|                                 self.ItemID,  | 
|                                 self.ItemCount,  | 
|                                 self.IsAppoint  | 
|                                 )  | 
|         return DumpString  | 
|   | 
|   | 
| m_NAtagMGNotifyTreasureRecord=tagMGNotifyTreasureRecord()  | 
| ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGNotifyTreasureRecord.Head.Cmd,m_NAtagMGNotifyTreasureRecord.Head.SubCmd))] = m_NAtagMGNotifyTreasureRecord |