xdh
2018-09-25 dd93f9d6743284738018c8005946c20e6d681c3c
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -318,6 +318,14 @@
                  ("Day", c_ushort),    # 已开服天数,从0开始
                  ("IsMixServer", c_ubyte),    #是否是合服服务器
                  ("MixDay", c_ushort),    # 已合服天数,从0开始
                  ("OpenWeekday", c_ubyte),    #开服是周几,1代表周一
                  ("NowYear", c_ushort),    #服务器当前时间 - 年
                  ("NowMonth", c_ubyte),
                  ("NowDay", c_ubyte),
                  ("NowHour", c_ubyte),
                  ("NowMinute", c_ubyte),
                  ("NowSecond", c_ubyte),
                  ("NowMicSecond", c_int),
                  ]
    def __init__(self):
@@ -337,6 +345,14 @@
        self.Day = 0
        self.IsMixServer = 0
        self.MixDay = 0
        self.OpenWeekday = 0
        self.NowYear = 0
        self.NowMonth = 0
        self.NowDay = 0
        self.NowHour = 0
        self.NowMinute = 0
        self.NowSecond = 0
        self.NowMicSecond = 0
        return
    def GetLength(self):
@@ -351,14 +367,30 @@
                                SubCmd:%s,
                                Day:%d,
                                IsMixServer:%d,
                                MixDay:%d
                                MixDay:%d,
                                OpenWeekday:%d,
                                NowYear:%d,
                                NowMonth:%d,
                                NowDay:%d,
                                NowHour:%d,
                                NowMinute:%d,
                                NowSecond:%d,
                                NowMicSecond:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Day,
                                self.IsMixServer,
                                self.MixDay
                                self.MixDay,
                                self.OpenWeekday,
                                self.NowYear,
                                self.NowMonth,
                                self.NowDay,
                                self.NowHour,
                                self.NowMinute,
                                self.NowSecond,
                                self.NowMicSecond
                                )
        return DumpString
@@ -4402,6 +4434,7 @@
                  ("SubCmd", c_ubyte),
                  ("Point", c_int),    # 复活点数
                  ("TotalPoint", c_int),    # 复活总点数
                  ("RebornCnt", c_ushort),    # 复活次数
                  ]
    def __init__(self):
@@ -4420,6 +4453,7 @@
        self.SubCmd = 0x08
        self.Point = 0
        self.TotalPoint = 0
        self.RebornCnt = 0
        return
    def GetLength(self):
@@ -4433,13 +4467,15 @@
                                Cmd:%s,
                                SubCmd:%s,
                                Point:%d,
                                TotalPoint:%d
                                TotalPoint:%d,
                                RebornCnt:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Point,
                                self.TotalPoint
                                self.TotalPoint,
                                self.RebornCnt
                                )
        return DumpString
@@ -11536,19 +11572,15 @@
#------------------------------------------------------
#A3 0A 副本鼓舞信息通知 #tagMCFBEncourageInfo
class  tagMCFBEncourageInfo(Structure):
class  tagMCFBEncourageCnt(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Cnt1", c_ubyte),    # 当前铜钱鼓舞次数
                  ("Cnt2", c_ubyte),    # 当前仙玉鼓舞次数
                  ("MoneyType", c_ubyte),    # 金钱类型
                  ("EncourageCnt", c_ubyte),    # 当前鼓舞次数
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA3
        self.SubCmd = 0x0A
        return
    def ReadData(self, stringData, _pos=0, _len=0):
@@ -11557,36 +11589,92 @@
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xA3
        self.SubCmd = 0x0A
        self.Cnt1 = 0
        self.Cnt2 = 0
        self.MoneyType = 0
        self.EncourageCnt = 0
        return
    def GetLength(self):
        return sizeof(tagMCFBEncourageInfo)
        return sizeof(tagMCFBEncourageCnt)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''//A3 0A 副本鼓舞信息通知 //tagMCFBEncourageInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Cnt1:%d,
                                Cnt2:%d
                                MoneyType:%d,
                                EncourageCnt:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Cnt1,
                                self.Cnt2
                                self.MoneyType,
                                self.EncourageCnt
                                )
        return DumpString
