From a53ebf8a767a99aee01b8ae39af45634766d0bb3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 13 七月 2022 17:34:51 +0800
Subject: [PATCH] 9663 【越南】【BT7】【主干】防范NPC获取刷新点坐标报错

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 0389a55..14ebe55 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -12373,6 +12373,7 @@
 class  tagGCCrossBattlefieldBuyPlayer(Structure):
     BuyPlayerID = 0    #(DWORD BuyPlayerID)//购买的玩家ID,即召集人
     Faction = 0    #(BYTE Faction)//阵营 1-红;2-蓝
+    ServerOnly = 0    #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是
     FactionPlayerCount = 0    #(BYTE FactionPlayerCount)
     FactionPlayerList = list()    #(vector<tagGCCrossBattlefieldPlayer> FactionPlayerList)//阵营所有玩家列表,包含召集人
     data = None
@@ -12385,6 +12386,7 @@
         self.Clear()
         self.BuyPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.ServerOnly,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.FactionPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.FactionPlayerCount):
             temFactionPlayerList = tagGCCrossBattlefieldPlayer()
@@ -12395,6 +12397,7 @@
     def Clear(self):
         self.BuyPlayerID = 0
         self.Faction = 0
+        self.ServerOnly = 0
         self.FactionPlayerCount = 0
         self.FactionPlayerList = list()
         return
@@ -12402,6 +12405,7 @@
     def GetLength(self):
         length = 0
         length += 4
+        length += 1
         length += 1
         length += 1
         for i in range(self.FactionPlayerCount):
@@ -12413,6 +12417,7 @@
         data = ''
         data = CommFunc.WriteDWORD(data, self.BuyPlayerID)
         data = CommFunc.WriteBYTE(data, self.Faction)
+        data = CommFunc.WriteBYTE(data, self.ServerOnly)
         data = CommFunc.WriteBYTE(data, self.FactionPlayerCount)
         for i in range(self.FactionPlayerCount):
             data = CommFunc.WriteString(data, self.FactionPlayerList[i].GetLength(), self.FactionPlayerList[i].GetBuffer())
@@ -12422,12 +12427,14 @@
         DumpString = '''
                                 BuyPlayerID:%d,
                                 Faction:%d,
+                                ServerOnly:%d,
                                 FactionPlayerCount:%d,
                                 FactionPlayerList:%s
                                 '''\
                                 %(
                                 self.BuyPlayerID,
                                 self.Faction,
+                                self.ServerOnly,
                                 self.FactionPlayerCount,
                                 "..."
                                 )
@@ -19332,6 +19339,62 @@
 
 
 #------------------------------------------------------
+# A3 55 炼体信息 #tagMCLianTiInfo
+
+class  tagMCLianTiInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("LianTiLV", c_ubyte),    #炼体等级
+                  ("EatItemCount", c_int),    #当前等级已吃丹个数
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA3
+        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 = 0xA3
+        self.SubCmd = 0x55
+        self.LianTiLV = 0
+        self.EatItemCount = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCLianTiInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A3 55 炼体信息 //tagMCLianTiInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                LianTiLV:%d,
+                                EatItemCount:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.LianTiLV,
+                                self.EatItemCount
+                                )
+        return DumpString
+
+
+m_NAtagMCLianTiInfo=tagMCLianTiInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLianTiInfo.Cmd,m_NAtagMCLianTiInfo.SubCmd))] = m_NAtagMCLianTiInfo
+
+
+#------------------------------------------------------
 # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo
 
 class  tagMCMagicWeaponInfo(Structure):

--
Gitblit v1.8.0