From 25d85f98970d10a5489256c5066840530c04d20c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 17:01:56 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(召集队伍可设置是否仅召集本服玩家)

---
 ServerPython/CoreServerGroup/GameServer/PyNetPack.ini                                                |    6 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py |    3 
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py                    |   74 ++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py                   |    1 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py                   |   68 ++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py               |    7 +
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py                                        |   68 ++++++++++++++++
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                        |    1 
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                                    |    7 +
 9 files changed, 228 insertions(+), 7 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
index 5d94c14..d412561 100644
--- a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
+++ b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
@@ -369,7 +369,7 @@
 Writer = hxp
 Releaser = hxp
 RegType = 0
-RegisterPackCount = 2
+RegisterPackCount = 3
 
 PacketCMD_1=0xC0
 PacketSubCMD_1=0x07
@@ -379,6 +379,10 @@
 PacketSubCMD_2=0x08
 PacketCallFunc_2=OnCrossBattlefieldCallKick
 
+PacketCMD_3=0xC0
+PacketSubCMD_3=0x03
+PacketCallFunc_3=OnCrossBattlefieldCallChange
+
 [CrossRealmPK]
 ScriptName = GameWorldLogic\CrossRealmPK.py
 Writer = hxp
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index f1a2139..69dec41 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -3987,6 +3987,66 @@
 
 
 #------------------------------------------------------
+# C0 09 跨服战场召集场次修改 #tagCGCrossBattlefieldCallChange
+
+class  tagCGCrossBattlefieldCallChange(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("Hour", c_ubyte),    #战场开启时
+                  ("Minute", c_ubyte),    #战场开启分
+                  ("ServerOnly", c_ubyte),    #是否仅本服玩家可加入,0-否,1-是
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC0
+        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 = 0xC0
+        self.SubCmd = 0x09
+        self.Hour = 0
+        self.Minute = 0
+        self.ServerOnly = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCGCrossBattlefieldCallChange)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C0 09 跨服战场召集场次修改 //tagCGCrossBattlefieldCallChange:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                Hour:%d,
+                                Minute:%d,
+                                ServerOnly:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.Hour,
+                                self.Minute,
+                                self.ServerOnly
+                                )
+        return DumpString
+
+
+m_NAtagCGCrossBattlefieldCallChange=tagCGCrossBattlefieldCallChange()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGCrossBattlefieldCallChange.Cmd,m_NAtagCGCrossBattlefieldCallChange.SubCmd))] = m_NAtagCGCrossBattlefieldCallChange
+
+
+#------------------------------------------------------
 # C0 08 跨服战场召集场次踢人 #tagCGCrossBattlefieldCallKick
 
 class  tagCGCrossBattlefieldCallKick(Structure):
@@ -19071,6 +19131,7 @@
                   ("Hour", c_ubyte),    #战场开启时
                   ("Minute", c_ubyte),    #战场开启分
                   ("Faction", c_ubyte),    #阵营 1-红;2-蓝
+                  ("ServerOnly", c_ubyte),    #是否仅本服玩家可加入,0-否,1-是
                   ]
 
     def __init__(self):
@@ -19090,6 +19151,7 @@
         self.Hour = 0
         self.Minute = 0
         self.Faction = 0
+        self.ServerOnly = 0
         return
 
     def GetLength(self):
@@ -19104,14 +19166,16 @@
                                 SubCmd:%s,
                                 Hour:%d,
                                 Minute:%d,
-                                Faction:%d
+                                Faction:%d,
+                                ServerOnly:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.Hour,
                                 self.Minute,
-                                self.Faction
+                                self.Faction,
+                                self.ServerOnly
                                 )
         return DumpString
 
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 0389a55..aaff9fe 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,
                                 "..."
                                 )
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
index 10a30f7..8869238 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -54,6 +54,7 @@
 value2:hmNum            时分场次编号
 value3:playerID        购买的玩家ID
 value4:factionID        所选择的阵营ID
