hxp
2022-11-11 b0e150a77873e570c2ca672daba998c35f7a3dfa
9748 【BT7】跨服BOSS定时活动(增加常规跨服分区ID通知C010)
3个文件已修改
127 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -15200,6 +15200,58 @@
#------------------------------------------------------
# C0 10 跨服所属分区信息 #tagGCCrossZoneInfo
class  tagGCCrossZoneInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("CommZoneID", c_ubyte),    # 所属常规分区ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x10
        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 = 0x10
        self.CommZoneID = 0
        return
    def GetLength(self):
        return sizeof(tagGCCrossZoneInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 10 跨服所属分区信息 //tagGCCrossZoneInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                CommZoneID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.CommZoneID
                                )
        return DumpString
m_NAtagGCCrossZoneInfo=tagGCCrossZoneInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossZoneInfo.Cmd,m_NAtagGCCrossZoneInfo.SubCmd))] = m_NAtagGCCrossZoneInfo
#------------------------------------------------------
# C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo
class  tagGCLuckyCloudBuyLotteryRec(Structure):
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
@@ -92,6 +92,21 @@
        ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition(zoneTypeName, {"CrossZoneName":crossZoneName}, True)
    return ipyDataList
def GetServerCommCrossZoneID(serverGroupID):
    ## 获取跨服常规分区
    zoneTypeName = "CrossZoneComm"
    crossZoneName = GameWorld.GetCrossZoneName()
    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition(zoneTypeName, {"CrossZoneName":crossZoneName}, True)
    if not ipyDataList:
        return 0
    for ipyData in ipyDataList:
        serverGroupIDList = ipyData.GetServerGroupIDList()
        for serverGroupIDInfo in serverGroupIDList:
            if (isinstance(serverGroupIDInfo, tuple) and serverGroupIDInfo[0] <= serverGroupID <= serverGroupIDInfo[1]) \
                or (isinstance(serverGroupIDInfo, int) and serverGroupIDInfo == serverGroupID):
                return ipyData.GetZoneID()
    return 0
def GetServerCrossZoneMapIpyData(zoneID, mapID):
    ## 获取本服对应跨服玩法分区地图信息 - 仅适用于固定地图及虚拟分线的跨服玩法
    if mapID not in ChConfig.Def_CrossZoneMapTableName:
@@ -434,6 +449,7 @@
    if not IsCrossServerOpen():
        return
    
    Sync_CrossZoneInfo(curPlayer)
    LoginDoUnNotifyCrossMsg(curPlayer)
    return
    
@@ -467,5 +483,8 @@
        curPlayer.MapServer_QueryPlayerResult(0, 0, callName, msgInfo, len(msgInfo))
    return
def Sync_CrossZoneInfo(curPlayer):
    clientPack = ChPyNetSendPack.tagGCCrossZoneInfo()
    clientPack.CommZoneID = GetServerCommCrossZoneID(GameWorld.GetServerGroupID())
    NetPackCommon.SendFakePack(curPlayer, clientPack)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -15200,6 +15200,58 @@
#------------------------------------------------------
# C0 10 跨服所属分区信息 #tagGCCrossZoneInfo
class  tagGCCrossZoneInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("CommZoneID", c_ubyte),    # 所属常规分区ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x10
        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 = 0x10
        self.CommZoneID = 0
        return
    def GetLength(self):
        return sizeof(tagGCCrossZoneInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 10 跨服所属分区信息 //tagGCCrossZoneInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                CommZoneID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.CommZoneID
                                )
        return DumpString
m_NAtagGCCrossZoneInfo=tagGCCrossZoneInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossZoneInfo.Cmd,m_NAtagGCCrossZoneInfo.SubCmd))] = m_NAtagGCCrossZoneInfo
#------------------------------------------------------
# C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo
class  tagGCLuckyCloudBuyLotteryRec(Structure):