| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 19 对象最新生命刷新 #tagSCObjHPRefresh
|
| | |
|
| | | class tagSCObjHPRefresh(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("HP", c_int), # 当前血量,求余20亿部分
|
| | | ("HPEx", c_int), # 当前血量,整除20亿部分
|
| | | ("MaxHP", c_int), # 最大血量,求余20亿部分
|
| | | ("MaxHPEx", c_int), # 最大血量,整除20亿部分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x19
|
| | | 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 = 0x19
|
| | | self.ObjID = 0
|
| | | self.HP = 0
|
| | | self.HPEx = 0
|
| | | self.MaxHP = 0
|
| | | self.MaxHPEx = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCObjHPRefresh)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 19 对象最新生命刷新 //tagSCObjHPRefresh:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | HP:%d,
|
| | | HPEx:%d,
|
| | | MaxHP:%d,
|
| | | MaxHPEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.HP,
|
| | | self.HPEx,
|
| | | self.MaxHP,
|
| | | self.MaxHPEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCObjHPRefresh=tagSCObjHPRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCObjHPRefresh.Cmd,m_NAtagSCObjHPRefresh.SubCmd))] = m_NAtagSCObjHPRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 18 对象属性刷新展示 #tagSCObjPropertyRefreshView
|
| | |
|
| | | class tagSCObjPropertyRefreshView(Structure):
|