+value5:serverOnly        是否仅本服玩家可加入,0-否,1-是
 
 StrValue3:[callPlayerID,...]    召集来的玩家ID,包含自己
 '''
@@ -71,6 +72,7 @@
         self.zoneID = 0
         self.playerID = 0
         self.factionID = 0
+        self.serverOnly = 0
         self.callPlayerIDList = []
         
         # 子服用,跨服服务器同步数据时负值; 不存库,玩家属性缓存信息,本服玩家取自己服务器最新缓存
@@ -88,7 +90,7 @@
                                              "RealmLV":cacheDict["RealmLV"], "FightPower":cacheDict["FightPower"]}
             
         return {"buyTime":self.buyTime, "hmNum":self.hmNum, "zoneID":self.zoneID, "playerID":self.playerID, "factionID":self.factionID,
-                "callPlayerIDList":self.callPlayerIDList, "callPlayerDict":self.callPlayerDict}
+                "serverOnly":self.serverOnly, "callPlayerIDList":self.callPlayerIDList, "callPlayerDict":self.callPlayerDict}
         
     def SetAttr(self, attrDict):
         for k, v in attrDict.items():
@@ -112,6 +114,7 @@
         hmNum = recData.GetValue2()
         playerID = recData.GetValue3()
         factionID = recData.GetValue4()
+        serverOnly = recData.GetValue5()
         
         strValue3 = recData.GetStrValue3()
             
@@ -121,6 +124,7 @@
         buyRec.hmNum = hmNum
         buyRec.playerID = playerID
         buyRec.factionID = factionID
+        buyRec.serverOnly = serverOnly
         buyRec.callPlayerIDList = eval(strValue3) if strValue3 else []
         
         buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)
@@ -152,6 +156,7 @@
                 recData.SetValue2(buyRec.hmNum)
                 recData.SetValue3(buyRec.playerID)
                 recData.SetValue4(buyRec.factionID)
+                recData.SetValue5(buyRec.serverOnly)
                 
                 recData.SetStrValue3(str(buyRec.callPlayerIDList).replace(" ", ""))
                 
@@ -655,6 +660,7 @@
     openHour = msgData["openHour"]
     openMinute = msgData["openMinute"]
     faction = msgData["faction"]
+    serverOnly = msgData.get("serverOnly", 0)
     
     hmNum = GetHMNum(openHour, openMinute)
     
@@ -707,9 +713,11 @@
     buyRec.playerID = playerID
     buyRec.factionID = faction
     buyRec.callPlayerIDList = [playerID]
+    buyRec.serverOnly = serverOnly
     buyPlayerInfo[playerID] = buyRec
     
-    GameWorld.DebugLog("玩家购买开启召集场次! zoneID=%s,openHour=%s,openMinute=%s" % (zoneID, openHour, openMinute), playerID)
+    GameWorld.DebugLog("玩家购买开启召集场次! zoneID=%s,openHour=%s,openMinute=%s,faction=%s,serverOnly=%s" 
+                       % (zoneID, openHour, openMinute, faction, serverOnly), playerID)
     
     # 上榜
     billboardCallCountLimit = IpyGameDataPY.GetFuncCfg("CrossBattlefieldBillboard", 1) # 周召集榜上榜至少次数
@@ -817,6 +825,36 @@
     
     serverGroupIDList = zoneIpyData.GetServerGroupIDList()
     msgData.update({"opType":"CallKick"})
+    Send_CrossServerMsg_BattlefieldBuy(zoneID, serverGroupIDList, msgData)
+    return
+
+def ClientServerMsg_BattlefieldCallChange(serverGroupID, msgData):
+    
+    openHour = msgData["openHour"]
+    openMinute = msgData["openMinute"]
+    serverOnly = msgData["serverOnly"]
+    playerID = msgData["playerID"]
+    
+    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
+    if not zoneIpyData:
+        return
+    zoneID = zoneIpyData.GetZoneID()
+    
+    hmNum = GetHMNum(openHour, openMinute)
+    buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)
+    if playerID not in buyPlayerInfo:
+        GameWorld.ErrLog("跨服战场不存在该玩家的召集队伍! hmNum=%s,playerID=%s" % (hmNum, playerID), playerID)
+        return
+    buyRec = buyPlayerInfo[playerID]
+    buyRec.serverOnly = 1 if serverOnly else 0
+    
+    GameWorld.DebugLog("玩家召集队伍修改! zoneID=%s,openHour=%s,openMinute=%s,serverOnly=%s" 
+                       % (zoneID, openHour, openMinute, serverOnly), playerID)
+    
+    #SyncMapServerCrossBattlefieldBuyInfo()
+    
+    serverGroupIDList = zoneIpyData.GetServerGroupIDList()
+    msgData.update({"opType":"CallChange"})
     Send_CrossServerMsg_BattlefieldBuy(zoneID, serverGroupIDList, msgData)
     return
 
@@ -1019,6 +1057,9 @@
     elif opType == "CallKick":
         pass
     
+    elif opType == "CallChange":
+        pass
+    
     return
 
 def SyncCrossBattlefieldBuyInfo(curPlayer, zoneID, hmNum=None):
@@ -1041,6 +1082,7 @@
             buyPlayerPack = ChPyNetSendPack.tagGCCrossBattlefieldBuyPlayer()
             buyPlayerPack.BuyPlayerID = buyPlayerID
             buyPlayerPack.Faction = buyRec.factionID
+            buyPlayerPack.ServerOnly = buyRec.serverOnly
             buyPlayerPack.FactionPlayerList = []
             
             for callPlayerID in buyRec.callPlayerIDList:
@@ -1126,6 +1168,11 @@
         GameWorld.DebugLog("召集人数已满! hmNum=%s,buyPlayerID=%s,callPlayerIDList=%s" % (hmNum, buyPlayerID, buyRec.callPlayerIDList), playerID)
         return
     
+    if buyRec.serverOnly and not PlayerControl.GetDBPlayerAccIDByID(buyPlayerID):
+        PlayerControl.NotifyCode(curPlayer, "CrossBattlefieldCallServerOnly")
+        #GameWorld.DebugLog("非本服玩家,无法加入其购买的召集队伍! hmNum=%s,buyPlayerID=%s,serverOnly=%s" % (hmNum, buyPlayerID, buyRec.serverOnly), playerID)
+        return
+    
     # 请求查询跨服服务器
     dataMsg = {"openHour":openHour, "openMinute":openMinute, "buyPlayerID":buyPlayerID, "tagPlayerID":tagPlayerID, "playerID":playerID}
     CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallJoin, dataMsg)
@@ -1190,3 +1237,26 @@
     CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallKick, dataMsg)
     return
 
+#// C0 09 跨服战场召集场次修改 #tagCGCrossBattlefieldCallChange
+#
+#struct    tagCGCrossBattlefieldCallChange
+#{
+#    tagHead        Head;
+#    BYTE    Hour;        //战场开启时
+#    BYTE    Minute;        //战场开启分
+#    BYTE    ServerOnly;    //是否仅本服玩家可加入,0-否,1-是
+#};
+def OnCrossBattlefieldCallChange(index, clientData, tick):
+    if GameWorld.IsCrossServer():
+        return
+    
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    playerID = curPlayer.GetPlayerID()
+    openHour = clientData.Hour
+    openMinute = clientData.Minute
+    serverOnly = clientData.ServerOnly
+    
+    # 请求查询跨服服务器
+    dataMsg = {"openHour":openHour, "openMinute":openMinute, "serverOnly":serverOnly, "playerID":playerID}
+    CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallChange, dataMsg)
+    return
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 4ab62c3..5920276 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1414,6 +1414,7 @@
 ClientServerMsg_AddBuff = "AddBuff"                     # 添加BUFF
 ClientServerMsg_LuckyCloudBuy = "LuckyCloudBuy"         # 幸运云购
 ClientServerMsg_BattlefieldBuyOpen = "BattlefieldBuyOpen"   # 跨服战场购买召集
+ClientServerMsg_BattlefieldCallChange = "BattlefieldCallChange"  # 跨服战场召集 - 修改
 ClientServerMsg_BattlefieldCallJoin = "BattlefieldCallJoin"   # 跨服战场召集 - 加入
 ClientServerMsg_BattlefieldCallKick = "BattlefieldCallKick"   # 跨服战场召集 - 踢出
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index f1a2139..69dec41 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -3987,6 +3987,66 @@
 
 
 #------------------------------------------------------
+# C0 09 跨服战场召集场次修改 #tagCGCrossBattlefieldCallChange
+
+class  tagCGCrossBattlefieldCallChange(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("Hour", c_ubyte),    #战场开启时
+                  ("Minute", c_ubyte),    #战场开启分
+                  ("ServerOnly", c_ubyte),    #是否仅本服玩家可加入,0-否,1-是
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC0
+        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 = 0xC0
+        self.SubCmd = 0x09
+        self.Hour = 0
+        self.Minute = 0
+        self.ServerOnly = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCGCrossBattlefieldCallChange)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C0 09 跨服战场召集场次修改 //tagCGCrossBattlefieldCallChange:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                Hour:%d,
+                                Minute:%d,
+                                ServerOnly:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.Hour,
+                                self.Minute,
+                                self.ServerOnly
+                                )
+        return DumpString
+
+
+m_NAtagCGCrossBattlefieldCallChange=tagCGCrossBattlefieldCallChange()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGCrossBattlefieldCallChange.Cmd,m_NAtagCGCrossBattlefieldCallChange.SubCmd))] = m_NAtagCGCrossBattlefieldCallChange
+
+
+#------------------------------------------------------
 # C0 08 跨服战场召集场次踢人 #tagCGCrossBattlefieldCallKick
 
 class  tagCGCrossBattlefieldCallKick(Structure):
@@ -19071,6 +19131,7 @@
                   ("Hour", c_ubyte),    #战场开启时
                   ("Minute", c_ubyte),    #战场开启分
                   ("Faction", c_ubyte),    #阵营 1-红;2-蓝
+                  ("ServerOnly", c_ubyte),    #是否仅本服玩家可加入,0-否,1-是
                   ]
 
     def __init__(self):
@@ -19090,6 +19151,7 @@
         self.Hour = 0
         self.Minute = 0
         self.Faction = 0
+        self.ServerOnly = 0
         return
 
     def GetLength(self):
@@ -19104,14 +19166,16 @@
                                 SubCmd:%s,
                                 Hour:%d,
                                 Minute:%d,
-                                Faction:%d
+                                Faction:%d,
+                                ServerOnly:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.Hour,
                                 self.Minute,
-                                self.Faction
+                                self.Faction,
+                                self.ServerOnly
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 0389a55..aaff9fe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/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,
                                 "..."
                                 )
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
index 0f4320d..5de75dc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
@@ -64,6 +64,7 @@
 #    BYTE    Hour;        //战场开启时
 #    BYTE    Minute;        //战场开启分
 #    BYTE    Faction;        //阵营 1-红;2-蓝
+#    BYTE    ServerOnly;    //是否仅本服玩家可加入,0-否,1-是
 #};
 def OnCrossBattlefieldBuyOpen(index, clientData, tick):
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
@@ -71,6 +72,7 @@
     hour = clientData.Hour
     minute = clientData.Minute
     faction = clientData.Faction
+    serverOnly = clientData.ServerOnly
     
     if GameWorld.IsCrossServer():
         GameWorld.DebugLog("跨服服务器无法发起匹配!", playerID)
@@ -124,6 +126,7 @@
         return
     
     dataMsg = {"openHour":hour, "openMinute":minute, "faction":faction, "todayBuyOpenCount":todayBuyOpenCount,
+               "serverOnly":serverOnly,
                "accID":curPlayer.GetAccID(),
                "playerID":playerID,
                "playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer),
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 4ab62c3..5920276 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1414,6 +1414,7 @@
 ClientServerMsg_AddBuff = "AddBuff"                     # 添加BUFF
 ClientServerMsg_LuckyCloudBuy = "LuckyCloudBuy"         # 幸运云购
 ClientServerMsg_BattlefieldBuyOpen = "BattlefieldBuyOpen"   # 跨服战场购买召集
+ClientServerMsg_BattlefieldCallChange = "BattlefieldCallChange"  # 跨服战场召集 - 修改
 ClientServerMsg_BattlefieldCallJoin = "BattlefieldCallJoin"   # 跨服战场召集 - 加入
 ClientServerMsg_BattlefieldCallKick = "BattlefieldCallKick"   # 跨服战场召集 - 踢出
 

--
Gitblit v1.8.0