class  tagMCFBEncourageInfo(Structure):
    Head = tagHead()
    Cnt = 0    #(BYTE Cnt)//
    InfoList = list()    #(vector<tagMCFBEncourageCnt> InfoList)// 次数信息
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x0A
        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 = tagMCFBEncourageCnt()
            _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 = 0x0A
        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_NAtagMCFBEncourageInfo=tagMCFBEncourageInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Cmd,m_NAtagMCFBEncourageInfo.SubCmd))] = m_NAtagMCFBEncourageInfo
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Head.Cmd,m_NAtagMCFBEncourageInfo.Head.SubCmd))] = m_NAtagMCFBEncourageInfo
#------------------------------------------------------
@@ -13802,6 +13890,62 @@
m_NAtagMCPlayerStoveMsg=tagMCPlayerStoveMsg()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerStoveMsg.Cmd,m_NAtagMCPlayerStoveMsg.SubCmd))] = m_NAtagMCPlayerStoveMsg
#------------------------------------------------------
# A3 21 祈福丹药结果 #tagMCPrayElixirResult
class  tagMCPrayElixirResult(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ItemID", c_int),    # 物品ID
                  ("PrayCnt", c_ubyte),    # 今日祈福次数
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA3
        self.SubCmd = 0x21
        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 = 0x21
        self.ItemID = 0
        self.PrayCnt = 0
        return
    def GetLength(self):
        return sizeof(tagMCPrayElixirResult)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 21 祈福丹药结果 //tagMCPrayElixirResult:
                                Cmd:%s,
                                SubCmd:%s,
                                ItemID:%d,
                                PrayCnt:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ItemID,
                                self.PrayCnt
                                )
        return DumpString
m_NAtagMCPrayElixirResult=tagMCPrayElixirResult()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPrayElixirResult.Cmd,m_NAtagMCPrayElixirResult.SubCmd))] = m_NAtagMCPrayElixirResult
#------------------------------------------------------
@@ -19728,6 +19872,7 @@
    Head = tagHead()
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
    ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
    ActivityTime = list()    #(vector<tagMCFlashGiftbagTime> ActivityTime)//活动时间
    IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
@@ -19747,6 +19892,7 @@
        _pos = self.Head.ReadData(_lpData, _pos)
        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.ActivityTimeCount):
            temActivityTime = tagMCFlashGiftbagTime()
@@ -19768,6 +19914,7 @@
        self.Head.SubCmd = 0x12
        self.StartDate = ""
        self.EndtDate = ""
        self.AdvanceMinutes = 0
        self.ActivityTimeCount = 0
        self.ActivityTime = list()
        self.IsDayReset = 0
@@ -19781,6 +19928,7 @@
        length += self.Head.GetLength()
        length += 10
        length += 10
        length += 2
        length += 1
        for i in range(self.ActivityTimeCount):
            length += self.ActivityTime[i].GetLength()
@@ -19797,6 +19945,7 @@
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteString(data, 10, self.StartDate)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
        data = CommFunc.WriteBYTE(data, self.ActivityTimeCount)
        for i in range(self.ActivityTimeCount):
            data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
@@ -19812,6 +19961,7 @@
                                Head:%s,
                                StartDate:%s,
                                EndtDate:%s,
                                AdvanceMinutes:%d,
                                ActivityTimeCount:%d,
                                ActivityTime:%s,
                                IsDayReset:%d,
@@ -19823,6 +19973,7 @@
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.AdvanceMinutes,
                                self.ActivityTimeCount,
                                "...",
                                self.IsDayReset,
@@ -20371,6 +20522,7 @@
    Head = tagHead()
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
    ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
    ActivityTime = list()    #(vector<tagMCSpringSaleTime> ActivityTime)//活动时间
    IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
