From c562008bec642a25245295eeec567081bc4e4c42 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 四月 2019 14:29:23 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(草园)

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py |  108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 108 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index d3f3dda..74be579 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -15532,6 +15532,114 @@
 
 
 #------------------------------------------------------
+# A3 25 NPC已攻击次数信息 #tagMCNPCAttackCountInfo
+
+class  tagMCNPCAttackCount(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("NPCID", c_int),    
+                  ("AttackCount", c_ubyte),    #已攻击次数
+                  ]
+
+    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.NPCID = 0
+        self.AttackCount = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCNPCAttackCount)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A3 25 NPC已攻击次数信息 //tagMCNPCAttackCountInfo:
+                                NPCID:%d,
+                                AttackCount:%d
+                                '''\
+                                %(
+                                self.NPCID,
+                                self.AttackCount
+                                )
+        return DumpString
+
+
+class  tagMCNPCAttackCountInfo(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)
+    NPCAttackCountList = list()    #(vector<tagMCNPCAttackCount> NPCAttackCountList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA3
+        self.Head.SubCmd = 0x25
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Count):
+            temNPCAttackCountList = tagMCNPCAttackCount()
+            _pos = temNPCAttackCountList.ReadData(_lpData, _pos)
+            self.NPCAttackCountList.append(temNPCAttackCountList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA3
+        self.Head.SubCmd = 0x25
+        self.Count = 0
+        self.NPCAttackCountList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.Count):
+            length += self.NPCAttackCountList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.NPCAttackCountList[i].GetLength(), self.NPCAttackCountList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                NPCAttackCountList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagMCNPCAttackCountInfo=tagMCNPCAttackCountInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCAttackCountInfo.Head.Cmd,m_NAtagMCNPCAttackCountInfo.Head.SubCmd))] = m_NAtagMCNPCAttackCountInfo
+
+
+#------------------------------------------------------
 # A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo
 
 class  tagMCNPCIDCollectionCnt(Structure):

--
Gitblit v1.8.0