From af9f6c691fdab8d94d78266d4e62785cce07ade0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 八月 2022 17:19:46 +0800
Subject: [PATCH] 9704 【后端】【越南】【BT7】【主干】跨服聊天支持全服不根据分区划分
---
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