9748 【BT7】跨服BOSS定时活动(增加常规跨服分区ID通知C010)
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|
| | |
| | | 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:
|
| | |
| | | if not IsCrossServerOpen():
|
| | | return
|
| | |
|
| | | Sync_CrossZoneInfo(curPlayer)
|
| | | LoginDoUnNotifyCrossMsg(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | 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
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|