@@ -20390,6 +20542,7 @@
        _pos = self.Head.ReadData(_lpData, _pos)
        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.ActivityTimeCount):
            temActivityTime = tagMCSpringSaleTime()
@@ -20411,6 +20564,7 @@
        self.Head.SubCmd = 0x11
        self.StartDate = ""
        self.EndtDate = ""
        self.AdvanceMinutes = 0
        self.ActivityTimeCount = 0
        self.ActivityTime = list()
        self.IsDayReset = 0
@@ -20424,6 +20578,7 @@
        length += self.Head.GetLength()
        length += 10
        length += 10
        length += 2
        length += 1
        for i in range(self.ActivityTimeCount):
            length += self.ActivityTime[i].GetLength()
@@ -20440,6 +20595,7 @@
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteString(data, 10, self.StartDate)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
        data = CommFunc.WriteBYTE(data, self.ActivityTimeCount)
        for i in range(self.ActivityTimeCount):
            data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
@@ -20455,6 +20611,7 @@
                                Head:%s,
                                StartDate:%s,
                                EndtDate:%s,
                                AdvanceMinutes:%d,
                                ActivityTimeCount:%d,
                                ActivityTime:%s,
                                IsDayReset:%d,
@@ -20466,6 +20623,7 @@
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.AdvanceMinutes,
                                self.ActivityTimeCount,
                                "...",
                                self.IsDayReset,
@@ -20478,6 +20636,70 @@
m_NAtagMCSpringSaleInfo=tagMCSpringSaleInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSpringSaleInfo.Head.Cmd,m_NAtagMCSpringSaleInfo.Head.SubCmd))] = m_NAtagMCSpringSaleInfo
#------------------------------------------------------
# AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
class  tagMCSuperGiftInfo(Structure):
    Head = tagHead()
    GiftID = 0    #(DWORD GiftID)//商品ID
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x16
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x16
        self.GiftID = 0
        self.EndtDate = ""
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 4
        length += 10
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteDWORD(data, self.GiftID)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                GiftID:%d,
                                EndtDate:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.GiftID,
                                self.EndtDate
                                )
        return DumpString
m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Head.Cmd,m_NAtagMCSuperGiftInfo.Head.SubCmd))] = m_NAtagMCSuperGiftInfo
#------------------------------------------------------
@@ -21125,6 +21347,7 @@
    Head = tagHead()
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    ResetType = 0    #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
    LimitLV = 0    #(WORD LimitLV)// 限制等级
    TaskCnt = 0    #(BYTE TaskCnt)
    TaskInfo = list()    #(vector<tagMCBossRebornTaskInfo> TaskInfo)
@@ -21141,6 +21364,7 @@
        _pos = self.Head.ReadData(_lpData, _pos)
        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.TaskCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TaskCnt):
@@ -21156,6 +21380,7 @@
        self.Head.SubCmd = 0x04
        self.StartDate = ""
        self.EndtDate = ""
        self.ResetType = 0
        self.LimitLV = 0
        self.TaskCnt = 0
        self.TaskInfo = list()
@@ -21166,6 +21391,7 @@
        length += self.Head.GetLength()
        length += 10
        length += 10
        length += 1
        length += 2
        length += 1
        for i in range(self.TaskCnt):
@@ -21178,6 +21404,7 @@
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteString(data, 10, self.StartDate)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        data = CommFunc.WriteBYTE(data, self.ResetType)
        data = CommFunc.WriteWORD(data, self.LimitLV)
        data = CommFunc.WriteBYTE(data, self.TaskCnt)
        for i in range(self.TaskCnt):
@@ -21189,6 +21416,7 @@
                                Head:%s,
                                StartDate:%s,
                                EndtDate:%s,
                                ResetType:%d,
                                LimitLV:%d,
                                TaskCnt:%d,
                                TaskInfo:%s
@@ -21197,6 +21425,7 @@
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.ResetType,
                                self.LimitLV,
                                self.TaskCnt,
                                "..."