ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -45185,6 +45185,119 @@
#------------------------------------------------------
# B1 09 玩家挂机系统信息 #tagMCGuajiInfo
class  tagMCGuajiInfo(Structure):
    Head = tagHead()
    QuickAwardCount = 0    #(BYTE QuickAwardCount)// 今日已快速挂机收益次数
    AwardType = 0    #(BYTE AwardType)// 收益类型: 0-已累计预览;1-领取结算结果(包含常规领取跟快速领取)
    AwardSeconds = 0    #(DWORD AwardSeconds)// 已累计收益时长,秒
    Exp = 0    #(DWORD Exp)// 已累计经验,求余亿部分
    ExpPoint = 0    #(DWORD ExpPoint)// 已累计经验,整除亿部分
    MoneyInfoLen = 0    #(BYTE MoneyInfoLen)
    MoneyInfo = ""    #(String MoneyInfo)// 已累计货币 [[货币类型, 货币值], ...]
    ItemInfoLen = 0    #(WORD ItemInfoLen)
    ItemInfo = ""    #(String ItemInfo)// 已累计物品 [[物品ID, 个数], ...]
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x09
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.QuickAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.AwardType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.AwardSeconds,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.Exp,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.MoneyInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.MoneyInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.MoneyInfoLen)
        self.ItemInfoLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.ItemInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemInfoLen)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x09
        self.QuickAwardCount = 0
        self.AwardType = 0
        self.AwardSeconds = 0
        self.Exp = 0
        self.ExpPoint = 0
        self.MoneyInfoLen = 0
        self.MoneyInfo = ""
        self.ItemInfoLen = 0
        self.ItemInfo = ""
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 4
        length += 4
        length += 4
        length += 1
        length += len(self.MoneyInfo)
        length += 2
        length += len(self.ItemInfo)
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.QuickAwardCount)
        data = CommFunc.WriteBYTE(data, self.AwardType)
        data = CommFunc.WriteDWORD(data, self.AwardSeconds)
        data = CommFunc.WriteDWORD(data, self.Exp)
        data = CommFunc.WriteDWORD(data, self.ExpPoint)
        data = CommFunc.WriteBYTE(data, self.MoneyInfoLen)
        data = CommFunc.WriteString(data, self.MoneyInfoLen, self.MoneyInfo)
        data = CommFunc.WriteWORD(data, self.ItemInfoLen)
        data = CommFunc.WriteString(data, self.ItemInfoLen, self.ItemInfo)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                QuickAwardCount:%d,
                                AwardType:%d,
                                AwardSeconds:%d,
                                Exp:%d,
                                ExpPoint:%d,
                                MoneyInfoLen:%d,
                                MoneyInfo:%s,
                                ItemInfoLen:%d,
                                ItemInfo:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.QuickAwardCount,
                                self.AwardType,
                                self.AwardSeconds,
                                self.Exp,
                                self.ExpPoint,
                                self.MoneyInfoLen,
                                self.MoneyInfo,
                                self.ItemInfoLen,
                                self.ItemInfo
                                )
        return DumpString
m_NAtagMCGuajiInfo=tagMCGuajiInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGuajiInfo.Head.Cmd,m_NAtagMCGuajiInfo.Head.SubCmd))] = m_NAtagMCGuajiInfo
#------------------------------------------------------
# B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
class  tagMCNotifyPlayerMove(Structure):