| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 23 每日掉落战利品信息 #tagSCDropBootyInfo
|
| | |
|
| | | class tagSCDropBooty(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), # 战利品ID
|
| | | ("TodayDropCnt", c_int), # 今日已掉落数量
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ItemID = 0
|
| | | self.TodayDropCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCDropBooty)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 23 每日掉落战利品信息 //tagSCDropBootyInfo:
|
| | | ItemID:%d,
|
| | | TodayDropCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.TodayDropCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCDropBootyInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)
|
| | | DropBootyList = list() #(vector<tagSCDropBooty> DropBootyList)//每日已掉落战利品信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x23
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temDropBootyList = tagSCDropBooty()
|
| | | _pos = temDropBootyList.ReadData(_lpData, _pos)
|
| | | self.DropBootyList.append(temDropBootyList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x23
|
| | | self.Count = 0
|
| | | self.DropBootyList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.DropBootyList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.DropBootyList[i].GetLength(), self.DropBootyList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | DropBootyList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCDropBootyInfo=tagSCDropBootyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCDropBootyInfo.Head.Cmd,m_NAtagSCDropBootyInfo.Head.SubCmd))] = m_NAtagSCDropBootyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 17 头像信息 #tagMCFaceInfo
|
| | |
|
| | | class tagMCFace(Structure):
|
| | |
| | | class tagSCTurnFightObj(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ObjID", c_int), # 实例唯一ID
|
| | | ("NPCID", c_int), # 绑定的NPCID,不同的实例ID对应的NPCID可能一样
|
| | | ("ObjID", c_int), # 战斗单位唯一ID
|
| | | ("NPCID", c_int), # 战斗NPCID,不同的实例ID对应的NPCID可能一样
|
| | | ("HeroID", c_int), # 玩家武将ID,仅玩家阵容有
|
| | | ("SkinID", c_int), # 玩家武将皮肤ID,仅玩家阵容有
|
| | | ("HP", c_int), # 当前血量,求余20亿部分
|
| | | ("HPEx", c_int), # 当前血量,整除20亿部分
|
| | | ("MaxHP", c_int), # 最大血量,求余20亿部分
|
| | |
| | | def Clear(self):
|
| | | self.ObjID = 0
|
| | | self.NPCID = 0
|
| | | self.HeroID = 0
|
| | | self.SkinID = 0
|
| | | self.HP = 0
|
| | | self.HPEx = 0
|
| | | self.MaxHP = 0
|
| | |
| | | DumpString = '''// B4 24 回合战斗初始化 //tagSCTurnFightInit:
|
| | | ObjID:%d,
|
| | | NPCID:%d,
|
| | | HeroID:%d,
|
| | | SkinID:%d,
|
| | | HP:%d,
|
| | | HPEx:%d,
|
| | | MaxHP:%d,
|
| | |
| | | %(
|
| | | self.ObjID,
|
| | | self.NPCID,
|
| | | self.HeroID,
|
| | | self.SkinID,
|
| | | self.HP,
|
| | | self.HPEx,
|
| | | self.MaxHP,
|