From 5925409bdea13d819e4e4356a51043de5f3f9bd8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 22 十月 2025 14:20:10 +0800
Subject: [PATCH] 16 卡牌服务端(删除神兵)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 1427 ++++-------------------------------------------------------
1 files changed, 98 insertions(+), 1,329 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 4371b83..b67825b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -1031,58 +1031,6 @@
#------------------------------------------------------
-# A2 36 聊天气泡框升星 #tagCMChatBubbleBoxStarUP
-
-class tagCMChatBubbleBoxStarUP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("BoxID", c_ubyte), #气泡ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x36
- 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 = 0xA2
- self.SubCmd = 0x36
- self.BoxID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMChatBubbleBoxStarUP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 36 聊天气泡框升星 //tagCMChatBubbleBoxStarUP:
- Cmd:%s,
- SubCmd:%s,
- BoxID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.BoxID
- )
- return DumpString
-
-
-m_NAtagCMChatBubbleBoxStarUP=tagCMChatBubbleBoxStarUP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChatBubbleBoxStarUP.Cmd,m_NAtagCMChatBubbleBoxStarUP.SubCmd))] = m_NAtagCMChatBubbleBoxStarUP
-
-
-#------------------------------------------------------
# A2 24 触碰NPC #tagCMTouchNPC
class tagCMTouchNPC(Structure):
@@ -1697,58 +1645,6 @@
#------------------------------------------------------
-#A2 01 请求npc商店物品信息 #tagCMQueryNPCShopItem
-
-class tagCMQueryNPCShopItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("NPCShopID", c_int), #商店npcid
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x01
- 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 = 0xA2
- self.SubCmd = 0x01
- self.NPCShopID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMQueryNPCShopItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''//A2 01 请求npc商店物品信息 //tagCMQueryNPCShopItem:
- Cmd:%s,
- SubCmd:%s,
- NPCShopID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.NPCShopID
- )
- return DumpString
-
-
-m_NAtagCMQueryNPCShopItem=tagCMQueryNPCShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryNPCShopItem.Cmd,m_NAtagCMQueryNPCShopItem.SubCmd))] = m_NAtagCMQueryNPCShopItem
-
-
-#------------------------------------------------------
# A2 06 快速完成任务#tagCMQuickFinishMission
class tagCMQuickFinishMission(Structure):
@@ -1805,13 +1701,14 @@
#------------------------------------------------------
-# A2 32 神秘商店刷新 #tagCMRefreshMysticalShop
+# A2 32 刷新商店 #tagCSRefreshShop
-class tagCMRefreshMysticalShop(Structure):
+class tagCSRefreshShop(Structure):
_pack_ = 1
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
+ ("ShopType", c_ushort),
]
def __init__(self):
@@ -1828,28 +1725,31 @@
def Clear(self):
self.Cmd = 0xA2
self.SubCmd = 0x32
+ self.ShopType = 0
return
def GetLength(self):
- return sizeof(tagCMRefreshMysticalShop)
+ return sizeof(tagCSRefreshShop)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// A2 32 神秘商店刷新 //tagCMRefreshMysticalShop:
+ DumpString = '''// A2 32 刷新商店 //tagCSRefreshShop:
Cmd:%s,
- SubCmd:%s
+ SubCmd:%s,
+ ShopType:%d
'''\
%(
self.Cmd,
- self.SubCmd
+ self.SubCmd,
+ self.ShopType
)
return DumpString
-m_NAtagCMRefreshMysticalShop=tagCMRefreshMysticalShop()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMysticalShop.Cmd,m_NAtagCMRefreshMysticalShop.SubCmd))] = m_NAtagCMRefreshMysticalShop
+m_NAtagCSRefreshShop=tagCSRefreshShop()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSRefreshShop.Cmd,m_NAtagCSRefreshShop.SubCmd))] = m_NAtagCSRefreshShop
#------------------------------------------------------
@@ -1962,58 +1862,6 @@
m_NAtagCMSelectRealmDifficulty=tagCMSelectRealmDifficulty()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSelectRealmDifficulty.Cmd,m_NAtagCMSelectRealmDifficulty.SubCmd))] = m_NAtagCMSelectRealmDifficulty
-
-
-#------------------------------------------------------
-# A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox
-
-class tagCMSetChatBubbleBox(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("BubbleBoxType", c_ubyte), #气泡框类型
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA2
- self.SubCmd = 0x30
- 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 = 0xA2
- self.SubCmd = 0x30
- self.BubbleBoxType = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMSetChatBubbleBox)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A2 30 设置聊天气泡框 //tagCMSetChatBubbleBox:
- Cmd:%s,
- SubCmd:%s,
- BubbleBoxType:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.BubbleBoxType
- )
- return DumpString
-
-
-m_NAtagCMSetChatBubbleBox=tagCMSetChatBubbleBox()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSetChatBubbleBox.Cmd,m_NAtagCMSetChatBubbleBox.SubCmd))] = m_NAtagCMSetChatBubbleBox
#------------------------------------------------------
@@ -2365,14 +2213,14 @@
#------------------------------------------------------
-# A3 10 购买商城物品 #tagCMBuyItem
+# A3 10 购买商城物品 #tagCSBuyItem
-class tagCMBuyItem(Structure):
+class tagCSBuyItem(Structure):
_pack_ = 1
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("BuyItemIndex", c_ushort), #购买的物品索引
+ ("ShopID", c_int), #商品ID
("BuyCount", c_int), #购买数量
]
@@ -2390,34 +2238,34 @@
def Clear(self):
self.Cmd = 0xA3
self.SubCmd = 0x10
- self.BuyItemIndex = 0
+ self.ShopID = 0
self.BuyCount = 0
return
def GetLength(self):
- return sizeof(tagCMBuyItem)
+ return sizeof(tagCSBuyItem)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// A3 10 购买商城物品 //tagCMBuyItem:
+ DumpString = '''// A3 10 购买商城物品 //tagCSBuyItem:
Cmd:%s,
SubCmd:%s,
- BuyItemIndex:%d,
+ ShopID:%d,
BuyCount:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.BuyItemIndex,
+ self.ShopID,
self.BuyCount
)
return DumpString
-m_NAtagCMBuyItem=tagCMBuyItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyItem.Cmd,m_NAtagCMBuyItem.SubCmd))] = m_NAtagCMBuyItem
+m_NAtagCSBuyItem=tagCSBuyItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSBuyItem.Cmd,m_NAtagCSBuyItem.SubCmd))] = m_NAtagCSBuyItem
#------------------------------------------------------
@@ -4388,73 +4236,6 @@
#------------------------------------------------------
-# A4 09 家族仓库删除物品 #tagCGFamilyStoreDel
-
-class tagCGFamilyStoreDel(Structure):
- Head = tagHead()
- IndexCount = 0 #(BYTE IndexCount)
- StoreItemIndex = list() #(vector<BYTE> StoreItemIndex)// 仓库物品索引,1代表索引0的物品,与兑换一致
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA4
- self.Head.SubCmd = 0x09
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.IndexCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.IndexCount):
- value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
- self.StoreItemIndex.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA4
- self.Head.SubCmd = 0x09
- self.IndexCount = 0
- self.StoreItemIndex = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1 * self.IndexCount
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.IndexCount)
- for i in range(self.IndexCount):
- data = CommFunc.WriteBYTE(data, self.StoreItemIndex[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- IndexCount:%d,
- StoreItemIndex:%s
- '''\
- %(
- self.Head.OutputString(),
- self.IndexCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagCGFamilyStoreDel=tagCGFamilyStoreDel()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGFamilyStoreDel.Head.Cmd,m_NAtagCGFamilyStoreDel.Head.SubCmd))] = m_NAtagCGFamilyStoreDel
-
-
-#------------------------------------------------------
#A4 03 加入家族审核情况 #tagCGJoinFamilyReply
class tagCGJoinFamilyReply(Structure):
@@ -5381,62 +5162,6 @@
m_NAtagCMBuyCollectionCnt=tagCMBuyCollectionCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyCollectionCnt.Cmd,m_NAtagCMBuyCollectionCnt.SubCmd))] = m_NAtagCMBuyCollectionCnt
-
-
-#------------------------------------------------------
-# A5 25 购买日常活动次数 #tagCMBuyDailyActionCnt
-
-class tagCMBuyDailyActionCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActionID", c_int), # ID
- ("AddType", c_ubyte), # 0-花仙玉 1-用物品
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x25
- 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 = 0xA5
- self.SubCmd = 0x25
- self.ActionID = 0
- self.AddType = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMBuyDailyActionCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 25 购买日常活动次数 //tagCMBuyDailyActionCnt:
- Cmd:%s,
- SubCmd:%s,
- ActionID:%d,
- AddType:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActionID,
- self.AddType
- )
- return DumpString
-
-
-m_NAtagCMBuyDailyActionCnt=tagCMBuyDailyActionCnt()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyDailyActionCnt.Cmd,m_NAtagCMBuyDailyActionCnt.SubCmd))] = m_NAtagCMBuyDailyActionCnt
#------------------------------------------------------
@@ -6734,62 +6459,6 @@
#------------------------------------------------------
-# A5 42 领取成就奖励 #tagMCGetSuccessAward
-
-class tagMCGetSuccessAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SuccID", c_int), #成就ID
- ("IsPassport", c_ubyte), #是否通行证奖励
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x42
- 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 = 0xA5
- self.SubCmd = 0x42
- self.SuccID = 0
- self.IsPassport = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCGetSuccessAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 42 领取成就奖励 //tagMCGetSuccessAward:
- Cmd:%s,
- SubCmd:%s,
- SuccID:%d,
- IsPassport:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SuccID,
- self.IsPassport
- )
- return DumpString
-
-
-m_NAtagMCGetSuccessAward=tagMCGetSuccessAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGetSuccessAward.Cmd,m_NAtagMCGetSuccessAward.SubCmd))] = m_NAtagMCGetSuccessAward
-
-
-#------------------------------------------------------
# A5 44 通天令领取等级奖励 #tagCMGetTongTianLVAward
class tagCMGetTongTianLVAward(Structure):
@@ -6895,122 +6564,6 @@
m_NAtagCMGetTongTianTaskAward=tagCMGetTongTianTaskAward()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetTongTianTaskAward.Cmd,m_NAtagCMGetTongTianTaskAward.SubCmd))] = m_NAtagCMGetTongTianTaskAward
-
-
-#------------------------------------------------------
-# A5 56 神兵激活 #tagCMGodWeaponActivate
-
-class tagCMGodWeaponActivate(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("WeaponType", c_int), # 神兵类型
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x56
- 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 = 0xA5
- self.SubCmd = 0x56
- self.WeaponType = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGodWeaponActivate)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 56 神兵激活 //tagCMGodWeaponActivate:
- Cmd:%s,
- SubCmd:%s,
- WeaponType:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.WeaponType
- )
- return DumpString
-
-
-m_NAtagCMGodWeaponActivate=tagCMGodWeaponActivate()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGodWeaponActivate.Cmd,m_NAtagCMGodWeaponActivate.SubCmd))] = m_NAtagCMGodWeaponActivate
-
-
-#------------------------------------------------------
-# A5 55 神兵升级 #tagCMGodWeaponPlus
-
-class tagCMGodWeaponPlus(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("WeaponType", c_int), # 神兵类型
- ("ItemID", c_int), #消耗的物品ID
- ("ItemCount", c_ubyte), #消耗个数,默认1
- ("IsAutoBuy", c_ubyte), #是否自动购买,默认0
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x55
- 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 = 0xA5
- self.SubCmd = 0x55
- self.WeaponType = 0
- self.ItemID = 0
- self.ItemCount = 0
- self.IsAutoBuy = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGodWeaponPlus)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 55 神兵升级 //tagCMGodWeaponPlus:
- Cmd:%s,
- SubCmd:%s,
- WeaponType:%d,
- ItemID:%d,
- ItemCount:%d,
- IsAutoBuy:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.WeaponType,
- self.ItemID,
- self.ItemCount,
- self.IsAutoBuy
- )
- return DumpString
-
-
-m_NAtagCMGodWeaponPlus=tagCMGodWeaponPlus()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGodWeaponPlus.Cmd,m_NAtagCMGodWeaponPlus.SubCmd))] = m_NAtagCMGodWeaponPlus
#------------------------------------------------------
@@ -8237,58 +7790,6 @@
#------------------------------------------------------
-# A5 36 称号升星 #tagCMTitleStarUp
-
-class tagCMTitleStarUp(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("TitleID", c_int), #称号ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x36
- 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 = 0xA5
- self.SubCmd = 0x36
- self.TitleID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMTitleStarUp)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 36 称号升星 //tagCMTitleStarUp:
- Cmd:%s,
- SubCmd:%s,
- TitleID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.TitleID
- )
- return DumpString
-
-
-m_NAtagCMTitleStarUp=tagCMTitleStarUp()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTitleStarUp.Cmd,m_NAtagCMTitleStarUp.SubCmd))] = m_NAtagCMTitleStarUp
-
-
-#------------------------------------------------------
# A5 73 解锁命格孔 #tagCMUnLockBirthChartHole
class tagCMUnLockBirthChartHole(Structure):
@@ -8932,178 +8433,6 @@
#------------------------------------------------------
-# A6 09 家族仓库捐赠物品 #tagCMFamilyStoreDonate
-
-class tagCMFamilyStoreDonate(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ItemIndex", c_ubyte), # 捐赠物品在背包中的索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA6
- self.SubCmd = 0x09
- 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 = 0xA6
- self.SubCmd = 0x09
- self.ItemIndex = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFamilyStoreDonate)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A6 09 家族仓库捐赠物品 //tagCMFamilyStoreDonate:
- Cmd:%s,
- SubCmd:%s,
- ItemIndex:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ItemIndex
- )
- return DumpString
-
-
-m_NAtagCMFamilyStoreDonate=tagCMFamilyStoreDonate()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyStoreDonate.Cmd,m_NAtagCMFamilyStoreDonate.SubCmd))] = m_NAtagCMFamilyStoreDonate
-
-
-#------------------------------------------------------
-# A6 10 家族仓库兑换物品 #tagCMFamilyStoreExchange
-
-class tagCMFamilyStoreExchange(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("StoreItemIndex", c_ubyte), # 0-兑换口粮;>0-兑换仓库物品,1代表索引0的物品
- ("ItemID", c_int), # 兑换的物品ID
- ("ExcangeCount", c_ushort), # 兑换个数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA6
- self.SubCmd = 0x10
- 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 = 0xA6
- self.SubCmd = 0x10
- self.StoreItemIndex = 0
- self.ItemID = 0
- self.ExcangeCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFamilyStoreExchange)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A6 10 家族仓库兑换物品 //tagCMFamilyStoreExchange:
- Cmd:%s,
- SubCmd:%s,
- StoreItemIndex:%d,
- ItemID:%d,
- ExcangeCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.StoreItemIndex,
- self.ItemID,
- self.ExcangeCount
- )
- return DumpString
-
-
-m_NAtagCMFamilyStoreExchange=tagCMFamilyStoreExchange()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyStoreExchange.Cmd,m_NAtagCMFamilyStoreExchange.SubCmd))] = m_NAtagCMFamilyStoreExchange
-
-
-#------------------------------------------------------
-# A6 14 家族阵法升级 #tagCMFamilyZhenfaLVUP
-
-class tagCMFamilyZhenfaLVUP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ZhenfaType", c_ubyte), # 阵法类型
- ("ItemID", c_int), # 消耗的物品ID
- ("ItemCount", c_ushort), # 消耗个数,默认1
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA6
- self.SubCmd = 0x14
- 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 = 0xA6
- self.SubCmd = 0x14
- self.ZhenfaType = 0
- self.ItemID = 0
- self.ItemCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFamilyZhenfaLVUP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A6 14 家族阵法升级 //tagCMFamilyZhenfaLVUP:
- Cmd:%s,
- SubCmd:%s,
- ZhenfaType:%d,
- ItemID:%d,
- ItemCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ZhenfaType,
- self.ItemID,
- self.ItemCount
- )
- return DumpString
-
-
-m_NAtagCMFamilyZhenfaLVUP=tagCMFamilyZhenfaLVUP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyZhenfaLVUP.Cmd,m_NAtagCMFamilyZhenfaLVUP.SubCmd))] = m_NAtagCMFamilyZhenfaLVUP
-
-
-#------------------------------------------------------
# A6 26 请求家族成员列表 #tagCMGetFamilyInfo
class tagCMGetFamilyInfo(Structure):
@@ -9417,91 +8746,6 @@
m_NAtagCMRequestJoinFamilyByPlayer=tagCMRequestJoinFamilyByPlayer()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestJoinFamilyByPlayer.Cmd,m_NAtagCMRequestJoinFamilyByPlayer.SubCmd))] = m_NAtagCMRequestJoinFamilyByPlayer
-
-
-#------------------------------------------------------
-# A6 08 发家族红包 #tagCMSendFamilyRedPacket
-
-class tagCMSendFamilyRedPacket(Structure):
- Head = tagHead()
- RedPacketID = 0 #(DWORD RedPacketID)// 红包ID,没有发0
- PacketCnt = 0 #(WORD PacketCnt)// 红包数量
- MoneyNum = 0 #(WORD MoneyNum)//金钱数量
- Wish = "" #(char Wish[33])//祝福语
- IsAnonymous = 0 #(BYTE IsAnonymous)//是否匿名
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x08
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RedPacketID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.PacketCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.MoneyNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,33)
- self.IsAnonymous,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x08
- self.RedPacketID = 0
- self.PacketCnt = 0
- self.MoneyNum = 0
- self.Wish = ""
- self.IsAnonymous = 0
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 2
- length += 2
- length += 33
- length += 1
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.RedPacketID)
- data = CommFunc.WriteWORD(data, self.PacketCnt)
- data = CommFunc.WriteWORD(data, self.MoneyNum)
- data = CommFunc.WriteString(data, 33, self.Wish)
- data = CommFunc.WriteBYTE(data, self.IsAnonymous)
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RedPacketID:%d,
- PacketCnt:%d,
- MoneyNum:%d,
- Wish:%s,
- IsAnonymous:%d
- '''\
- %(
- self.Head.OutputString(),
- self.RedPacketID,
- self.PacketCnt,
- self.MoneyNum,
- self.Wish,
- self.IsAnonymous
- )
- return DumpString
-
-
-m_NAtagCMSendFamilyRedPacket=tagCMSendFamilyRedPacket()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSendFamilyRedPacket.Head.Cmd,m_NAtagCMSendFamilyRedPacket.Head.SubCmd))] = m_NAtagCMSendFamilyRedPacket
#------------------------------------------------------
@@ -11660,122 +10904,6 @@
#------------------------------------------------------
-# AB 12 抢红包 #tagCMGrabFamilyRedPacket
-
-class tagCMGrabFamilyRedPacket(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("RedPaketID", c_int), # 红包ID
- ("GetWay", c_ubyte), #获得途径
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAB
- self.SubCmd = 0x12
- 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 = 0xAB
- self.SubCmd = 0x12
- self.RedPaketID = 0
- self.GetWay = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGrabFamilyRedPacket)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
- Cmd:%s,
- SubCmd:%s,
- RedPaketID:%d,
- GetWay:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.RedPaketID,
- self.GetWay
- )
- return DumpString
-
-
-m_NAtagCMGrabFamilyRedPacket=tagCMGrabFamilyRedPacket()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGrabFamilyRedPacket.Cmd,m_NAtagCMGrabFamilyRedPacket.SubCmd))] = m_NAtagCMGrabFamilyRedPacket
-
-
-#------------------------------------------------------
-# AB 11 开服活动奖励 #tagCMOpenServerCampaignAward
-
-class tagCMOpenServerCampaignAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("CampaignType", c_int), #活动类型
- ("AwardType", c_ubyte), #奖励类型,1-排行,2-目标
- ("AwardIndex", c_ubyte), #目标奖励索引,领取目标奖励时用,目标条件在目标奖励列表中索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAB
- self.SubCmd = 0x11
- 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 = 0xAB
- self.SubCmd = 0x11
- self.CampaignType = 0
- self.AwardType = 0
- self.AwardIndex = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMOpenServerCampaignAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AB 11 开服活动奖励 //tagCMOpenServerCampaignAward:
- Cmd:%s,
- SubCmd:%s,
- CampaignType:%d,
- AwardType:%d,
- AwardIndex:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.CampaignType,
- self.AwardType,
- self.AwardIndex
- )
- return DumpString
-
-
-m_NAtagCMOpenServerCampaignAward=tagCMOpenServerCampaignAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMOpenServerCampaignAward.Cmd,m_NAtagCMOpenServerCampaignAward.SubCmd))] = m_NAtagCMOpenServerCampaignAward
-
-
-#------------------------------------------------------
# AC 05 召集仙盟成员打boss #tagCGCallupFamilyMemberToBoss
class tagCGCallupFamilyMemberToBoss(Structure):
@@ -11937,154 +11065,6 @@
m_NAtagCMMixCampaignAward=tagCMMixCampaignAward()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMixCampaignAward.Cmd,m_NAtagCMMixCampaignAward.SubCmd))] = m_NAtagCMMixCampaignAward
-
-
-#------------------------------------------------------
-# B0 29 活跃放置明细查询 #tagCMActivityPlaceQuery
-
-class tagCMActivityPlaceQuery(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB0
- self.SubCmd = 0x29
- 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 = 0xB0
- self.SubCmd = 0x29
- return
-
- def GetLength(self):
- return sizeof(tagCMActivityPlaceQuery)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B0 29 活跃放置明细查询 //tagCMActivityPlaceQuery:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMActivityPlaceQuery=tagCMActivityPlaceQuery()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceQuery.Cmd,m_NAtagCMActivityPlaceQuery.SubCmd))] = m_NAtagCMActivityPlaceQuery
-
-
-#------------------------------------------------------
-# B0 28 活跃放置快速完成 #tagCMActivityPlaceQuickFinish
-
-class tagCMActivityPlaceQuickFinish(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FinishCount", c_ubyte), #完成次数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB0
- self.SubCmd = 0x28
- 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 = 0xB0
- self.SubCmd = 0x28
- self.FinishCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActivityPlaceQuickFinish)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B0 28 活跃放置快速完成 //tagCMActivityPlaceQuickFinish:
- Cmd:%s,
- SubCmd:%s,
- FinishCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FinishCount
- )
- return DumpString
-
-
-m_NAtagCMActivityPlaceQuickFinish=tagCMActivityPlaceQuickFinish()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceQuickFinish.Cmd,m_NAtagCMActivityPlaceQuickFinish.SubCmd))] = m_NAtagCMActivityPlaceQuickFinish
-
-
-#------------------------------------------------------
-# B0 27 活跃放置启动 #tagCMActivityPlaceStart
-
-class tagCMActivityPlaceStart(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB0
- self.SubCmd = 0x27
- 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 = 0xB0
- self.SubCmd = 0x27
- return
-
- def GetLength(self):
- return sizeof(tagCMActivityPlaceStart)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B0 27 活跃放置启动 //tagCMActivityPlaceStart:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMActivityPlaceStart=tagCMActivityPlaceStart()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActivityPlaceStart.Cmd,m_NAtagCMActivityPlaceStart.SubCmd))] = m_NAtagCMActivityPlaceStart
#------------------------------------------------------
@@ -13062,214 +12042,6 @@
#------------------------------------------------------
-# B2 26 头像幻化 #tagCMFaceChange
-
-class tagCMFaceChange(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FaceID", c_int), # 幻化的ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB2
- self.SubCmd = 0x26
- 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 = 0xB2
- self.SubCmd = 0x26
- self.FaceID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFaceChange)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B2 26 头像幻化 //tagCMFaceChange:
- Cmd:%s,
- SubCmd:%s,
- FaceID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FaceID
- )
- return DumpString
-
-
-m_NAtagCMFaceChange=tagCMFaceChange()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFaceChange.Cmd,m_NAtagCMFaceChange.SubCmd))] = m_NAtagCMFaceChange
-
-
-#------------------------------------------------------
-# B2 28 头像框幻化 #tagCMFacePicChange
-
-class tagCMFacePicChange(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FacePicID", c_int), # 幻化的ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB2
- self.SubCmd = 0x28
- 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 = 0xB2
- self.SubCmd = 0x28
- self.FacePicID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFacePicChange)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B2 28 头像框幻化 //tagCMFacePicChange:
- Cmd:%s,
- SubCmd:%s,
- FacePicID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FacePicID
- )
- return DumpString
-
-
-m_NAtagCMFacePicChange=tagCMFacePicChange()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFacePicChange.Cmd,m_NAtagCMFacePicChange.SubCmd))] = m_NAtagCMFacePicChange
-
-
-#------------------------------------------------------
-# B2 29 头像框升星 #tagCMFacePicStarUP
-
-class tagCMFacePicStarUP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FacePicID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB2
- self.SubCmd = 0x29
- 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 = 0xB2
- self.SubCmd = 0x29
- self.FacePicID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFacePicStarUP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B2 29 头像框升星 //tagCMFacePicStarUP:
- Cmd:%s,
- SubCmd:%s,
- FacePicID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FacePicID
- )
- return DumpString
-
-
-m_NAtagCMFacePicStarUP=tagCMFacePicStarUP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFacePicStarUP.Cmd,m_NAtagCMFacePicStarUP.SubCmd))] = m_NAtagCMFacePicStarUP
-
-
-#------------------------------------------------------
-# B2 27 头像升星 #tagCMFaceStarUP
-
-class tagCMFaceStarUP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FaceID", c_int),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xB2
- self.SubCmd = 0x27
- 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 = 0xB2
- self.SubCmd = 0x27
- self.FaceID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFaceStarUP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// B2 27 头像升星 //tagCMFaceStarUP:
- Cmd:%s,
- SubCmd:%s,
- FaceID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FaceID
- )
- return DumpString
-
-
-m_NAtagCMFaceStarUP=tagCMFaceStarUP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFaceStarUP.Cmd,m_NAtagCMFaceStarUP.SubCmd))] = m_NAtagCMFaceStarUP
-
-
-#------------------------------------------------------
# B2 12 领取功能系统特权奖励 #tagCMGetFuncSysPrivilegeAward
class tagCMGetFuncSysPrivilegeAward(Structure):
@@ -13432,15 +12204,18 @@
#------------------------------------------------------
# B2 17 古宝升星 #tagCMGubaoStarUp
-class tagCMGubaoPieceUse(Structure):
+class tagCMGubaoStarUp(Structure):
_pack_ = 1
_fields_ = [
- ("GubaoID", c_ushort), # 通用碎片古宝ID
- ("PieceCount", c_ushort), # 使用碎片个数
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("GubaoID", c_ushort),
]
def __init__(self):
self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x17
return
def ReadData(self, stringData, _pos=0, _len=0):
@@ -13449,99 +12224,33 @@
return _pos + self.GetLength()
def Clear(self):
+ self.Cmd = 0xB2
+ self.SubCmd = 0x17
self.GubaoID = 0
- self.PieceCount = 0
return
def GetLength(self):
- return sizeof(tagCMGubaoPieceUse)
+ return sizeof(tagCMGubaoStarUp)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
DumpString = '''// B2 17 古宝升星 //tagCMGubaoStarUp:
- GubaoID:%d,
- PieceCount:%d
+ Cmd:%s,
+ SubCmd:%s,
+ GubaoID:%d
'''\
%(
- self.GubaoID,
- self.PieceCount
- )
- return DumpString
-
-
-class tagCMGubaoStarUp(Structure):
- Head = tagHead()
- GubaoID = 0 #(WORD GubaoID)
- PieceSelectCount = 0 #(BYTE PieceSelectCount)
- CommPieceUseList = list() #(vector<tagCMGubaoPieceUse> CommPieceUseList)// 通用古宝碎片使用列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xB2
- self.Head.SubCmd = 0x17
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.GubaoID,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.PieceSelectCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.PieceSelectCount):
- temCommPieceUseList = tagCMGubaoPieceUse()
- _pos = temCommPieceUseList.ReadData(_lpData, _pos)
- self.CommPieceUseList.append(temCommPieceUseList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xB2
- self.Head.SubCmd = 0x17
- self.GubaoID = 0
- self.PieceSelectCount = 0
- self.CommPieceUseList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 2
- length += 1
- for i in range(self.PieceSelectCount):
- length += self.CommPieceUseList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteWORD(data, self.GubaoID)
- data = CommFunc.WriteBYTE(data, self.PieceSelectCount)
- for i in range(self.PieceSelectCount):
- data = CommFunc.WriteString(data, self.CommPieceUseList[i].GetLength(), self.CommPieceUseList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- GubaoID:%d,
- PieceSelectCount:%d,
- CommPieceUseList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.GubaoID,
- self.PieceSelectCount,
- "..."
+ self.Cmd,
+ self.SubCmd,
+ self.GubaoID
)
return DumpString
m_NAtagCMGubaoStarUp=tagCMGubaoStarUp()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoStarUp.Head.Cmd,m_NAtagCMGubaoStarUp.Head.SubCmd))] = m_NAtagCMGubaoStarUp
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoStarUp.Cmd,m_NAtagCMGubaoStarUp.SubCmd))] = m_NAtagCMGubaoStarUp
#------------------------------------------------------
@@ -14181,6 +12890,66 @@
#------------------------------------------------------
+# B2 25 幻境阁操作 #tagCSHJGOP
+
+class tagCSHJGOP(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Type", c_ubyte), # 类型 1-形象;2-头像;3-头像框;4-气泡;5-称号
+ ("OPType", c_ubyte), # 操作 1-激活;2-佩戴;3-卸下;4-升星
+ ("OPID", c_int), # 操作对应的ID,如形象ID等
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x25
+ 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 = 0xB2
+ self.SubCmd = 0x25
+ self.Type = 0
+ self.OPType = 0
+ self.OPID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSHJGOP)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 25 幻境阁操作 //tagCSHJGOP:
+ Cmd:%s,
+ SubCmd:%s,
+ Type:%d,
+ OPType:%d,
+ OPID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Type,
+ self.OPType,
+ self.OPID
+ )
+ return DumpString
+
+
+m_NAtagCSHJGOP=tagCSHJGOP()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHJGOP.Cmd,m_NAtagCSHJGOP.SubCmd))] = m_NAtagCSHJGOP
+
+
+#------------------------------------------------------
# B2 07 重置加点 #tagCMResetAttrPoint
class tagCMResetAttrPoint(Structure):
--
Gitblit v1.8.0