| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 0B 根据类型来决定移动的方式 #tagCMMoveByType
|
| | |
|
| | | class tagCMMoveByType(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PosX", c_ushort), # 目标X
|
| | | ("PosY", c_ushort), # 目标Y
|
| | | ("MoveType", c_ubyte), #移动方式
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x0B
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x0B
|
| | | self.PosX = 0
|
| | | self.PosY = 0
|
| | | self.MoveType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMMoveByType)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B4 0B 根据类型来决定移动的方式 //tagCMMoveByType:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | PosX:%d,
|
| | | PosY:%d,
|
| | | MoveType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.PosX,
|
| | | self.PosY,
|
| | | self.MoveType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMMoveByType=tagCMMoveByType()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMoveByType.Cmd,m_NAtagCMMoveByType.SubCmd))] = m_NAtagCMMoveByType
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 02 对象击退 #tagCMNPCBeatBack
|
| | |
|
| | | class tagCMNPCPos(Structure):
|