From 0f297a5b66b91751d8342624db871efeca7ed94e Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期六, 02 三月 2019 10:20:48 +0800 Subject: [PATCH] 6307 【后端】【2.0】多套装备开发单(穿脱、升星) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 84 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index 7cb615e..8696fe3 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -9469,6 +9469,90 @@ #------------------------------------------------------ +# A5 C5 装备部位升星 #tagCMEquipPartStarUp + +class tagCMEquipPartStarUp(Structure): + Head = tagHead() + EquipPackIndex = 0 #(WORD EquipPackIndex)// 部位格子索引 + CostEquipCnt = 0 #(BYTE CostEquipCnt)// 装备个数 + CostEquipIndex = list() #(vector<WORD> CostEquipIndex)// 装备索引 + CostEquipID = list() #(vector<DWORD> CostEquipID)// 装备物品ID + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0xC5 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.EquipPackIndex,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.CostEquipCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CostEquipCnt): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.CostEquipIndex.append(value) + for i in range(self.CostEquipCnt): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.CostEquipID.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0xC5 + self.EquipPackIndex = 0 + self.CostEquipCnt = 0 + self.CostEquipIndex = list() + self.CostEquipID = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + length += 2 * self.CostEquipCnt + length += 4 * self.CostEquipCnt + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.EquipPackIndex) + data = CommFunc.WriteBYTE(data, self.CostEquipCnt) + for i in range(self.CostEquipCnt): + data = CommFunc.WriteWORD(data, self.CostEquipIndex[i]) + for i in range(self.CostEquipCnt): + data = CommFunc.WriteDWORD(data, self.CostEquipID[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + EquipPackIndex:%d, + CostEquipCnt:%d, + CostEquipIndex:%s, + CostEquipID:%s + '''\ + %( + self.Head.OutputString(), + self.EquipPackIndex, + self.CostEquipCnt, + "...", + "..." + ) + return DumpString + + +m_NAtagCMEquipPartStarUp=tagCMEquipPartStarUp() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEquipPartStarUp.Head.Cmd,m_NAtagCMEquipPartStarUp.Head.SubCmd))] = m_NAtagCMEquipPartStarUp + + +#------------------------------------------------------ # A5 48 兑换大师等级经验 #tagCMExchangeMasterEXP class tagCMExchangeMasterEXP(Structure): -- Gitblit v1.8.0