| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A1 03 同步开服天数 #tagMCOpenServerDay
|
| | |
|
| | | class tagMCOpenServerDay(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("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), |
| | | ("WeekOfYear", c_ubyte), #一年中的第几周
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA1
|
| | | 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 = 0xA1
|
| | | self.SubCmd = 0x03
|
| | | 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
|
| | | self.WeekOfYear = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCOpenServerDay)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A1 03 同步开服天数 //tagMCOpenServerDay:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Day:%d,
|
| | | IsMixServer:%d,
|
| | | MixDay:%d,
|
| | | OpenWeekday:%d,
|
| | | NowYear:%d,
|
| | | NowMonth:%d,
|
| | | NowDay:%d,
|
| | | NowHour:%d,
|
| | | NowMinute:%d,
|
| | | NowSecond:%d,
|
| | | NowMicSecond:%d,
|
| | | WeekOfYear:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Day,
|
| | | self.IsMixServer,
|
| | | self.MixDay,
|
| | | self.OpenWeekday,
|
| | | self.NowYear,
|
| | | self.NowMonth,
|
| | | self.NowDay,
|
| | | self.NowHour,
|
| | | self.NowMinute,
|
| | | self.NowSecond,
|
| | | self.NowMicSecond,
|
| | | self.WeekOfYear
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCOpenServerDay=tagMCOpenServerDay()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOpenServerDay.Cmd,m_NAtagMCOpenServerDay.SubCmd))] = m_NAtagMCOpenServerDay
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A1 07 玩家掉率加成 #tagMCPlayerDropRate
|
| | |
|
| | | class tagMCPlayerDropRate(Structure):
|