6373 【后端】【2.0】删除无用功能代码、封包、配置(页游领地争夺战)
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 02 领取领地争夺战每日奖励 #tagCMGetManorWarDailyAward
|
| | |
|
| | | class tagCMGetManorWarDailyAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), # 领地id
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | self.MapID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarDailyAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 02 领取领地争夺战每日奖励 //tagCMGetManorWarDailyAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarDailyAward=tagCMGetManorWarDailyAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarDailyAward.Cmd,m_NAtagCMGetManorWarDailyAward.SubCmd))] = m_NAtagCMGetManorWarDailyAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 01 领取领地争夺战参与奖 #tagCMGetManorWarJoinAward
|
| | |
|
| | | class tagCMGetManorWarJoinAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarJoinAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 01 领取领地争夺战参与奖 //tagCMGetManorWarJoinAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarJoinAward=tagCMGetManorWarJoinAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarJoinAward.Cmd,m_NAtagCMGetManorWarJoinAward.SubCmd))] = m_NAtagCMGetManorWarJoinAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 11 开服活动奖励 #tagCMOpenServerCampaignAward
|
| | |
|
| | | class tagCMOpenServerCampaignAward(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 01 通知领地争夺占领情况 #tagGCManorWarInfo
|
| | |
|
| | | class tagGCManorInfo(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)// 领地地图id
|
| | | FamilyID = 0 #(DWORD FamilyID)// 占领战盟id
|
| | | FNameLen = 0 #(BYTE FNameLen)// 战盟名字长度
|
| | | FamilyName = "" #(String FamilyName)// 战盟名 size = FNameLen
|
| | | LNameLen = 0 #(BYTE LNameLen)// 盟主名字长度
|
| | | LeaderName = "" #(String LeaderName)// 盟主名 size = LNameLen
|
| | | OccupyDays = 0 #(WORD OccupyDays)// 连续占领天数
|
| | | LastFamilyID = 0 #(DWORD LastFamilyID)// 上次占领的战盟id
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,self.FNameLen)
|
| | | self.LNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LeaderName,_pos = CommFunc.ReadString(_lpData, _pos,self.LNameLen)
|
| | | self.OccupyDays,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LastFamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | self.MapID = 0
|
| | | self.FamilyID = 0
|
| | | self.FNameLen = 0
|
| | | self.FamilyName = ""
|
| | | self.LNameLen = 0
|
| | | self.LeaderName = ""
|
| | | self.OccupyDays = 0
|
| | | self.LastFamilyID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.FamilyName)
|
| | | length += 1
|
| | | length += len(self.LeaderName)
|
| | | length += 2
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FamilyID)
|
| | | data = CommFunc.WriteBYTE(data, self.FNameLen)
|
| | | data = CommFunc.WriteString(data, self.FNameLen, self.FamilyName)
|
| | | data = CommFunc.WriteBYTE(data, self.LNameLen)
|
| | | data = CommFunc.WriteString(data, self.LNameLen, self.LeaderName)
|
| | | data = CommFunc.WriteWORD(data, self.OccupyDays)
|
| | | data = CommFunc.WriteDWORD(data, self.LastFamilyID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FamilyID:%d,
|
| | | FNameLen:%d,
|
| | | FamilyName:%s,
|
| | | LNameLen:%d,
|
| | | LeaderName:%s,
|
| | | OccupyDays:%d,
|
| | | LastFamilyID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FamilyID,
|
| | | self.FNameLen,
|
| | | self.FamilyName,
|
| | | self.LNameLen,
|
| | | self.LeaderName,
|
| | | self.OccupyDays,
|
| | | self.LastFamilyID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCManorWarInfo(Structure):
|
| | | Head = tagHead()
|
| | | ManorCnt = 0 #(BYTE ManorCnt)//领地个数
|
| | | ManorInfoList = list() #(vector<tagGCManorInfo> ManorInfoList)//领地信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ManorCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ManorCnt):
|
| | | temManorInfoList = tagGCManorInfo()
|
| | | _pos = temManorInfoList.ReadData(_lpData, _pos)
|
| | | self.ManorInfoList.append(temManorInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | self.ManorCnt = 0
|
| | | self.ManorInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.ManorCnt):
|
| | | length += self.ManorInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ManorCnt)
|
| | | for i in range(self.ManorCnt):
|
| | | data = CommFunc.WriteString(data, self.ManorInfoList[i].GetLength(), self.ManorInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ManorCnt:%d,
|
| | | ManorInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ManorCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCManorWarInfo=tagGCManorWarInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCManorWarInfo.Head.Cmd,m_NAtagGCManorWarInfo.Head.SubCmd))] = m_NAtagGCManorWarInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 06 多倍经验活动信息 #tagGCMultiExpRateInfo
|
| | |
|
| | | class tagGCMultiExpRateTime(Structure):
|
| | |
| | |
|
| | | m_NAtagMCFestivalLoginAwardState=tagMCFestivalLoginAwardState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFestivalLoginAwardState.Cmd,m_NAtagMCFestivalLoginAwardState.SubCmd))] = m_NAtagMCFestivalLoginAwardState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 02 领地占领每日奖励领奖情况 #tagMCManorDailyAward
|
| | |
|
| | | class tagMCManorDailyAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AwardRecord", c_int), # 按位表示每个领地领取情况;0-未领,1-已领
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCManorDailyAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 02 领地占领每日奖励领奖情况 //tagMCManorDailyAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCManorDailyAward=tagMCManorDailyAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorDailyAward.Cmd,m_NAtagMCManorDailyAward.SubCmd))] = m_NAtagMCManorDailyAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 01 通知领地战结果 #tagMCManorWarResult
|
| | |
|
| | | class tagMCManorWarResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), # 0-普通信息;1-活动结果总结
|
| | | ("Result", c_ubyte), # 战盟胜负情况;0-未知,1-胜利,2-失败
|
| | | ("JoinTime", c_int), # 活动时总参与时间,毫秒
|
| | | ("JoinAward", c_ubyte), # 参与奖状态;0-不可领,1-可领,2-已领
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | self.Type = 0
|
| | | self.Result = 0
|
| | | self.JoinTime = 0
|
| | | self.JoinAward = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCManorWarResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 01 通知领地战结果 //tagMCManorWarResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d,
|
| | | Result:%d,
|
| | | JoinTime:%d,
|
| | | JoinAward:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type,
|
| | | self.Result,
|
| | | self.JoinTime,
|
| | | self.JoinAward
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCManorWarResult=tagMCManorWarResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorWarResult.Cmd,m_NAtagMCManorWarResult.SubCmd))] = m_NAtagMCManorWarResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | #导入
|
| | | import GMCommon
|
| | | import ChConfig
|
| | | import PlayerManorWar
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | |
| | | queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
|
| | | queryKey = gmCmdDict.get(GMCommon.Def_GMKey_FuncKey, '')
|
| | |
|
| | | if queryType == 'accID': |
| | | #玩家账户 []
|
| | | GMCommon.GMTool_MapServer_Query(ChConfig.queryType_sqtPlayerByAccID, orderId,
|
| | | playerFind, gmCmdDict, 'GetPlayerFuncInfo', [orderId,queryKey], False)
|
| | | return
|
| | |
|
| | | if queryKey in ['ManorWar']:
|
| | | queryResult = 0
|
| | | if queryKey == 'ManorWar':
|
| | | queryResult = PlayerManorWar.GetManorWarFirstOrderInfo()
|
| | | |
| | | #执行成功
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, queryResult)
|
| | | else:
|
| | | if queryType == 'accID': |
| | | #玩家账户 []
|
| | | GMCommon.GMTool_MapServer_Query(ChConfig.queryType_sqtPlayerByAccID, orderId,
|
| | | playerFind, gmCmdDict, 'GetPlayerFuncInfo', [orderId,queryKey], False)
|
| | | return
|
| | | |
| | | #玩家名字 []
|
| | | GMCommon.GMTool_MapServer_Query(ChConfig.queryType_sqtPlayerByName, orderId,
|
| | | playerFind, gmCmdDict, 'GetPlayerFuncInfo', [orderId,queryKey], False)
|
| | | #玩家名字 []
|
| | | GMCommon.GMTool_MapServer_Query(ChConfig.queryType_sqtPlayerByName, orderId,
|
| | | playerFind, gmCmdDict, 'GetPlayerFuncInfo', [orderId,queryKey], False)
|
| | |
|
| | | return
|
| | |
|
| | |
| | | import GameWorldAverageLv
|
| | | import PlayerDBOper
|
| | | import PlayerGeTui
|
| | | #import PlayerManorWar
|
| | | import GameWorldBoss
|
| | | import PlayerCompensation
|
| | | import ReadChConfig
|
| | |
| | |
|
| | | # 仙盟联赛
|
| | | GameWorldFamilyWar.OnMapServerInitOK()
|
| | | # 领地争夺战
|
| | | #PlayerManorWar.OnMapServerInitOK()
|
| | |
|
| | | # 跨服服务器状态
|
| | | isCrossServerOpen = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
|
| | |
| | | import UpdatePlayerName
|
| | | import GameWorldBoss
|
| | | import PlayerFamilyBoss
|
| | | #import PlayerManorWar
|
| | | import PlayerBourse
|
| | | import PlayerZhuXianBoss
|
| | | import PlayerXMZZ
|
| | |
| | | #服务器开服自动逻辑处理 小时
|
| | | Def_Server_Hour = 'Def_Server_Hour'
|
| | |
|
| | | # 上次领地战活动时的开服天数
|
| | | Def_LastManorWarServerDay = "LastManorWarServerDay"
|
| | |
|
| | | # 交易所开关
|
| | | Def_BourseState = "BourseState"
|
| | |
|
| | |
| | | import PlayerFB
|
| | | import UpdatePlayerName
|
| | | import PlayerFamilyBoss
|
| | | import PlayerManorWar
|
| | | import GameWorldBoss
|
| | | import GameWorldFamilyWar
|
| | | #import PlayerFamilyTech
|
| | |
| | | elif notifyType == 2:
|
| | | PlayerUniversalGameRec.SendUniversalGameRecInfo(None, recType)
|
| | |
|
| | | return
|
| | | |
| | | # 领地争夺战拔旗消耗
|
| | | if callName =="ManorWarGetFlagCost":
|
| | | PlayerManorWar.ManorWarGetFlagCost(eval(resultName))
|
| | | return
|
| | | |
| | | # 领地争夺战获胜战盟
|
| | | if callName =="ManorWarWinner":
|
| | | PlayerManorWar.DoMapServerManorWarWinner(eval(resultName))
|
| | | return
|
| | |
|
| | | # 战盟副本boss开始、被击杀
|
| | |
| | |
|
| | | Def_Notify_WorldKey_FamilyActivityDayState = "FamilyActivityDayState" #战盟相关活动今日开启状态, 按位存储代表今日是否开启过
|
| | |
|
| | | Def_Notify_WorldKey_ManorWar = 'ManorWar' # 领地争夺活动状态
|
| | | Def_Notify_WorldKey_ManorWarWinFamilyID = 'ManorWarWinFamilyID_%s' # 领地争夺获胜战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarFamilyLeaderID = 'ManorWarFamilyLeaderID_%s' # 领地争夺占领的战盟盟主id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarTempFamilyID = 'ManorWarTempFamilyID_%s' # 领地争夺活动中临时占领的战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s' # 领地争夺上次占领的战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
|
| | |
|
| | | Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s' # 登录领取奖励开始时间,参数为活动类型
|
| | | Def_Notify_WorldKey_LoginAwardEndDate = 'LoginAwardEndDate_%s' # 登录领取奖励结束时间,参数为活动类型
|
| | |
|
| | |
| | | Def_Battle_Query # 查询
|
| | | ) = range(1, 4)
|
| | |
|
| | |
|
| | | #区域类型定义, 从5开始, C++定义到 IPY_GameWorld.gatMax 4
|
| | | (
|
| | | gatManor, # 领地区域, 领地战期间可PK, 反之为普通区域
|
| | | ) = range(5, 6) |
| | |
|
| | | # 游戏功能ID定义,需确保唯一,与PyGameFuncControl.txt中FuncId一致
|
| | | GameFuncID_Wing = 3 # 翅膀
|
| | | GameFuncID_Pet = 6 # 宠物,灵宠
|
| | |
| | | Def_UniversalGameRecType_CrossBossInfo, # 跨服boss信息
|
| | | Def_UniversalGameRecType_31,
|
| | | Def_UniversalGameRecType_32,
|
| | | Def_UniversalGameRecType_ManorWarInfo, # 领地争夺战占领结果33
|
| | | Def_UniversalGameRecType_33,
|
| | | Def_UniversalGameRecType_34,
|
| | | Def_UniversalGameRecType_35,
|
| | | Def_UniversalGameRecType_36,
|
| | |
| | | #家族相关活动类型定义
|
| | | Def_FamActivityList = (
|
| | | Def_FamActivity_War, # 战盟争霸
|
| | | Def_FamActivity_Manor, # 领地争夺
|
| | | ) = range(2)
|
| | | ) = range(1)
|
| | |
|
| | | #副本通关类型
|
| | | (
|
| | |
| | | PacketSubCMD_5=0x13
|
| | | PacketCallFunc_5=OnUnlockRuneHole
|
| | |
|
| | | ;领地争夺战
|
| | | [GameLogic_ManorWar]
|
| | | ScriptName = GameWorldLogic\FBProcess\GameLogic_ManorWar.py
|
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 2
|
| | |
|
| | | PacketCMD_1 = 0xAB
|
| | | PacketSubCMD_1 = 0x01
|
| | | PacketCallFunc_1 = OnGetManorWarJoinAward
|
| | |
|
| | | PacketCMD_2 = 0xAB
|
| | | PacketSubCMD_2 = 0x02
|
| | | PacketCallFunc_2 = OnGetManorWarDailyAward
|
| | |
|
| | |
|
| | | ;跨服PK竞技场
|
| | | [PlayerCrossRealmPK]
|
| | | ScriptName = Player\PlayerCrossRealmPK.py
|
| | |
| | |
|
| | | if GetIsNewGuy(tagPlayer):
|
| | | return ChConfig.Type_Relation_None, ChConfig.Def_PASysMessage_NotAttackNewGuy
|
| | | |
| | | #攻守双方同一队伍,不可PK,可加增益buff
|
| | | #if curPlayerAreaType not in [ShareDefine.gatManor] and CanAlikeTeam(curPlayer, tagPlayer):
|
| | | # #副本队友特殊判断
|
| | | # if not PlayerCanAttackTeamerInFB(curPlayer, tagPlayer): |
| | | # return ChConfig.Type_Relation_Friend , ChConfig.Def_PASysMessage_NotAttackTeam
|
| | |
|
| | | #恶意攻击的玩家默认都是敌人, 无论什么模式
|
| | | if IsMaliciousAttackPlayer(curPlayer, tagPlayer):
|
| | |
| | | Def_SkillID_TeamVIPBuff = 22000 # VIP队伍buff, 攻守同盟
|
| | | Def_SkillID_CostVipBuff = 61018 # CostVIPbuff
|
| | | Def_SkillID_FBEncourageBuff = 20051 # 副本鼓舞buff
|
| | | Def_SkillID_GetFlagFamilyBuff = 11506 # 战盟战获得夺旗战盟buff特效
|
| | | Def_SkillID_FreshmanGuideBuff = 21219 # 新手指导员buff
|
| | | Def_SkillID_PoisonAtkBuff = 25180 # 毒攻buff
|
| | | Def_SkillID_DropOwnerBuff = 20040 # 掉落归属buff
|
| | |
| | | Def_AreaType_SkillID_FreePK = 20010 # pk区
|
| | | Def_AreaType_SkillID_FamilyPK = 20012 # 家族区
|
| | | Def_AreaType_SkillID_Boss = 20008 # Boss区域
|
| | | Def_SkillID_ManorFlagArea = 20017 # 战旗区域buff,动态
|
| | | Def_SkillID_SitArea = 20009 # 打坐区域buff
|
| | | #----------------------------------------------------------------------
|
| | | #战斗类型
|
| | |
| | | #技能消失不重刷属性#(鞭炮,烟花,火烛)
|
| | | Def_Skill_Disappear_NoReflash = [Def_SkillID_Justice, #阵营
|
| | | Def_SkillID_Evil,
|
| | | Def_SkillID_GetFlagFamilyBuff,
|
| | | ]
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
| | | Def_PDict_FamilyBossFBAwardState = "FamilyBossFBAwardState_%s" # 家族boss副本领奖状态%s副本id
|
| | | Def_PDict_LastEnterFBPropertyID = "LastEnterFBPropertyID_%s" # 上次进入副本的propertyID%s副本id
|
| | | Def_PDict_LastEnterFBTick = "LastEnterFBTick_%s" # 上次进入副本的时间%s副本id
|
| | |
|
| | | Def_PDict_ManorWarJoinDay = "ManorWarJoinDay" # 上次参加领地争夺战时记录的开服天数
|
| | | Def_PDict_ManorWarContinueTick = "ManorWarContinueTick" # 领地争夺战在战场总时间
|
| | | Def_PDict_ManorWarJoinAwardState = "ManorWarJoinAwardState" # 领地战参与奖励情况0-不可领,1-可领,2-已领
|
| | | Def_PDict_ManorWarDailyAwardRecord = "ManorWarDailyAwardRecord" # 领地争夺战每日奖励领取记录,按位表示
|
| | |
|
| | | # 战斗力 Def_PDictType_FightPower
|
| | | Def_PDict_FightPower_Highest = "FightPower_Highest" # 历史最高总战斗力
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 02 领取领地争夺战每日奖励 #tagCMGetManorWarDailyAward
|
| | |
|
| | | class tagCMGetManorWarDailyAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), # 领地id
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | self.MapID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarDailyAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 02 领取领地争夺战每日奖励 //tagCMGetManorWarDailyAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarDailyAward=tagCMGetManorWarDailyAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarDailyAward.Cmd,m_NAtagCMGetManorWarDailyAward.SubCmd))] = m_NAtagCMGetManorWarDailyAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 01 领取领地争夺战参与奖 #tagCMGetManorWarJoinAward
|
| | |
|
| | | class tagCMGetManorWarJoinAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarJoinAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 01 领取领地争夺战参与奖 //tagCMGetManorWarJoinAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarJoinAward=tagCMGetManorWarJoinAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarJoinAward.Cmd,m_NAtagCMGetManorWarJoinAward.SubCmd))] = m_NAtagCMGetManorWarJoinAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 11 开服活动奖励 #tagCMOpenServerCampaignAward
|
| | |
|
| | | class tagCMOpenServerCampaignAward(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 01 通知领地争夺占领情况 #tagGCManorWarInfo
|
| | |
|
| | | class tagGCManorInfo(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)// 领地地图id
|
| | | FamilyID = 0 #(DWORD FamilyID)// 占领战盟id
|
| | | FNameLen = 0 #(BYTE FNameLen)// 战盟名字长度
|
| | | FamilyName = "" #(String FamilyName)// 战盟名 size = FNameLen
|
| | | LNameLen = 0 #(BYTE LNameLen)// 盟主名字长度
|
| | | LeaderName = "" #(String LeaderName)// 盟主名 size = LNameLen
|
| | | OccupyDays = 0 #(WORD OccupyDays)// 连续占领天数
|
| | | LastFamilyID = 0 #(DWORD LastFamilyID)// 上次占领的战盟id
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,self.FNameLen)
|
| | | self.LNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LeaderName,_pos = CommFunc.ReadString(_lpData, _pos,self.LNameLen)
|
| | | self.OccupyDays,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LastFamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | self.MapID = 0
|
| | | self.FamilyID = 0
|
| | | self.FNameLen = 0
|
| | | self.FamilyName = ""
|
| | | self.LNameLen = 0
|
| | | self.LeaderName = ""
|
| | | self.OccupyDays = 0
|
| | | self.LastFamilyID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.FamilyName)
|
| | | length += 1
|
| | | length += len(self.LeaderName)
|
| | | length += 2
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FamilyID)
|
| | | data = CommFunc.WriteBYTE(data, self.FNameLen)
|
| | | data = CommFunc.WriteString(data, self.FNameLen, self.FamilyName)
|
| | | data = CommFunc.WriteBYTE(data, self.LNameLen)
|
| | | data = CommFunc.WriteString(data, self.LNameLen, self.LeaderName)
|
| | | data = CommFunc.WriteWORD(data, self.OccupyDays)
|
| | | data = CommFunc.WriteDWORD(data, self.LastFamilyID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FamilyID:%d,
|
| | | FNameLen:%d,
|
| | | FamilyName:%s,
|
| | | LNameLen:%d,
|
| | | LeaderName:%s,
|
| | | OccupyDays:%d,
|
| | | LastFamilyID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FamilyID,
|
| | | self.FNameLen,
|
| | | self.FamilyName,
|
| | | self.LNameLen,
|
| | | self.LeaderName,
|
| | | self.OccupyDays,
|
| | | self.LastFamilyID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCManorWarInfo(Structure):
|
| | | Head = tagHead()
|
| | | ManorCnt = 0 #(BYTE ManorCnt)//领地个数
|
| | | ManorInfoList = list() #(vector<tagGCManorInfo> ManorInfoList)//领地信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ManorCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ManorCnt):
|
| | | temManorInfoList = tagGCManorInfo()
|
| | | _pos = temManorInfoList.ReadData(_lpData, _pos)
|
| | | self.ManorInfoList.append(temManorInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x01
|
| | | self.ManorCnt = 0
|
| | | self.ManorInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.ManorCnt):
|
| | | length += self.ManorInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ManorCnt)
|
| | | for i in range(self.ManorCnt):
|
| | | data = CommFunc.WriteString(data, self.ManorInfoList[i].GetLength(), self.ManorInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ManorCnt:%d,
|
| | | ManorInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ManorCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCManorWarInfo=tagGCManorWarInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCManorWarInfo.Head.Cmd,m_NAtagGCManorWarInfo.Head.SubCmd))] = m_NAtagGCManorWarInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 06 多倍经验活动信息 #tagGCMultiExpRateInfo
|
| | |
|
| | | class tagGCMultiExpRateTime(Structure):
|
| | |
| | |
|
| | | m_NAtagMCFestivalLoginAwardState=tagMCFestivalLoginAwardState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFestivalLoginAwardState.Cmd,m_NAtagMCFestivalLoginAwardState.SubCmd))] = m_NAtagMCFestivalLoginAwardState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 02 领地占领每日奖励领奖情况 #tagMCManorDailyAward
|
| | |
|
| | | class tagMCManorDailyAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AwardRecord", c_int), # 按位表示每个领地领取情况;0-未领,1-已领
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCManorDailyAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 02 领地占领每日奖励领奖情况 //tagMCManorDailyAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCManorDailyAward=tagMCManorDailyAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorDailyAward.Cmd,m_NAtagMCManorDailyAward.SubCmd))] = m_NAtagMCManorDailyAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 01 通知领地战结果 #tagMCManorWarResult
|
| | |
|
| | | class tagMCManorWarResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), # 0-普通信息;1-活动结果总结
|
| | | ("Result", c_ubyte), # 战盟胜负情况;0-未知,1-胜利,2-失败
|
| | | ("JoinTime", c_int), # 活动时总参与时间,毫秒
|
| | | ("JoinAward", c_ubyte), # 参与奖状态;0-不可领,1-可领,2-已领
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | self.Type = 0
|
| | | self.Result = 0
|
| | | self.JoinTime = 0
|
| | | self.JoinAward = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCManorWarResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 01 通知领地战结果 //tagMCManorWarResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d,
|
| | | Result:%d,
|
| | | JoinTime:%d,
|
| | | JoinAward:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type,
|
| | | self.Result,
|
| | | self.JoinTime,
|
| | | self.JoinAward
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCManorWarResult=tagMCManorWarResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorWarResult.Cmd,m_NAtagMCManorWarResult.SubCmd))] = m_NAtagMCManorWarResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | IPY_GameWorld.gatSafe:"安全区",
|
| | | IPY_GameWorld.gatFreePK:"自由PK区",
|
| | | IPY_GameWorld.gatFamilyPK:"家族区",
|
| | | ShareDefine.gatManor:"动态家族PK区"}
|
| | | }
|
| | | GameWorld.DebugAnswer(curPlayer, "区域%s: %s" % ([posX, posY], printDict.get(areaType, "异常")))
|
| | |
|
| | | gameMap = GameWorld.GetMap()
|
| | |
| | | # @return mapID
|
| | | # @remarks 函数详细说明.
|
| | | def __GetFBLogic_MapID(mapID):
|
| | | #ManorWarMapIDList = ReadChConfig.GetEvalChConfig("ManorWarMapID") |
| | | #if mapID in ManorWarMapIDList:
|
| | | # return 'ManorWar'
|
| | | mapID = FBCommon.GetRecordMapID(mapID)
|
| | | for key, value in ChConfig.Def_FB_MapID.items():
|
| | | if mapID in value:
|
| | |
| | | import ChConfig
|
| | | import AttackCommon
|
| | | import IPY_GameWorld
|
| | | import GameLogic_ManorWar
|
| | | import ShareDefine
|
| | | #---------------------------------------------------------------------
|
| | | #########################################################
|
| | | #Python的pos定义
|
| | |
| | | #家族区
|
| | | if effectID == ChConfig.Def_AreaType_SkillID_FamilyPK:
|
| | | areaType = IPY_GameWorld.gatFamilyPK
|
| | | |
| | | ##动态开启
|
| | | #if effectID == ChConfig.Def_SkillID_ManorFlagArea and GameLogic_ManorWar.CanManorWarAtk():
|
| | | # areaType = ShareDefine.gatManor
|
| | |
|
| | | #普通区
|
| | | return areaType
|
| | |
| | | import PlayerWing
|
| | | import PlayerExpandPackCfgMgr
|
| | | import PlayerWorldAverageLv
|
| | | import GameLogic_ManorWar
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PlayerViewCacheTube
|
| | |
| | | PyGameData.g_lastExitFBType[fbIndex] = [exitFBType, tick]
|
| | | #GameWorld.DebugLog("玩家离开副本:fbIndex=%s,exitFBType=%s, %s" % (fbIndex, exitFBType, PyGameData.g_lastExitFBType), curPlayer.GetPlayerID())
|
| | | FBLogic.DoExitFBLogic(curPlayer, tick)
|
| | | |
| | | GameLogic_ManorWar.DoExitFB(curPlayer, tick)
|
| | |
|
| | | #清空所有不属于自己的光环
|
| | | #__ClearNoMeAuraBuff(curPlayer)
|
| | |
| | | # ReloadModule.DoMapServerScriptReload(value, tick)
|
| | | #===============================================================================================
|
| | |
|
| | | #领地争夺战
|
| | | #elif key == ShareDefine.Def_Notify_WorldKey_ManorWar:
|
| | | # GameLogic_ManorWar.OnManorWarStateChange(value, tick)
|
| | | |
| | | # 跨服PK
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID:
|
| | | PlayerCrossRealmPK.OnCrossRealmPKSeasonChange(value)
|
| | |
| | |
|
| | | Def_Notify_WorldKey_FamilyActivityDayState = "FamilyActivityDayState" #战盟相关活动今日开启状态, 按位存储代表今日是否开启过
|
| | |
|
| | | Def_Notify_WorldKey_ManorWar = 'ManorWar' # 领地争夺活动状态
|
| | | Def_Notify_WorldKey_ManorWarWinFamilyID = 'ManorWarWinFamilyID_%s' # 领地争夺获胜战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarFamilyLeaderID = 'ManorWarFamilyLeaderID_%s' # 领地争夺占领的战盟盟主id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarTempFamilyID = 'ManorWarTempFamilyID_%s' # 领地争夺活动中临时占领的战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarLastFamilyID = 'ManorWarLastFamilyID_%s' # 领地争夺上次占领的战盟id,%s地图id
|
| | | Def_Notify_WorldKey_ManorWarServerDay = 'ManorWarServerDay' # 领地战活动时的开服天数
|
| | |
|
| | | Def_Notify_WorldKey_LoginAwardStartDate = 'LoginAwardStartDate_%s' # 登录领取奖励开始时间,参数为活动类型
|
| | | Def_Notify_WorldKey_LoginAwardEndDate = 'LoginAwardEndDate_%s' # 登录领取奖励结束时间,参数为活动类型
|
| | |
|
| | |
| | | Def_Battle_Query # 查询
|
| | | ) = range(1, 4)
|
| | |
|
| | |
|
| | | #区域类型定义, 从5开始, C++定义到 IPY_GameWorld.gatMax 4
|
| | | (
|
| | | gatManor, # 领地区域, 领地战期间可PK, 反之为普通区域
|
| | | ) = range(5, 6) |
| | |
|
| | | # 游戏功能ID定义,需确保唯一,与PyGameFuncControl.txt中FuncId一致
|
| | | GameFuncID_Wing = 3 # 翅膀
|
| | | GameFuncID_Pet = 6 # 宠物,灵宠
|
| | |
| | | Def_UniversalGameRecType_CrossBossInfo, # 跨服boss信息
|
| | | Def_UniversalGameRecType_31,
|
| | | Def_UniversalGameRecType_32,
|
| | | Def_UniversalGameRecType_ManorWarInfo, # 领地争夺战占领结果33
|
| | | Def_UniversalGameRecType_33,
|
| | | Def_UniversalGameRecType_34,
|
| | | Def_UniversalGameRecType_35,
|
| | | Def_UniversalGameRecType_36,
|
| | |
| | | #家族相关活动类型定义
|
| | | Def_FamActivityList = (
|
| | | Def_FamActivity_War, # 战盟争霸
|
| | | Def_FamActivity_Manor, # 领地争夺
|
| | | ) = range(2)
|
| | | ) = range(1)
|
| | |
|
| | | #副本通关类型
|
| | | (
|
| | |
| | | import FBLogic
|
| | | import ItemCommon
|
| | | import OperControlManager
|
| | | import GameLogic_ManorWar
|
| | | import PetControl
|
| | | import ReadChConfig
|
| | | import DataRecordPack
|
| | | import ChItem
|
| | | import PlayerActivity
|
| | | #import ChItem
|
| | | import ShareDefine
|
| | | import PlayerGreatMaster
|
| | | import PlayerHorse
|
| | |
| | | import SkillShell
|
| | | import FBCommon
|
| | | import IpyGameDataPY
|
| | | import EquipZhuXian
|
| | | #import EquipZhuXian
|
| | | #---------------------------------------------------------------------
|
| | | GameWorld.ImportAll("Script\\Skill\\" , "GameSkills")
|
| | | GameWorld.ImportAll("Script\\Skill\\" , "GameBuffs")
|
| | |
| | | #GameWorld.Log("删除场景Buff %d"%skillID)
|
| | | processResult = True
|
| | | continue
|
| | | else:
|
| | | # 非领地战期间, 该区域有领地旗buff, 删除区域buff
|
| | | if skillID == ChConfig.Def_SkillID_ManorFlagArea and not GameLogic_ManorWar.CanManorWarAtk():
|
| | | mapBuffManager.DeleteBuffByIndex(index)
|
| | | ClearBuffEffectBySkillID(curPlayer, skillID, ownerID, ownerType)
|
| | | processResult = True
|
| | | #GameWorld.DebugLog("非领地战期间, 该区域有领地旗buff, 删除区域buff")
|
| | | continue
|
| | |
|
| | | index += 1
|
| | |
|
| | |
| | | continue
|
| | | if findBuff.GetSkill().GetSkillLV() > curSkill.GetSkillLV():
|
| | | continue
|
| | | |
| | | if skillTypeID == ChConfig.Def_SkillID_ManorFlagArea and not GameLogic_ManorWar.CanManorWarAtk():
|
| | | #GameWorld.DebugLog(" i=%s,effectID=%s,skillID=%s, 该位置有buff, 非领地战期间, 不添加" % (i, effectID, skillTypeID))
|
| | | continue
|
| | | |
| | | #添加场景buff
|
| | | isOK = BuffSkill.AddBuffNoRefreshState(curPlayer, IPY_GameWorld.bfMapBuff, curSkill, tick)
|
| | | processResult = processResult or isOK
|