| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 17 增加果实使用上限 #tagCMAddFruitUseLimit
|
| | |
|
| | | class tagCMAddFruitUseLimit(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ItemID", c_int), #果实物品ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | self.ItemID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMAddFruitUseLimit)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 17 增加果实使用上限 //tagCMAddFruitUseLimit:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ItemID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ItemID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMAddFruitUseLimit=tagCMAddFruitUseLimit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAddFruitUseLimit.Cmd,m_NAtagCMAddFruitUseLimit.SubCmd))] = m_NAtagCMAddFruitUseLimit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 07 过期物品续费 #tagCMItemRenew
|
| | |
|
| | | class tagCMItemRenew(Structure):
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RefineNum", c_ushort), # 配方编号
|
| | | ("UseRateItem", c_int), # 附加材料ID
|
| | | ("AlchemyID", c_int), # 丹药ID
|
| | | ("DoType", c_ubyte), # 0-学习 1-开始炼丹 2-停止炼丹 3-开炉取丹
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x76
|
| | | self.RefineNum = 0
|
| | | self.UseRateItem = 0
|
| | | self.AlchemyID = 0
|
| | | self.DoType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// A5 76 玩家炼丹 //tagCMPlayerRefine:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | RefineNum:%d,
|
| | | UseRateItem:%d
|
| | | AlchemyID:%d,
|
| | | DoType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.RefineNum,
|
| | | self.UseRateItem
|
| | | self.AlchemyID,
|
| | | self.DoType
|
| | | )
|
| | | return DumpString
|
| | |
|