| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 21 回合战斗对象开始行动 #tagMCTurnFightObjAction
|
| | |
|
| | | class tagMCTurnFightObjAction(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TurnNum", c_ubyte), # 当前轮次
|
| | | ("ObjID", c_int), |
| | | ("ObjType", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x21
|
| | | self.TurnNum = 0
|
| | | self.ObjID = 0
|
| | | self.ObjType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTurnFightObjAction)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 21 回合战斗对象开始行动 //tagMCTurnFightObjAction:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TurnNum:%d,
|
| | | ObjID:%d,
|
| | | ObjType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TurnNum,
|
| | | self.ObjID,
|
| | | self.ObjType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightObjAction=tagMCTurnFightObjAction()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightObjAction.Cmd,m_NAtagMCTurnFightObjAction.SubCmd))] = m_NAtagMCTurnFightObjAction
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 20 回合制战斗状态 #tagMCTurnFightState
|
| | |
|
| | | class tagMCTurnFightState(Structure):
|