10241 【越南】【砍树】【主干】【港台】古宝养成(增加古宝养成活动;任务活动增加古宝寻宝任务类型,任务支持配置循环轮次;)
| | |
| | | WORD FamilyTemplateID; //仙盟排行模板编号
|
| | | };
|
| | |
|
| | | //古宝养成活动时间表
|
| | |
|
| | | struct tagActGubao
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | list PlatformList; //活动平台列表["平台A", "平台A", ...],配[]代表所有
|
| | | list ServerGroupIDList; //服务器ID列表
|
| | | BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | char JoinStartTime; //参与开始时间点
|
| | | char JoinEndTime; //参与结束时间点
|
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | };
|
| | |
|
| | | //古宝养成活动跨服表
|
| | |
|
| | | struct tagCrossActGubao
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char ActGroupName; //活动组名(同组活动的名字需相同)
|
| | | BYTE ZoneID; //组内分组编号
|
| | | list ServerIDRangeList; //活动的账号服务器ID范围列表 [[serverIDA, serverIDB], ...]
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | char JoinStartTime; //参与开始时间点
|
| | | char JoinEndTime; //参与结束时间点
|
| | | WORD RankLimitPersonal; //个人上榜积分限制
|
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | };
|
| | |
|
| | | //古宝养成榜单模版表
|
| | |
|
| | | struct tagActGubaoBillTemp
|
| | | {
|
| | | DWORD _TemplateID; //模板编号
|
| | | BYTE Rank; //名次
|
| | | list AwardItemList; //奖励物品列表[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //仙匣秘境活动时间表
|
| | |
|
| | | struct tagActXianXiaMJ
|
| | |
| | | list MemAwardItemList; //仙盟榜成员奖励物品信息列表[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //古宝养成活动时间表
|
| | |
|
| | | struct tagActGubao
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | char JoinStartTime; //参与开始时间点
|
| | | char JoinEndTime; //参与结束时间点
|
| | | WORD LVLimit; //限制等级
|
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | };
|
| | |
|
| | | //古宝养成榜单模版表
|
| | |
|
| | | struct tagActGubaoBillTemp
|
| | | {
|
| | | DWORD _TemplateID; //模板编号
|
| | | BYTE Rank; //名次
|
| | | list AwardItemList; //奖励物品列表[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //仙匣秘境活动时间表
|
| | |
|
| | | struct tagActXianXiaMJ
|
| | |
| | | BYTE IsDayReset; //是否每天重置
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | BYTE TemplateID; //登录奖励模板编号
|
| | | BYTE RoundMax; //任务最大轮次
|
| | | };
|
| | |
|
| | | //任务活动模板表
|
| | |
| | | ShareDefine.Def_BT_BossTrialSubmitFamily : 100, #boss凭证仙盟 (boss历练活动)
|
| | | ShareDefine.Def_BT_BossTrialSubmitFamilyBak : 100, #boss凭证仙盟 (boss历练活动 - 上一期)
|
| | | ShareDefine.Def_BT_XianXiaMJScore : 200, #仙匣秘境积分榜 (仙匣秘境活动)
|
| | | ShareDefine.Def_BT_GubaoScore : 200, #古宝养成积分榜 (古宝养成活动)
|
| | | }
|
| | |
|
| | | #排行榜保存类型(和BillboardType匹配), 默认保存, 如果不保存,可配置进去
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 81 古宝养成活动信息 #tagMCActGubaoInfo
|
| | |
|
| | | class tagMCActGubaoItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGubaoItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 81 古宝养成活动信息 //tagMCActGubaoInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGubaoBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActGubaoItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActGubaoItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGubaoInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x81
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCActGubaoBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x81
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.LimitLV = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | LimitLV:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.LimitLV,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGubaoInfo=tagMCActGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoInfo.Head.Cmd,m_NAtagMCActGubaoInfo.Head.SubCmd))] = m_NAtagMCActGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 82 古宝养成活动玩家信息 #tagMCActGubaoPlayerInfo
|
| | |
|
| | | class tagMCActGubaoPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("Score", c_int), # 当前积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x82
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x82
|
| | | self.ActNum = 0
|
| | | self.Score = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGubaoPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 82 古宝养成活动玩家信息 //tagMCActGubaoPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | Score:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.Score
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGubaoPlayerInfo=tagMCActGubaoPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoPlayerInfo.Cmd,m_NAtagMCActGubaoPlayerInfo.SubCmd))] = m_NAtagMCActGubaoPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo
|
| | |
|
| | | class tagMCActHorsePetFeastTime(Structure):
|
| | |
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | TaskCount = 0 #(BYTE TaskCount)
|
| | | TaskList = list() #(vector<tagMCActTask> TaskList)// 任务列表
|
| | | RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次,当小于等于1时代表不循环
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | temTaskList = tagMCActTask()
|
| | | _pos = temTaskList.ReadData(_lpData, _pos)
|
| | | self.TaskList.append(temTaskList)
|
| | | self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LimitLV = 0
|
| | | self.TaskCount = 0
|
| | | self.TaskList = list()
|
| | | self.RoundMax = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.TaskCount):
|
| | | length += self.TaskList[i].GetLength()
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.TaskCount)
|
| | | for i in range(self.TaskCount):
|
| | | data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RoundMax)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | TaskCount:%d,
|
| | | TaskList:%s
|
| | | TaskList:%s,
|
| | | RoundMax:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.TaskCount,
|
| | | "..."
|
| | | "...",
|
| | | self.RoundMax
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardRecordList = list() #(vector<DWORD> AwardRecordList)// 任务ID领奖记录值列表,根据任务ID位判断是否已领取,一个记录值存31位 [记录值0, 记录值1, ...]
|
| | | RoundNum = 0 #(BYTE RoundNum)// 当前轮次,从1开始
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.AwardCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.AwardRecordList.append(value)
|
| | | self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ActNum = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardRecordList = list()
|
| | | self.RoundNum = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.AwardCount
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteDWORD(data, self.AwardRecordList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.RoundNum)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | AwardCount:%d,
|
| | | AwardRecordList:%s
|
| | | AwardRecordList:%s,
|
| | | RoundNum:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | "...",
|
| | | self.RoundNum
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 83 古宝养成跨服活动信息 #tagMCCrossActGubaoInfo
|
| | |
|
| | | class tagMCCrossActGubaoItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCrossActGubaoItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 83 古宝养成跨服活动信息 //tagMCCrossActGubaoInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActGubaoBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCCrossActGubaoItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCCrossActGubaoItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActGubaoInfo(Structure):
|
| | | Head = tagHead()
|
| | | ServerInfoLen = 0 #(BYTE ServerInfoLen)
|
| | | ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服
|
| | | GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜积分保底限制;
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCCrossActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x83
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen)
|
| | | self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCCrossActGubaoBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x83
|
| | | self.ServerInfoLen = 0
|
| | | self.ServerIDRangeInfo = ""
|
| | | self.GroupValue1 = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.RankLimitPersonal = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ServerIDRangeInfo)
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ServerInfoLen)
|
| | | data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo)
|
| | | data = CommFunc.WriteBYTE(data, self.GroupValue1)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.RankLimitPersonal)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ServerInfoLen:%d,
|
| | | ServerIDRangeInfo:%s,
|
| | | GroupValue1:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | RankLimitPersonal:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ServerInfoLen,
|
| | | self.ServerIDRangeInfo,
|
| | | self.GroupValue1,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.RankLimitPersonal,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossActGubaoInfo=tagMCCrossActGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActGubaoInfo.Head.Cmd,m_NAtagMCCrossActGubaoInfo.Head.SubCmd))] = m_NAtagMCCrossActGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 80 仙匣秘境跨服活动信息 #tagMCCrossActXianXiaMJInfo
|
| | |
|
| | | class tagMCCrossActXianXiaMJItem(Structure):
|
| | |
| | | import CrossActCTGBillboard
|
| | | import PlayerActBossTrial
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActGubao
|
| | | import CrossRealmMsg
|
| | | import PyGameData
|
| | | import PlayerFB
|
| | |
| | | elif actName == ShareDefine.CrossActName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.OnCrossActIDChange(cfgID, zoneID, ipyData, state)
|
| | |
|
| | | elif actName == ShareDefine.CrossActName_Gubao:
|
| | | PlayerActGubao.OnCrossActIDChange(cfgID, zoneID, ipyData, state)
|
| | | |
| | | else:
|
| | | actChangeList.append([actName, ipyData, state, cfgID, groupName, zoneID, dbActID, actID, forceReset, dbTemplateID])
|
| | |
|
| | |
| | | elif actName == ShareDefine.CrossActName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.OnCrossActJoinEnd(cfgID, zoneID, ipyData)
|
| | |
|
| | | elif actName == ShareDefine.CrossActName_Gubao:
|
| | | PlayerActGubao.OnCrossActJoinEnd(cfgID, zoneID, ipyData)
|
| | | |
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossActInfo % actName, crossActInfoDict[actName])
|
| | | # 非活动中的处理完关闭后,最后删除
|
| | | if not state and isEnd:
|
| | |
| | | import PlayerCompensation
|
| | | import PlayerActBossTrial
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActGubao
|
| | | import CrossActionControl
|
| | | import CrossActAllRecharge
|
| | | import CrossFamilyFlagwar
|
| | |
| | | elif msgType == ShareDefine.ClientServerMsg_XianXiaMJScore:
|
| | | PlayerActXianXiaMJ.ClientServerMsg_XianXiaMJScore(serverGroupID, msgData)
|
| | |
|
| | | elif msgType == ShareDefine.ClientServerMsg_GubaoScore:
|
| | | PlayerActGubao.ClientServerMsg_GubaoScore(serverGroupID, msgData)
|
| | | |
| | | elif msgType == ShareDefine.ClientServerMsg_CreateFuncTeam:
|
| | | PlayerFuncTeam.ClientServerMsg_CreateFuncTeam(serverGroupID, msgData)
|
| | |
|
| | |
| | | import PlayerActGarbageSorting
|
| | | import PlayerActBossTrial
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActGubao
|
| | | import PlayerUniversalGameRec
|
| | | import GameWorldAverageLv
|
| | | import PlayerFamilyBoss
|
| | |
| | | PlayerActBossTrial.OnActEnd(actNum, ipyData, dayIndex)
|
| | | elif actName == ShareDefine.OperationActionName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.OnActEnd(actNum, ipyData, dayIndex)
|
| | | elif actName == ShareDefine.OperationActionName_Gubao:
|
| | | PlayerActGubao.OnActEnd(actNum, ipyData, dayIndex)
|
| | |
|
| | | if curActID:
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | |
| | | PlayerActBossTrial.OnActStart(actNum)
|
| | | elif actName == ShareDefine.OperationActionName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.OnActStart(actNum)
|
| | | elif actName == ShareDefine.OperationActionName_Gubao:
|
| | | PlayerActGubao.OnActStart(actNum)
|
| | | elif actName == ShareDefine.OperationActionName_FamilyCTGAssist:
|
| | | PlayerActFamilyCTGAssist.OnActStart(actNum)
|
| | | else:
|
| | |
| | | PlayerActBossTrial.OnActJoinEnd(actNum, ipyData, dayIndex)
|
| | | elif actName == ShareDefine.OperationActionName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.OnActJoinEnd(actNum, ipyData, dayIndex)
|
| | | elif actName == ShareDefine.OperationActionName_Gubao:
|
| | | PlayerActGubao.OnActJoinEnd(actNum, ipyData, dayIndex)
|
| | |
|
| | | if ipyData and actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActWorldLVKey)
|
| | |
| | | ("WORD", "FamilyTemplateID", 0),
|
| | | ),
|
| | |
|
| | | "ActGubao":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("list", "PlatformList", 0),
|
| | | ("list", "ServerGroupIDList", 0),
|
| | | ("BYTE", "ActNum", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("char", "JoinStartTime", 0),
|
| | | ("char", "JoinEndTime", 0),
|
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ),
|
| | |
|
| | | "CrossActGubao":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActGroupName", 0),
|
| | | ("BYTE", "ZoneID", 0),
|
| | | ("list", "ServerIDRangeList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("char", "JoinStartTime", 0),
|
| | | ("char", "JoinEndTime", 0),
|
| | | ("WORD", "RankLimitPersonal", 0),
|
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ),
|
| | |
|
| | | "ActGubaoBillTemp":(
|
| | | ("DWORD", "TemplateID", 1),
|
| | | ("BYTE", "Rank", 0),
|
| | | ("list", "AwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "ActXianXiaMJ":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("list", "PlatformList", 0),
|
| | |
| | | def GetPersonalTemplateID(self): return self.attrTuple[14] # 个人排行模板编号 WORD
|
| | | def GetFamilyTemplateID(self): return self.attrTuple[15] # 仙盟排行模板编号 WORD |
| | | |
| | | # 古宝养成活动时间表 |
| | | class IPY_ActGubao(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
|
| | | def GetPlatformList(self): return self.attrTuple[1] # 活动平台列表["平台A", "平台A", ...],配[]代表所有 list
|
| | | def GetServerGroupIDList(self): return self.attrTuple[2] # 服务器ID列表 list
|
| | | def GetActNum(self): return self.attrTuple[3] # 活动分组编号, 活动类型 * 10 + 不同界面编号 BYTE
|
| | | def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
|
| | | def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
|
| | | def GetJoinStartTime(self): return self.attrTuple[6] # 参与开始时间点 char
|
| | | def GetJoinEndTime(self): return self.attrTuple[7] # 参与结束时间点 char
|
| | | def GetPersonalTemplateID(self): return self.attrTuple[8] # 个人排行模板编号 WORD |
| | | |
| | | # 古宝养成活动跨服表 |
| | | class IPY_CrossActGubao(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
|
| | | def GetActGroupName(self): return self.attrTuple[1] # 活动组名(同组活动的名字需相同) char
|
| | | def GetZoneID(self): return self.attrTuple[2] # 组内分组编号 BYTE
|
| | | def GetServerIDRangeList(self): return self.attrTuple[3] # 活动的账号服务器ID范围列表 [[serverIDA, serverIDB], ...] list
|
| | | def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
|
| | | def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
|
| | | def GetJoinStartTime(self): return self.attrTuple[6] # 参与开始时间点 char
|
| | | def GetJoinEndTime(self): return self.attrTuple[7] # 参与结束时间点 char
|
| | | def GetRankLimitPersonal(self): return self.attrTuple[8] # 个人上榜积分限制 WORD
|
| | | def GetPersonalTemplateID(self): return self.attrTuple[9] # 个人排行模板编号 WORD |
| | | |
| | | # 古宝养成榜单模版表 |
| | | class IPY_ActGubaoBillTemp(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.attrTuple[0] # 模板编号 DWORD
|
| | | def GetRank(self): return self.attrTuple[1] # 名次 BYTE
|
| | | def GetAwardItemList(self): return self.attrTuple[2] # 奖励物品列表[[物品ID,个数,是否拍品], ...] list |
| | | |
| | | # 仙匣秘境活动时间表 |
| | | class IPY_ActXianXiaMJ(): |
| | | |
| | |
| | | self.__LoadFileData("ActBossTrial", onlyCheck)
|
| | | self.__LoadFileData("ActBossTrialTemplate", onlyCheck)
|
| | | self.__LoadFileData("CrossActBossTrial", onlyCheck)
|
| | | self.__LoadFileData("ActGubao", onlyCheck)
|
| | | self.__LoadFileData("CrossActGubao", onlyCheck)
|
| | | self.__LoadFileData("ActGubaoBillTemp", onlyCheck)
|
| | | self.__LoadFileData("ActXianXiaMJ", onlyCheck)
|
| | | self.__LoadFileData("CrossActXianXiaMJ", onlyCheck)
|
| | | self.__LoadFileData("ActXianXiaMJBillTemp", onlyCheck)
|
| | |
| | | self.CheckLoadData("CrossActBossTrial") |
| | | return self.ipyCrossActBossTrialCache[index]
|
| | | |
| | | def GetActGubaoCount(self): |
| | | self.CheckLoadData("ActGubao") |
| | | return self.ipyActGubaoLen
|
| | | def GetActGubaoByIndex(self, index): |
| | | self.CheckLoadData("ActGubao") |
| | | return self.ipyActGubaoCache[index]
|
| | | |
| | | def GetCrossActGubaoCount(self): |
| | | self.CheckLoadData("CrossActGubao") |
| | | return self.ipyCrossActGubaoLen
|
| | | def GetCrossActGubaoByIndex(self, index): |
| | | self.CheckLoadData("CrossActGubao") |
| | | return self.ipyCrossActGubaoCache[index]
|
| | | |
| | | def GetActGubaoBillTempCount(self): |
| | | self.CheckLoadData("ActGubaoBillTemp") |
| | | return self.ipyActGubaoBillTempLen
|
| | | def GetActGubaoBillTempByIndex(self, index): |
| | | self.CheckLoadData("ActGubaoBillTemp") |
| | | return self.ipyActGubaoBillTempCache[index]
|
| | | |
| | | def GetActXianXiaMJCount(self): |
| | | self.CheckLoadData("ActXianXiaMJ") |
| | | return self.ipyActXianXiaMJLen
|
New file |
| | |
| | | #!/usr/bin/python |
| | | # -*- coding: GBK -*- |
| | | #------------------------------------------------------------------------------- |
| | | # |
| | | ##@package PlayerActGubao |
| | | # |
| | | # @todo:古宝养成活动 |
| | | # @author hxp |
| | | # @date 2024-08-12 |
| | | # @version 1.0 |
| | | # |
| | | # 详细描述: 古宝养成活动 |
| | | # |
| | | #------------------------------------------------------------------------------- |
| | | #"""Version = 2024-08-12 19:30""" |
| | | #------------------------------------------------------------------------------- |
| | | |
| | | |
| | | import ShareDefine |
| | | import IpyGameDataPY |
| | | import DataRecordPack |
| | | import PlayerDBGSEvent |
| | | import PlayerBillboard |
| | | import PlayerCompensation |
| | | import CrossActionControl |
| | | import CrossBillboard |
| | | import PyDataManager |
| | | import CrossRealmMsg |
| | | import GameWorld |
| | | |
| | | def OnActStart(actNum): |
| | | ## 活动开启 |
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAward % actNum, 0) |
| | | PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_GubaoScore) |
| | | return |
| | | |
| | | def OnActEnd(actNum, ipyData, dayIndex): |
| | | ## 活动结束 |
| | | cfgID = ipyData.GetCfgID() if ipyData else 0 |
| | | GameWorld.Log("=== 古宝养成活动结束! === actNum=%s,cfgID=%s,dayIndex=%s" % (actNum, cfgID, dayIndex)) |
| | | |
| | | __OnEndAward(actNum, ipyData, dayIndex) # 兼容活动没有配置参与时间段的在活动结束补触发结算奖励 |
| | | |
| | | GameWorld.Log("=================================================================================") |
| | | return |
| | | |
| | | def OnActJoinEnd(actNum, ipyData, dayIndex): |
| | | ## 活动参与结束 |
| | | __OnEndAward(actNum, ipyData, dayIndex) |
| | | return |
| | | |
| | | def __OnEndAward(actNum, ipyData, dayIndex): |
| | | ## 结算奖励 |
| | | if not ipyData: |
| | | return |
| | | cfgID = ipyData.GetCfgID() |
| | | awardState = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAward % actNum) |
| | | if awardState: |
| | | #已经结算过该活动 |
| | | GameWorld.Log("古宝养成活动已经结算过奖励了! actNum=%s,cfgID=%s,dayIndex=%s" % (actNum, cfgID, dayIndex)) |
| | | return |
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAward % actNum, 1) |
| | | |
| | | GameWorld.Log("=== 本服古宝养成活动发放榜单奖励! === actNum=%s,cfgID=%s,dayIndex=%s" % (actNum, cfgID, dayIndex)) |
| | | |
| | | __OnEndAward_Personal(ipyData.GetPersonalTemplateID(), ShareDefine.Def_BT_GubaoScore) |
| | | |
| | | DataRecordPack.DR_BillboardData(ShareDefine.Def_BT_GubaoScore, "ActGubao", {"actNum":actNum, "cfgID":cfgID, "dayIndex":dayIndex}) |
| | | GameWorld.Log("=================================================================================") |
| | | return |
| | | |
| | | def __OnEndAward_Personal(templateID, billboardType): |
| | | billBoard = GameWorld.GetBillboard().FindBillboard(billboardType) |
| | | if not billBoard: |
| | | return |
| | | if not templateID: |
| | | GameWorld.Log("本次活动没有个人榜奖励!") |
| | | return |
| | | tempIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGubaoBillTemp", templateID) |
| | | if not tempIpyDataList: |
| | | return |
| | | |
| | | rankAwardDict = {} |
| | | for tempIpyData in tempIpyDataList: |
| | | rankAwardDict[tempIpyData.GetRank()] = tempIpyData.GetAwardItemList() |
| | | |
| | | GameWorld.Log("结算个人榜单奖励: templateID=%s,rankAwardDict=%s" % (templateID, rankAwardDict)) |
| | | billBoard.Sort() |
| | | for index in xrange(billBoard.GetCount()): |
| | | billBoardData = billBoard.At(index) |
| | | if not billBoardData: |
| | | continue |
| | | |
| | | rank = index + 1 |
| | | |
| | | awardItemList = GameWorld.GetOrderValueByDict(rankAwardDict, rank, False) |
| | | if not awardItemList: |
| | | break |
| | | |
| | | playerID = billBoardData.GetID() |
| | | name2 = billBoardData.GetName2() |
| | | cmpValue = billBoardData.GetCmpValue() |
| | | |
| | | GameWorld.Log(" 发放古宝养成个人榜单奖励: rank=%s,playerID=%s,cmpValue=%s,awardItemList=%s, %s" |
| | | % (rank, playerID, cmpValue, awardItemList, name2)) |
| | | |
| | | PlayerCompensation.SendMailByKey("ActGubaoPlayer", [playerID], awardItemList, [rank]) |
| | | |
| | | return |
| | | |
| | | def MapServer_Gubao(curPlayer, msgList): |
| | | mapID = curPlayer.GetRealMapID() |
| | | playerID = curPlayer.GetPlayerID() |
| | | GameWorld.DebugLog("MapServer_Gubao mapID=%s,msgList=%s" % (mapID, msgList), playerID) |
| | | if not msgList: |
| | | return |
| | | |
| | | msgType, dataMsg = msgList |
| | | ret = None |
| | | |
| | | if msgType == "AddGubaoScore": |
| | | ret = __OnAddGubaoScore(curPlayer, dataMsg) |
| | | |
| | | if ret == None: |
| | | return |
| | | return msgList + (ret if isinstance(ret, list) else [ret]) |
| | | |
| | | def __OnAddGubaoScore(curPlayer, dataMsg): |
| | | ## 地图增加积分 |
| | | playerID = curPlayer.GetPlayerID() |
| | | accID = curPlayer.GetAccID() |
| | | playerName = curPlayer.GetName() |
| | | job = curPlayer.GetJob() |
| | | realmLV = curPlayer.GetOfficialRank() |
| | | _, updScore = dataMsg |
| | | |
| | | #同步跨服 |
| | | playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, |
| | | "playerScore":updScore} |
| | | SyncGubaoToCrossServer(curPlayer, playerInfo) |
| | | return |
| | | |
| | | def SyncGubaoToCrossServer(curPlayer, playerInfo): |
| | | ## 同步到跨服服务器 |
| | | actInfo = CrossActionControl.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao) |
| | | if not actInfo.get(ShareDefine.ActKey_State): |
| | | return |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | ipyDataDict = actInfo.get(ShareDefine.ActKey_IpyDataInfo, {}) |
| | | if not ipyDataDict: |
| | | return |
| | | zoneID = ipyDataDict.get("ZoneID") |
| | | if not cfgID or not zoneID: |
| | | return |
| | | |
| | | dataMsg = {"cfgID":cfgID, "zoneID":zoneID, "playerInfo":playerInfo} |
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_GubaoScore, dataMsg) |
| | | return |
| | | |
| | | ##------------------------------------------ 跨服古宝养成活动 --------------------------------------- |
| | | def ClientServerMsg_GubaoScore(serverGroupID, msgData): |
| | | ## 收到子服 - 同步积分 |
| | | |
| | | cfgID = msgData["cfgID"] |
| | | zoneID = msgData["zoneID"] |
| | | playerInfo = msgData["playerInfo"] |
| | | |
| | | actInfo = CrossActionControl.GetCrossActInfoByCfgID(ShareDefine.CrossActName_Gubao, cfgID, zoneID) |
| | | if not actInfo or not actInfo[ShareDefine.ActKey_State]: |
| | | GameWorld.ErrLog("跨服古宝养成非活动中,无法更新! cfgID=%s, zoneID=%s" % (cfgID, zoneID)) |
| | | return |
| | | if actInfo[ShareDefine.ActKey_StateJoin] != ShareDefine.ActStateJoin_Start: |
| | | GameWorld.ErrLog("跨服古宝养成非可参与状态,无法更新! cfgID=%s, zoneID=%s" % (cfgID, zoneID)) |
| | | return |
| | | ipyData = IpyGameDataPY.GetIpyGameData("CrossActGubao", cfgID) |
| | | if not ipyData: |
| | | return |
| | | personlLimit = ipyData.GetRankLimitPersonal() |
| | | |
| | | playerID = playerInfo["playerID"] |
| | | playerName = playerInfo["playerName"] |
| | | job = playerInfo["job"] |
| | | accID = playerInfo["accID"] |
| | | realmLV = playerInfo["realmLV"] |
| | | playerScore = playerInfo["playerScore"] |
| | | |
| | | groupValue1 = zoneID |
| | | |
| | | if playerScore >= personlLimit: |
| | | name2, type2, value1, value2 = accID, job, realmLV, 0 |
| | | CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_GubaoScore, groupValue1, playerID, playerName, |
| | | name2, type2, value1, value2, playerScore) |
| | | return |
| | | |
| | | def OnCrossActIDChange(cfgID, zoneID, ipyData, state): |
| | | ## 跨服活动ID变更 |
| | | if state: |
| | | OnCrossActStart(cfgID, zoneID, ipyData) |
| | | else: |
| | | OnCrossActEnd(cfgID, zoneID, ipyData) |
| | | return |
| | | |
| | | def OnCrossActStart(cfgID, zoneID, ipyData): |
| | | ## 跨服活动开启 |
| | | |
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAwardC % zoneID, 0) |
| | | |
| | | groupValue1 = zoneID |
| | | billboardMgr = PyDataManager.GetCrossBillboardManager() |
| | | billboardObj = billboardMgr.GetCrossBillboard(ShareDefine.Def_CBT_GubaoScore, groupValue1) |
| | | billboardObj.ClearData() # 新活动重置榜单数据 |
| | | return |
| | | |
| | | def OnCrossActEnd(cfgID, zoneID, ipyData): |
| | | ## 跨服活动结束 |
| | | |
| | | groupValue1 = zoneID |
| | | GameWorld.Log("=== 跨服古宝养成活动结束! === cfgID=%s,zoneID=%s" % (cfgID, zoneID)) |
| | | __OnCrossEndAward(cfgID, zoneID, ipyData) |
| | | |
| | | # 备份、清除榜单数据 |
| | | billboardMgr = PyDataManager.GetCrossBillboardManager() |
| | | billboardObj = billboardMgr.GetCrossBillboard(ShareDefine.Def_CBT_GubaoScore, groupValue1) |
| | | billboardObj.ClearData() |
| | | |
| | | GameWorld.Log("=================================================================================") |
| | | return |
| | | |
| | | def OnCrossActJoinEnd(cfgID, zoneID, ipyData): |
| | | ## 跨服活动参与结束 |
| | | __OnCrossEndAward(cfgID, zoneID, ipyData) |
| | | return |
| | | |
| | | def __OnCrossEndAward(cfgID, zoneID, ipyData): |
| | | ## 结算跨服奖励 |
| | | awardState = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAwardC % zoneID) |
| | | if awardState: |
| | | #已经结算过该活动 |
| | | GameWorld.Log("跨服古宝养成活动已经结算过奖励了! cfgID=%s,zoneID=%s" % (cfgID, zoneID)) |
| | | return |
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAwardC % zoneID, 1) |
| | | |
| | | GameWorld.Log("=== 跨服古宝养成活动发放榜单奖励! === cfgID=%s,zoneID=%s" % (cfgID, zoneID)) |
| | | |
| | | PersonalTemplateID = ipyData.GetPersonalTemplateID() |
| | | |
| | | __GiveCrossOrderAwardPersonal(cfgID, zoneID, PersonalTemplateID, ShareDefine.Def_CBT_GubaoScore) |
| | | GameWorld.Log("=================================================================================") |
| | | return |
| | | |
| | | def __GiveCrossOrderAwardPersonal(cfgID, zoneID, templateID, billboardType): |
| | | |
| | | groupValue1 = zoneID |
| | | billboardMgr = PyDataManager.GetCrossBillboardManager() |
| | | billboardObj = billboardMgr.GetCrossBillboard(billboardType, groupValue1) |
| | | billboardDataCount = billboardObj.GetCount() |
| | | if not billboardDataCount: |
| | | GameWorld.Log("跨服古宝养成个人排行数据为空! billboardType=%s,zoneID=%s,cfgID=%s,templateID=%s" % (billboardType, zoneID, cfgID, templateID)) |
| | | return |
| | | |
| | | # 结算时排序并保存榜单数据流向 |
| | | billboardObj.SortData() |
| | | billboardObj.SaveDRData("Award", {"cfgID":cfgID, "zoneID":zoneID}) |
| | | |
| | | GameWorld.Log("结算跨服古宝养成个人排行奖励: billboardType=%s,zoneID=%s,cfgID=%s,templateID=%s,billboardDataCount=%s" |
| | | % (billboardType, zoneID, cfgID, templateID, billboardDataCount)) |
| | | |
| | | orderIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGubaoBillTemp", templateID) |
| | | if orderIpyDataList: |
| | | rankPre = 0 |
| | | billboardIndex = 0 |
| | | for ipyData in orderIpyDataList: |
| | | rank = ipyData.GetRank() |
| | | awardItemList = ipyData.GetAwardItemList() |
| | | orderCountTotal = rank - rankPre # 奖励名次数量 |
| | | rankPre = rank |
| | | orderCount = 0 |
| | | |
| | | for index in xrange(billboardIndex, billboardDataCount): |
| | | if orderCount >= orderCountTotal: |
| | | break |
| | | |
| | | billboardData = billboardObj.At(index) |
| | | playerID = billboardData.ID |
| | | name2 = billboardData.Name2 |
| | | cmpValue = billboardData.CmpValue |
| | | |
| | | playerRank = index + 1 |
| | | GameWorld.Log(" 发放古宝养成个人榜单奖励: rank=%s,playerID=%s,cmpValue=%s,awardItemList=%s, %s" |
| | | % (rank, playerID, cmpValue, awardItemList, name2)) |
| | | PlayerCompensation.SendMailByKey("ActGubaoCrossPlayer", [playerID], awardItemList, [playerRank], crossMail=True) |
| | | |
| | | orderCount += 1 |
| | | billboardIndex += 1 |
| | | |
| | | return |
| | | |
| | |
| | | Def_ActXianXiaMJAward = "ActXianXiaMJAward_%s"
|
| | | #跨服仙匣秘境结算状态,参数(zoneID)
|
| | | Def_ActXianXiaMJAwardC = "ActXianXiaMJAwardC_%s"
|
| | | #古宝养成结算状态,参数(actNum),跨服活动参数(zoneID)
|
| | | Def_ActGubaoAward = "ActGubaoAward_%s"
|
| | | #跨服古宝养成结算状态,参数(zoneID)
|
| | | Def_ActGubaoAwardC = "ActGubaoAwardC_%s"
|
| | |
|
| | | def SetInitOpenServerTime(initTime):
|
| | | openDatetime = GameWorld.ChangeTimeNumToDatetime(initTime)
|
| | |
| | | import CrossBattlefield
|
| | | import CrossFamilyFlagwar
|
| | | import CrossActAllRecharge
|
| | | import PlayerActGubao
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActBossTrial
|
| | | import PlayerActFamilyCTGAssist
|
| | |
| | | PlayerActXianXiaMJ.MapServer_XianXiaMJ(curPlayer, eval(resultName))
|
| | | return
|
| | |
|
| | | # 古宝养成
|
| | | if callName == "ActGubao":
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|
| | | if not curPlayer:
|
| | | return
|
| | | PlayerActGubao.MapServer_Gubao(curPlayer, eval(resultName))
|
| | | return
|
| | | |
| | | #py喇叭聊天
|
| | | if callName == 'PYSpeaker':
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|
| | |
| | | OperationActionName_ActTask = "ActTask" # 活动任务
|
| | | OperationActionName_BuyCountGift = "ActBuyCountGift" # 购买次数礼包活动
|
| | | OperationActionName_FamilyCTGAssist = "ActFamilyCTGAssist" # 仙盟充值协助
|
| | | OperationActionName_Gubao = "ActGubao" # 古宝养成活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift, OperationActionName_FamilyCTGAssist,
|
| | | OperationActionName_Gubao,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | |
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift, OperationActionName_FamilyCTGAssist,
|
| | | OperationActionName_Gubao,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | |
| | | CrossActName_LuckyCloudBuy = "CrossActLuckyCloudBuy" # 幸运云购
|
| | | CrossActName_BossTrial = "CrossActBossTrial" # Boss历练 - 跨服
|
| | | CrossActName_XianXiaMJ = "CrossActXianXiaMJ" # 仙匣秘境 - 跨服
|
| | | CrossActName_Gubao = "CrossActGubao" # 古宝养成 - 跨服
|
| | |
|
| | | #跨服运营活动列表
|
| | | CrossActNameList = [CrossActName_CTGBillboard, CrossActName_AllRecharge, CrossActName_LuckyCloudBuy, CrossActName_BossTrial, CrossActName_XianXiaMJ]
|
| | | CrossActNameList = [CrossActName_CTGBillboard, CrossActName_AllRecharge, CrossActName_LuckyCloudBuy, CrossActName_BossTrial, CrossActName_XianXiaMJ, CrossActName_Gubao]
|
| | | #需要锁定活动分区分配直到活动结束的跨服运营活动,即使热更分区配置,也不会改变正在活动中的分区设定,直到活动结束
|
| | | CrossActLockServerGroupIDList = [CrossActName_CTGBillboard, CrossActName_AllRecharge]
|
| | |
|
| | |
| | | Def_BT_BossTrialSubmitFamily, #提交boss凭证仙盟榜 (boss历练活动)
|
| | | Def_BT_BossTrialSubmitFamilyBak, #提交boss凭证仙盟榜 (boss历练活动 - 上一期)
|
| | | Def_BT_XianXiaMJScore, #仙匣秘境积分榜 (仙匣秘境活动)
|
| | | Def_BT_GubaoScore, #古宝养成积分榜 (古宝养成活动)
|
| | |
|
| | | Def_BT_Max, #排行榜最大类型
|
| | | ) = range(0, 38 + 2) |
| | | ) = range(0, 39 + 2) |
| | |
|
| | | ''' 跨服排行榜类型, 从 150 开始
|
| | | 与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
|
| | |
| | | Def_CBT_BossTrialSubmitFamily, # boss凭证 - 仙盟榜 160
|
| | | Def_CBT_BossTrialSubmitFamilyBak, # boss凭证 - 仙盟榜 上一期 161
|
| | | Def_CBT_XianXiaMJScore, # 仙匣秘境积分 - 个人榜 162
|
| | | ) = range(150, 162 + 1)
|
| | | Def_CBT_GubaoScore, # 古宝养成积分 - 个人榜 163
|
| | | ) = range(150, 163 + 1)
|
| | |
|
| | | # 跨服榜单最大数据名次,没有设置的默认100
|
| | | CrossBillboard_MaxDataCount = {
|
| | |
| | | Def_CBT_BossTrialSubmit:1000,
|
| | | Def_CBT_BossTrialSubmitBak:1000,
|
| | | Def_CBT_XianXiaMJScore:1000,
|
| | | Def_CBT_GubaoScore:1000,
|
| | | }
|
| | |
|
| | | #职业对应战力排行榜类型
|
| | |
| | | ClientServerMsg_ChangeFuncTeam = "ChangeFuncTeam" # 修改功能队伍
|
| | | ClientServerMsg_FuncTeamMemOP = "FuncTeamMemOP" # 功能队伍成员操作
|
| | | ClientServerMsg_QueryFuncTeam = "QueryFuncTeam" # 查询功能队伍
|
| | | ClientServerMsg_GubaoScore = "GubaoScore" # 古宝养成积分
|
| | |
|
| | | #跨服广播类型定义
|
| | | CrossNotify_CrossAct = "CrossAct"
|
| | |
| | | Def_PDict_XianXiaMJAwardItemTimes = "ActXXMJItemTimes_%s_%s_%s" # 奖池物品累计产出次数,有限制次数的才记录,参数:(活动编号, 库类型, 物品ID)
|
| | | Def_PDict_XianXiaMJScore = "XianXiaMJScore_%s" # 抽奖积分,参数:(活动编号)
|
| | |
|
| | | #古宝养成活动
|
| | | Def_PDict_CA_GubaoID = "CA_GubaoID" # 玩家身上的活动ID,唯一标识,取活动开始日期time值
|
| | | Def_PDict_ActGubaoID = "ActGubaoID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
|
| | | Def_PDict_ActGubaoScore = "ActGubaoScore_%s" # 养成积分,参数:(活动编号)
|
| | |
|
| | | #天帝礼包活动
|
| | | Def_PDict_GodGiftID = "ActGodGiftID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
|
| | | Def_PDict_GodGiftWorldLV = "ActGodGiftWorldLV_%s" #玩家身上的活动世界等级,参数:(活动编号)
|
| | |
| | | Def_PDict_ActTaskTempID = "ActTaskTempID_%s" # 任务活动模板ID,参数:(活动编号)
|
| | | Def_PDict_ActTaskValue = "ActTaskValue_%s_%s" # 任务活动当前任务进度值,参数:(活动编号, 任务类型)
|
| | | Def_PDict_ActTaskAward = "ActTaskAward_%s_%s" # 任务活动奖励记录,按位记录任务ID是否已领取,参数:(活动编号,key编号)
|
| | | Def_PDict_ActTaskRound = "ActTaskRound_%s" # 任务轮次,参数:(活动编号)
|
| | |
|
| | | #购买次数礼包活动
|
| | | Def_PDict_BuyCountGiftID = "BuyCountGiftID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time,参数(活动编号)
|
| | |
| | | ActTaskType_CrossDemonLandBoss, # 击杀魔化之地boss 5
|
| | | ActTaskType_XianXiaMJLottery, # 仙匣秘境寻宝x次 6
|
| | | ActTaskType_XianXiaMJLayer, # 仙匣秘境达到x层 7
|
| | | ) = range(1, 1 + 7)
|
| | | ActTaskType_TreasureGubao, # 古宝寻宝x次 8
|
| | | ) = range(1, 1 + 8)
|
| | |
|
| | | # 套装枚举,普通套装,强化套装
|
| | | (EquipSuitType_Normal,
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 81 古宝养成活动信息 #tagMCActGubaoInfo
|
| | |
|
| | | class tagMCActGubaoItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGubaoItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 81 古宝养成活动信息 //tagMCActGubaoInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGubaoBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActGubaoItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActGubaoItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGubaoInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x81
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCActGubaoBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x81
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.LimitLV = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | LimitLV:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.LimitLV,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGubaoInfo=tagMCActGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoInfo.Head.Cmd,m_NAtagMCActGubaoInfo.Head.SubCmd))] = m_NAtagMCActGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 82 古宝养成活动玩家信息 #tagMCActGubaoPlayerInfo
|
| | |
|
| | | class tagMCActGubaoPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("Score", c_int), # 当前积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x82
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x82
|
| | | self.ActNum = 0
|
| | | self.Score = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGubaoPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 82 古宝养成活动玩家信息 //tagMCActGubaoPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | Score:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.Score
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGubaoPlayerInfo=tagMCActGubaoPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoPlayerInfo.Cmd,m_NAtagMCActGubaoPlayerInfo.SubCmd))] = m_NAtagMCActGubaoPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo
|
| | |
|
| | | class tagMCActHorsePetFeastTime(Structure):
|
| | |
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | TaskCount = 0 #(BYTE TaskCount)
|
| | | TaskList = list() #(vector<tagMCActTask> TaskList)// 任务列表
|
| | | RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次,当小于等于1时代表不循环
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | temTaskList = tagMCActTask()
|
| | | _pos = temTaskList.ReadData(_lpData, _pos)
|
| | | self.TaskList.append(temTaskList)
|
| | | self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LimitLV = 0
|
| | | self.TaskCount = 0
|
| | | self.TaskList = list()
|
| | | self.RoundMax = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.TaskCount):
|
| | | length += self.TaskList[i].GetLength()
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.TaskCount)
|
| | | for i in range(self.TaskCount):
|
| | | data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RoundMax)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | TaskCount:%d,
|
| | | TaskList:%s
|
| | | TaskList:%s,
|
| | | RoundMax:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.TaskCount,
|
| | | "..."
|
| | | "...",
|
| | | self.RoundMax
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardRecordList = list() #(vector<DWORD> AwardRecordList)// 任务ID领奖记录值列表,根据任务ID位判断是否已领取,一个记录值存31位 [记录值0, 记录值1, ...]
|
| | | RoundNum = 0 #(BYTE RoundNum)// 当前轮次,从1开始
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.AwardCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.AwardRecordList.append(value)
|
| | | self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ActNum = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardRecordList = list()
|
| | | self.RoundNum = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.AwardCount
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteDWORD(data, self.AwardRecordList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.RoundNum)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | AwardCount:%d,
|
| | | AwardRecordList:%s
|
| | | AwardRecordList:%s,
|
| | | RoundNum:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | "...",
|
| | | self.RoundNum
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 83 古宝养成跨服活动信息 #tagMCCrossActGubaoInfo
|
| | |
|
| | | class tagMCCrossActGubaoItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCrossActGubaoItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 83 古宝养成跨服活动信息 //tagMCCrossActGubaoInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActGubaoBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCCrossActGubaoItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCCrossActGubaoItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActGubaoInfo(Structure):
|
| | | Head = tagHead()
|
| | | ServerInfoLen = 0 #(BYTE ServerInfoLen)
|
| | | ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服
|
| | | GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜积分保底限制;
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCCrossActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x83
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen)
|
| | | self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCCrossActGubaoBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x83
|
| | | self.ServerInfoLen = 0
|
| | | self.ServerIDRangeInfo = ""
|
| | | self.GroupValue1 = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.RankLimitPersonal = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ServerIDRangeInfo)
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ServerInfoLen)
|
| | | data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo)
|
| | | data = CommFunc.WriteBYTE(data, self.GroupValue1)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.RankLimitPersonal)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ServerInfoLen:%d,
|
| | | ServerIDRangeInfo:%s,
|
| | | GroupValue1:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | RankLimitPersonal:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ServerInfoLen,
|
| | | self.ServerIDRangeInfo,
|
| | | self.GroupValue1,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.RankLimitPersonal,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossActGubaoInfo=tagMCCrossActGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActGubaoInfo.Head.Cmd,m_NAtagMCCrossActGubaoInfo.Head.SubCmd))] = m_NAtagMCCrossActGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 80 仙匣秘境跨服活动信息 #tagMCCrossActXianXiaMJInfo
|
| | |
|
| | | class tagMCCrossActXianXiaMJItem(Structure):
|
| | |
| | | ("list", "MemAwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "ActGubao":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("char", "JoinStartTime", 0),
|
| | | ("char", "JoinEndTime", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ),
|
| | |
|
| | | "ActGubaoBillTemp":(
|
| | | ("DWORD", "TemplateID", 1),
|
| | | ("BYTE", "Rank", 0),
|
| | | ("list", "AwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "ActXianXiaMJ":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | |
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("BYTE", "TemplateID", 0),
|
| | | ("BYTE", "RoundMax", 0),
|
| | | ),
|
| | |
|
| | | "ActTaskTemp":(
|
| | |
| | | def GetAwardItemList(self): return self.attrTuple[2] # 奖励物品列表[[物品ID,个数,是否拍品], ...] 仙盟榜时为盟主奖励,如果没有配置,则统一取成员奖励 list
|
| | | def GetMemAwardItemList(self): return self.attrTuple[3] # 仙盟榜成员奖励物品信息列表[[物品ID,个数,是否拍品], ...] list |
| | | |
| | | # 古宝养成活动时间表 |
| | | class IPY_ActGubao(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetCfgID(self): return self.attrTuple[0] # 配置ID DWORD
|
| | | def GetStartDate(self): return self.attrTuple[1] # 开启日期 char
|
| | | def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
|
| | | def GetJoinStartTime(self): return self.attrTuple[3] # 参与开始时间点 char
|
| | | def GetJoinEndTime(self): return self.attrTuple[4] # 参与结束时间点 char
|
| | | def GetLVLimit(self): return self.attrTuple[5] # 限制等级 WORD
|
| | | def GetPersonalTemplateID(self): return self.attrTuple[6] # 个人排行模板编号 WORD |
| | | |
| | | # 古宝养成榜单模版表 |
| | | class IPY_ActGubaoBillTemp(): |
| | | |
| | | def __init__(self): |
| | | self.attrTuple = None |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.attrTuple[0] # 模板编号 DWORD
|
| | | def GetRank(self): return self.attrTuple[1] # 名次 BYTE
|
| | | def GetAwardItemList(self): return self.attrTuple[2] # 奖励物品列表[[物品ID,个数,是否拍品], ...] list |
| | | |
| | | # 仙匣秘境活动时间表 |
| | | class IPY_ActXianXiaMJ(): |
| | | |
| | |
| | | def GetIsDayReset(self): return self.attrTuple[4] # 是否每天重置 BYTE
|
| | | def GetResetType(self): return self.attrTuple[5] # 重置类型,0-0点重置;1-5点重置 BYTE
|
| | | def GetTemplateID(self): return self.attrTuple[6] # 登录奖励模板编号 BYTE |
| | | def GetRoundMax(self): return self.attrTuple[7] # 任务最大轮次 BYTE |
| | | |
| | | # 任务活动模板表 |
| | | class IPY_ActTaskTemp(): |
| | |
| | | self.__LoadFileData("ActGarbageTask", onlyCheck)
|
| | | self.__LoadFileData("ActBossTrial", onlyCheck)
|
| | | self.__LoadFileData("ActBossTrialTemplate", onlyCheck)
|
| | | self.__LoadFileData("ActGubao", onlyCheck)
|
| | | self.__LoadFileData("ActGubaoBillTemp", onlyCheck)
|
| | | self.__LoadFileData("ActXianXiaMJ", onlyCheck)
|
| | | self.__LoadFileData("ActXianXiaMJBillTemp", onlyCheck)
|
| | | self.__LoadFileData("ActXianXiaMJAward", onlyCheck)
|
| | |
| | | self.CheckLoadData("ActBossTrialTemplate") |
| | | return self.ipyActBossTrialTemplateCache[index]
|
| | | |
| | | def GetActGubaoCount(self): |
| | | self.CheckLoadData("ActGubao") |
| | | return self.ipyActGubaoLen
|
| | | def GetActGubaoByIndex(self, index): |
| | | self.CheckLoadData("ActGubao") |
| | | return self.ipyActGubaoCache[index]
|
| | | |
| | | def GetActGubaoBillTempCount(self): |
| | | self.CheckLoadData("ActGubaoBillTemp") |
| | | return self.ipyActGubaoBillTempLen
|
| | | def GetActGubaoBillTempByIndex(self, index): |
| | | self.CheckLoadData("ActGubaoBillTemp") |
| | | return self.ipyActGubaoBillTempCache[index]
|
| | | |
| | | def GetActXianXiaMJCount(self): |
| | | self.CheckLoadData("ActXianXiaMJ") |
| | | return self.ipyActXianXiaMJLen
|
| | |
| | | import PlayerActRechargePrize
|
| | | import PlayerActGarbageSorting
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActGubao
|
| | | import PlayerActGodGift
|
| | | import PlayerActFamilyCTGAssist
|
| | | import PlayerActRechargeRebateGold
|
| | |
| | | PlayerActGarbageSorting.OnPlayerLogin(curPlayer)
|
| | | # 仙匣秘境活动
|
| | | PlayerActXianXiaMJ.OnPlayerLogin(curPlayer)
|
| | | # 古宝养成活动
|
| | | PlayerActGubao.OnPlayerLogin(curPlayer)
|
| | | # 天帝礼包活动
|
| | | PlayerActGodGift.OnPlayerLogin(curPlayer)
|
| | | # 多日连充活动
|
| | |
| | | PlayerActBossTrial.OnMixFirstLogin(curPlayer)
|
| | | # 仙匣秘境
|
| | | PlayerActXianXiaMJ.OnMixFirstLogin(curPlayer)
|
| | | # 古宝养成
|
| | | PlayerActGubao.OnMixFirstLogin(curPlayer)
|
| | | # 重置玩家改名次数
|
| | | #UpdatePlayerName.ResetChangeNameCnt(curPlayer)
|
| | | return
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Player.PlayerActGubao
|
| | | #
|
| | | # @todo:古宝养成活动
|
| | | # @author hxp
|
| | | # @date 2024-08-12
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 古宝养成活动
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2024-08-12 19:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import PyGameData
|
| | | import ShareDefine
|
| | | import PlayerControl
|
| | | import IpyGameDataPY
|
| | | import CrossRealmPlayer
|
| | | import PlayerBillboard
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | | def OnMixFirstLogin(curPlayer):
|
| | | |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_Gubao, {}).values():
|
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
|
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | continue
|
| | | score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
|
| | | if not score:
|
| | | continue
|
| | | GameWorld.Log("古宝养成合服首登同步积分榜单: actNum=%s,score=%s" % (actNum, score), curPlayer.GetPlayerID())
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_GubaoScore, score, autoSort=True)
|
| | | break
|
| | | |
| | | return
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_Gubao, {}).values():
|
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
|
| | | isReset = __CheckPlayerGubaoAction(curPlayer, actNum)
|
| | | if not isReset:
|
| | | # 活动中同步活动信息
|
| | | if actInfo.get(ShareDefine.ActKey_State):
|
| | | Sync_GubaoActionInfo(curPlayer, actNum)
|
| | | Sync_GubaoPlayerInfo(curPlayer, actNum)
|
| | | |
| | | if not __CheckPlayerCrossActGubao(curPlayer):
|
| | | Sync_CrossActGubaoActionInfo(curPlayer)
|
| | | |
| | | return
|
| | |
|
| | | def RefreshGubaoActionInfo(actNum):
|
| | | ## 收到GameServer同步的活动信息,刷新活动信息
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if curPlayer.GetID() == 0:
|
| | | continue
|
| | | __CheckPlayerGubaoAction(curPlayer, actNum)
|
| | | return
|
| | |
|
| | | def __CheckPlayerGubaoAction(curPlayer, actNum):
|
| | | ## 检查玩家活动数据信息
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_Gubao, actNum)
|
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | |
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoID % actNum) # 玩家身上的活动ID
|
| | | |
| | | # 活动ID 相同的话不处理
|
| | | if actID == playerActID:
|
| | | GameWorld.DebugLog("古宝养成活动ID不变,不处理!actNum=%s,actID=%s" % (actNum, actID), playerID)
|
| | | return
|
| | | |
| | | GameWorld.DebugLog("古宝养成重置! actNum=%s,actID=%s,playerActID=%s,state=%s,cfgID=%s" |
| | | % (actNum, actID, playerActID, state, cfgID), playerID)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoID % actNum, actID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, 0)
|
| | | |
| | | if state:
|
| | | Sync_GubaoActionInfo(curPlayer, actNum)
|
| | | Sync_GubaoPlayerInfo(curPlayer, actNum)
|
| | | return True
|
| | |
|
| | | def RefreshCrossActGubaoInfo():
|
| | | ## 收到GameServer同步的活动信息,刷新活动信息
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if curPlayer.GetID() == 0:
|
| | | continue
|
| | | __CheckPlayerCrossActGubao(curPlayer)
|
| | | |
| | | return
|
| | |
|
| | | def __CheckPlayerCrossActGubao(curPlayer):
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | |
| | | actInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao)
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | |
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CA_GubaoID) # 玩家身上的活动ID
|
| | | |
| | | # 活动ID 相同的话不处理
|
| | | if actID == playerActID:
|
| | | GameWorld.DebugLog("跨服古宝养成活动ID不变,不处理!cfgID=%s,dayIndex=%s,actID=%s" % (cfgID, dayIndex, actID), playerID) |
| | | return
|
| | | GameWorld.DebugLog("跨服古宝养成活动重置! cfgID=%s,actID=%s,playerActID=%s,state=%s" % (cfgID, actID, playerActID, state), playerID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CA_GubaoID, actID)
|
| | | |
| | | if not state:
|
| | | CrossRealmPlayer.NotifyCrossActEnd(curPlayer, ShareDefine.CrossActName_Gubao)
|
| | | |
| | | Sync_CrossActGubaoActionInfo(curPlayer)
|
| | | return True
|
| | |
|
| | | def OnGubaoCost(curPlayer, costPieceInfo, costItemList):
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_Gubao, {}).values():
|
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
|
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | continue
|
| | | |
| | | crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao)
|
| | | if crossActInfo.get(ShareDefine.ActKey_State, 0):
|
| | | if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start:
|
| | | GameWorld.Log("跨服古宝养成非参与活动中: actNum=%s" % actNum, playerID)
|
| | | continue
|
| | | else:
|
| | | if actInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start:
|
| | | GameWorld.Log("古宝养成非参与活动中: actNum=%s" % actNum, playerID)
|
| | | continue
|
| | | |
| | | addGubaoScore = 0
|
| | | pieceQualityScoreDict = IpyGameDataPY.GetFuncEvalCfg("GubaoAct", 1, {})
|
| | | for pieceID, pieceCount in costPieceInfo.items():
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("Gubao", pieceID)
|
| | | if not ipyData:
|
| | | continue
|
| | | quality = ipyData.GetGubaoQuality()
|
| | | if str(quality) not in pieceQualityScoreDict:
|
| | | continue
|
| | | qualityScore = pieceQualityScoreDict[str(quality)] * pieceCount
|
| | | addGubaoScore += qualityScore
|
| | | GameWorld.DebugLog("古宝活动碎片积分统计: actNum=%s,pieceID=%s,quality=%s,pieceCount=%s,qualityScore=%s, %s" |
| | | % (actNum, pieceID, quality, pieceCount, qualityScore, addGubaoScore))
|
| | | |
| | | otherAddScore = IpyGameDataPY.GetFuncCfg("GubaoAct", 2)
|
| | | for itemID, costCount in costItemList:
|
| | | otherScore = costCount * otherAddScore
|
| | | addGubaoScore += otherScore
|
| | | GameWorld.DebugLog("古宝活动其他积分统计: actNum=%s,itemID=%s,costCount=%s,otherScore=%s, %s" |
| | | % (actNum, itemID, costCount, otherScore, addGubaoScore))
|
| | | |
| | | if addGubaoScore <= 0:
|
| | | continue
|
| | | |
| | | AddPlayerScore(curPlayer, actNum, addGubaoScore)
|
| | | |
| | | return
|
| | |
|
| | | def AddPlayerScore(curPlayer, actNum, addScore):
|
| | | if addScore <= 0:
|
| | | return 0
|
| | | score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
|
| | | updScore = score + addScore
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, updScore)
|
| | | GameWorld.DebugLog("古宝活动增加积分: actNum=%s,addScore=%s,updScore=%s" % (actNum, addScore, updScore))
|
| | | Sync_GubaoPlayerInfo(curPlayer, actNum)
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_GubaoScore, updScore, autoSort=True)
|
| | | SendToGameServer_Gubao(curPlayer, "AddGubaoScore", [addScore, updScore])
|
| | | return updScore
|
| | |
|
| | | def SendToGameServer_Gubao(curPlayer, msgType, dataMsg=""):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | msgList = str([msgType, dataMsg])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(playerID, 0, 0, "ActGubao", msgList, len(msgList))
|
| | | GameWorld.Log("古宝养成发送GameServer: %s, %s" % (msgType, dataMsg), playerID)
|
| | | return
|
| | |
|
| | | def Sync_GubaoActionInfo(curPlayer, actNum):
|
| | | ## 通知活动信息
|
| | | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_Gubao, actNum)
|
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActGubao", cfgID)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | personalTempID = ipyData.GetPersonalTemplateID()
|
| | | personalTempIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGubaoBillTemp", personalTempID) if personalTempID else []
|
| | | |
| | | startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData)
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCActGubaoInfo()
|
| | | clientPack.ActNum = actNum
|
| | | clientPack.StartDate = startDateStr
|
| | | clientPack.EndtDate = endDateStr
|
| | | clientPack.JoinStartTime = ipyData.GetJoinStartTime()
|
| | | clientPack.JoinEndTime = ipyData.GetJoinEndTime()
|
| | | clientPack.LimitLV = ipyData.GetLVLimit()
|
| | | |
| | | clientPack.PersonalBillboardInfoList = __GetTempRankBillPackList(personalTempIpyDataList)
|
| | | clientPack.PersonalBillCount = len(clientPack.PersonalBillboardInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def Sync_GubaoPlayerInfo(curPlayer, actNum):
|
| | | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_Gubao, actNum)
|
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCActGubaoPlayerInfo()
|
| | | clientPack.ActNum = actNum
|
| | | clientPack.Score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def Sync_CrossActGubaoActionInfo(curPlayer):
|
| | | ## 通知活动信息
|
| | | actInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao)
|
| | | if not actInfo:
|
| | | return
|
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | | |
| | | ipyDataDict = actInfo.get(ShareDefine.ActKey_IpyDataInfo, {})
|
| | | if not ipyDataDict:
|
| | | return
|
| | | |
| | | personalTempID = ipyDataDict.get("PersonalTemplateID", 0)
|
| | | personalTempIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActGubaoBillTemp", personalTempID) if personalTempID else []
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCCrossActGubaoInfo()
|
| | | clientPack.ServerIDRangeInfo = str(actInfo.get(ShareDefine.ActKey_ServerIDRangeList, []))
|
| | | clientPack.ServerInfoLen = len(clientPack.ServerIDRangeInfo)
|
| | | clientPack.GroupValue1 = ipyDataDict.get("ZoneID", 0)
|
| | | clientPack.StartDate = ipyDataDict.get("StartDate", "")
|
| | | clientPack.EndtDate = ipyDataDict.get("EndDate", "")
|
| | | clientPack.JoinStartTime = ipyDataDict.get("JoinStartTime", "")
|
| | | clientPack.JoinEndTime = ipyDataDict.get("JoinEndTime", "")
|
| | | clientPack.RankLimitPersonal = ipyDataDict.get("RankLimitPersonal", 0)
|
| | | |
| | | clientPack.PersonalBillboardInfoList = __GetTempRankBillPackList(personalTempIpyDataList)
|
| | | clientPack.PersonalBillCount = len(clientPack.PersonalBillboardInfoList)
|
| | | |
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def __GetTempRankBillPackList(ipyDataList):
|
| | | packBillList = []
|
| | | if not ipyDataList:
|
| | | return packBillList
|
| | | for tempIpyData in ipyDataList:
|
| | | rankInfo = ChPyNetSendPack.tagMCActGubaoBillard()
|
| | | rankInfo.Rank = tempIpyData.GetRank()
|
| | | |
| | | rankInfo.AwardItemList = []
|
| | | awardItemList = tempIpyData.GetAwardItemList()
|
| | | for itemID, itemCount, isAuctionItem in awardItemList:
|
| | | item = ChPyNetSendPack.tagMCActGubaoItem()
|
| | | item.Clear()
|
| | | item.ItemID = itemID
|
| | | item.ItemCount = itemCount
|
| | | item.IsBind = isAuctionItem
|
| | | rankInfo.AwardItemList.append(item)
|
| | | rankInfo.Count = len(rankInfo.AwardItemList)
|
| | | |
| | | # rankInfo.MemAwardItemList = []
|
| | | # memAwardItemList = tempIpyData.GetMemAwardItemList()
|
| | | # for itemID, itemCount, isAuctionItem in memAwardItemList:
|
| | | # item = ChPyNetSendPack.tagMCActGubaoItem()
|
| | | # item.Clear()
|
| | | # item.ItemID = itemID
|
| | | # item.ItemCount = itemCount
|
| | | # item.IsBind = isAuctionItem
|
| | | # rankInfo.MemAwardItemList.append(item)
|
| | | # rankInfo.MemCount = len(rankInfo.MemAwardItemList)
|
| | | |
| | | packBillList.append(rankInfo)
|
| | | return packBillList
|
| | |
| | | __ResetTaskValueByTemplateID(curPlayer, actNum, lastTempID)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskID % actNum, actID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskRound % actNum, 0)
|
| | |
|
| | | if state:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskAward % (actNum, keyNum), 0)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskTempID % actNum, templateID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskRound % actNum, 1)
|
| | | return
|
| | |
|
| | | def __GetTaskAwardRecordKeyNumMax(templateID, defKeyNum=2):
|
| | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
|
| | | if not ipyData:
|
| | | continue
|
| | | roundMax = ipyData.GetRoundMax()
|
| | | templateID = ipyData.GetTemplateID()
|
| | |
|
| | | taskIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActTaskTemp", templateID)
|
| | |
| | | needValueMax = needValue
|
| | |
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskValue % (actNum, taskType))
|
| | | if roundMax > 1:
|
| | | needValueMax *= roundMax
|
| | | if curValue >= needValueMax:
|
| | | continue
|
| | |
|
| | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActTask", cfgID)
|
| | | if not ipyData:
|
| | | return
|
| | | roundMax = ipyData.GetRoundMax()
|
| | | templateID = ipyData.GetTemplateID()
|
| | |
|
| | | taskIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActTaskTemp", templateID)
|
| | |
| | |
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ActTaskAward, awardIndex, 1, True, [actNum])
|
| | |
|
| | | Sync_ActTaskPlayerInfo(curPlayer, actNum)
|
| | | |
| | | GameWorld.DebugLog("领取任务活动奖励! actNum=%s,cfgID=%s,taskID=%s,awardItemList=%s" % (actNum, cfgID, taskID, awardItemList))
|
| | | roundNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskRound % actNum)
|
| | | GameWorld.DebugLog("领取任务活动奖励! actNum=%s,cfgID=%s,roundNum=%s,taskID=%s,awardItemList=%s" % (actNum, cfgID, roundNum, taskID, awardItemList))
|
| | |
|
| | | for itemID, itemCount, isAuctionItem in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActTask", False, {}])
|
| | |
|
| | | # 检查进入下一轮
|
| | | if roundMax > 1 and roundNum < roundMax:
|
| | | roundFinish = True
|
| | | taskMaxValueInfo = {}
|
| | | for taskIpyData in taskIpyDataList:
|
| | | rTaskID = taskIpyData.GetTaskID()
|
| | | rTaskType = taskIpyData.GetTaskType()
|
| | | rNeedValue = taskIpyData.GetNeedValue()
|
| | | if rNeedValue > taskMaxValueInfo.get(rTaskType, 0):
|
| | | taskMaxValueInfo[rTaskType] = rNeedValue
|
| | | rAwardIndex = rTaskID
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ActTaskAward, rAwardIndex, True, [actNum]):
|
| | | roundFinish = False
|
| | | GameWorld.DebugLog("还有任务未领取,不进入下一轮次! actNum=%s,cfgID=%s,roundNum=%s,rTaskID=%s" % (actNum, cfgID, roundNum, rTaskID))
|
| | | break
|
| | | |
| | | if roundFinish:
|
| | | nextRound = roundNum + 1
|
| | | GameWorld.DebugLog("本轮任务领取完毕,进入下一轮! nextRound=%s" % (nextRound))
|
| | | for rTaskType, rMaxValue in taskMaxValueInfo.items():
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskValue % (actNum, taskType))
|
| | | updValue = max(0, curValue - rMaxValue)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskValue % (actNum, taskType), updValue)
|
| | | GameWorld.DebugLog(" 更新新一轮任务值! rTaskType=%s,rMaxValue=%s,curValue=%s,updValue=%s" |
| | | % (rTaskType, rMaxValue, curValue, updValue))
|
| | | Sync_ActTaskPlayerValueInfo(curPlayer, actNum, taskMaxValueInfo.keys())
|
| | | |
| | | # 任务领奖记录
|
| | | taskAwardKeyNum = __GetTaskAwardRecordKeyNumMax(templateID, 10)
|
| | | for keyNum in range(taskAwardKeyNum + 1):
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskAward % (actNum, keyNum), 0)
|
| | | GameWorld.DebugLog(" 重置新一轮领奖记录! taskAwardKeyNum=%s" % (taskAwardKeyNum))
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActTaskRound % actNum, nextRound)
|
| | | |
| | | Sync_ActTaskPlayerInfo(curPlayer, actNum)
|
| | | return
|
| | |
|
| | | def Sync_ActTaskPlayerInfo(curPlayer, actNum):
|
| | |
| | |
|
| | | clientPack = ChPyNetSendPack.tagMCActTaskPlayerInfo()
|
| | | clientPack.ActNum = actNum
|
| | | clientPack.RoundNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskRound % actNum)
|
| | | clientPack.AwardRecordList = []
|
| | | for keyNum in range(keyNumMax + 1):
|
| | | clientPack.AwardRecordList.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActTaskAward % (actNum, keyNum)))
|
| | |
| | | actPack.IsDayReset = ipyData.GetIsDayReset()
|
| | | actPack.ResetType = ipyData.GetResetType()
|
| | | actPack.LimitLV = ipyData.GetLVLimit()
|
| | | actPack.RoundMax = ipyData.GetRoundMax()
|
| | |
|
| | | actPack.TaskList = []
|
| | | for taskIpyData in taskIpyDataList:
|
| | |
| | | import PlayerActTotalRecharge
|
| | | import PlayerActGarbageSorting
|
| | | import PlayerActXianXiaMJ
|
| | | import PlayerActGubao
|
| | | import PlayerActGodGift
|
| | | import PlayerActFamilyCTGAssist
|
| | | import PlayerActRechargeRebateGold
|
| | |
| | | elif actionName == ShareDefine.OperationActionName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.RefreshXianXiaMJActionInfo(actNum)
|
| | |
|
| | | elif actionName == ShareDefine.OperationActionName_Gubao:
|
| | | PlayerActGubao.RefreshGubaoActionInfo(actNum)
|
| | | |
| | | elif actionName == ShareDefine.OperationActionName_GodGift:
|
| | | PlayerActGodGift.RefreshGodGiftActionInfo(actNum)
|
| | |
|
| | |
| | | elif actionName == ShareDefine.CrossActName_XianXiaMJ:
|
| | | PlayerActXianXiaMJ.RefreshCrossActXianXiaMJInfo()
|
| | |
|
| | | elif actionName == ShareDefine.CrossActName_Gubao:
|
| | | PlayerActGubao.RefreshCrossActGubaoInfo()
|
| | | |
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_CrossZoneName:
|
| | |
| | | import ItemControler
|
| | | import PlayerDienstgrad
|
| | | import PlayerGatherTheSoul
|
| | | import PlayerActGubao
|
| | | import PlayerCoat
|
| | |
|
| | | GubaoEffType_FamilyWar = 48 # 参与仙盟联赛每X次+XXX属性 x次
|
| | |
| | |
|
| | | RefreshGubaoAttr(curPlayer)
|
| | | Sync_GubaoInfo(curPlayer, [gubaoID])
|
| | | |
| | | PlayerActGubao.OnGubaoCost(curPlayer, needPieceInfo, realNeedItemList)
|
| | | return
|
| | |
|
| | | #// B2 17 古宝升星 #tagCMGubaoStarUp
|
| | |
| | | GameWorld.Log("古宝升星: gubaoID=%s,updStar=%s" % (gubaoID, updStar), playerID)
|
| | | RefreshGubaoAttr(curPlayer)
|
| | | Sync_GubaoInfo(curPlayer, [gubaoID])
|
| | | |
| | | PlayerActGubao.OnGubaoCost(curPlayer, needPieceInfo, realNeedItemList)
|
| | | return
|
| | |
|
| | | #// B2 18 古宝升级 #tagCMGubaoLVUp
|
| | |
| | | GameWorld.Log("古宝升级: gubaoID=%s,gubaoType=%s,quality=%s,updLV=%s" % (gubaoID, gubaoType, quality, updLV), playerID)
|
| | | RefreshGubaoAttr(curPlayer)
|
| | | Sync_GubaoInfo(curPlayer, [gubaoID])
|
| | | |
| | | PlayerActGubao.OnGubaoCost(curPlayer, needPieceInfo, realNeedItemList)
|
| | | return
|
| | |
|
| | | def GetGubaoTotalLVStar(curPlayer):
|
| | |
| | | import PlayerFeastTravel
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import PlayerActTask
|
| | | import ItemCommon
|
| | | import ChConfig
|
| | |
|
| | |
| | | TreasureType_Rune, # 符印寻宝 2
|
| | | TreasureType_Jueshi, # 绝世君宝 3
|
| | | TreasureType_GatherTheSoul, # 聚魂猎魔 4
|
| | | ) = range(1, 1 + 4)
|
| | | TreasureType_Gubao, # 古宝寻宝 5
|
| | | ) = range(1, 1 + 5)
|
| | |
|
| | | def DoTreasureOpen(curPlayer):
|
| | | ## 寻宝开启
|
| | |
| | | PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_JSTreasure, treasureCount)
|
| | | elif treasureType == TreasureType_GatherTheSoul:
|
| | | pass
|
| | | elif treasureType == TreasureType_Gubao:
|
| | | PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_TreasureGubao, treasureCount)
|
| | |
|
| | | # 给物品
|
| | | mailItemList = []
|
| | |
| | | OperationActionName_ActTask = "ActTask" # 活动任务
|
| | | OperationActionName_BuyCountGift = "ActBuyCountGift" # 购买次数礼包活动
|
| | | OperationActionName_FamilyCTGAssist = "ActFamilyCTGAssist" # 仙盟充值协助
|
| | | OperationActionName_Gubao = "ActGubao" # 古宝养成活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift, OperationActionName_FamilyCTGAssist,
|
| | | OperationActionName_Gubao,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | |
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift, OperationActionName_FamilyCTGAssist,
|
| | | OperationActionName_Gubao,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | |
| | | CrossActName_LuckyCloudBuy = "CrossActLuckyCloudBuy" # 幸运云购
|
| | | CrossActName_BossTrial = "CrossActBossTrial" # Boss历练 - 跨服
|
| | | CrossActName_XianXiaMJ = "CrossActXianXiaMJ" # 仙匣秘境 - 跨服
|
| | | CrossActName_Gubao = "CrossActGubao" # 古宝养成 - 跨服
|
| | |
|
| | | #跨服运营活动列表
|
| | | CrossActNameList = [CrossActName_CTGBillboard, CrossActName_AllRecharge, CrossActName_LuckyCloudBuy, CrossActName_BossTrial, CrossActName_XianXiaMJ]
|
| | | CrossActNameList = [CrossActName_CTGBillboard, CrossActName_AllRecharge, CrossActName_LuckyCloudBuy, CrossActName_BossTrial, CrossActName_XianXiaMJ, CrossActName_Gubao]
|
| | | #需要锁定活动分区分配直到活动结束的跨服运营活动,即使热更分区配置,也不会改变正在活动中的分区设定,直到活动结束
|
| | | CrossActLockServerGroupIDList = [CrossActName_CTGBillboard, CrossActName_AllRecharge]
|
| | |
|
| | |
| | | Def_BT_BossTrialSubmitFamily, #提交boss凭证仙盟榜 (boss历练活动)
|
| | | Def_BT_BossTrialSubmitFamilyBak, #提交boss凭证仙盟榜 (boss历练活动 - 上一期)
|
| | | Def_BT_XianXiaMJScore, #仙匣秘境积分榜 (仙匣秘境活动)
|
| | | Def_BT_GubaoScore, #古宝养成积分榜 (古宝养成活动)
|
| | |
|
| | | Def_BT_Max, #排行榜最大类型
|
| | | ) = range(0, 38 + 2) |
| | | ) = range(0, 39 + 2) |
| | |
|
| | | ''' 跨服排行榜类型, 从 150 开始
|
| | | 与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
|
| | |
| | | Def_CBT_BossTrialSubmitFamily, # boss凭证 - 仙盟榜 160
|
| | | Def_CBT_BossTrialSubmitFamilyBak, # boss凭证 - 仙盟榜 上一期 161
|
| | | Def_CBT_XianXiaMJScore, # 仙匣秘境积分 - 个人榜 162
|
| | | ) = range(150, 162 + 1)
|
| | | Def_CBT_GubaoScore, # 古宝养成积分 - 个人榜 163
|
| | | ) = range(150, 163 + 1)
|
| | |
|
| | | # 跨服榜单最大数据名次,没有设置的默认100
|
| | | CrossBillboard_MaxDataCount = {
|
| | |
| | | Def_CBT_BossTrialSubmit:1000,
|
| | | Def_CBT_BossTrialSubmitBak:1000,
|
| | | Def_CBT_XianXiaMJScore:1000,
|
| | | Def_CBT_GubaoScore:1000,
|
| | | }
|
| | |
|
| | | #职业对应战力排行榜类型
|
| | |
| | | ClientServerMsg_ChangeFuncTeam = "ChangeFuncTeam" # 修改功能队伍
|
| | | ClientServerMsg_FuncTeamMemOP = "FuncTeamMemOP" # 功能队伍成员操作
|
| | | ClientServerMsg_QueryFuncTeam = "QueryFuncTeam" # 查询功能队伍
|
| | | ClientServerMsg_GubaoScore = "GubaoScore" # 古宝养成积分
|
| | |
|
| | | #跨服广播类型定义
|
| | | CrossNotify_CrossAct = "CrossAct"
|