10173 【主干】【香港】【越南】BOSS凭证(新增购买次数礼包活动)
| | |
| | | WORD LVLimit; //限制等级
|
| | | };
|
| | |
|
| | | //购买次数礼包活动时间表
|
| | |
|
| | | struct tagActBuyCountGift
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | list PlatformList; //活动平台列表["平台A", "平台A", ...],配[]代表所有
|
| | | list ServerGroupIDList; //服务器ID列表
|
| | | BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | };
|
| | |
|
| | | //任务活动时间表
|
| | |
|
| | | struct tagActTask
|
| | |
| | | WORD Point; //积分
|
| | | };
|
| | |
|
| | | //购买次数礼包活动时间表
|
| | |
|
| | | struct tagActBuyCountGift
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | list CTGIDList; //充值ID列表
|
| | | dict CTGCountAwardInfo; //累计充值次数额外奖励
|
| | | };
|
| | |
|
| | | //任务活动时间表
|
| | |
|
| | | struct tagActTask
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 74 购买次数礼包活动信息 #tagMCActBuyCountGiftInfo
|
| | |
|
| | | class tagMCActBuyCountGiftItem(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(tagMCActBuyCountGiftItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGift(Structure):
|
| | | NeedBuyCount = 0 #(BYTE NeedBuyCount)// 所需总购买次数
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActBuyCountGiftItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.NeedBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActBuyCountGiftItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.NeedBuyCount = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.NeedBuyCount)
|
| | | 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 = '''
|
| | | NeedBuyCount:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.NeedBuyCount,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGiftInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDList = list() #(vector<DWORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | GiftCount = 0 #(BYTE GiftCount)
|
| | | BuyCountGiftList = list() #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x74
|
| | | 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.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftCount):
|
| | | temBuyCountGiftList = tagMCActBuyCountGift()
|
| | | _pos = temBuyCountGiftList.ReadData(_lpData, _pos)
|
| | | self.BuyCountGiftList.append(temBuyCountGiftList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x74
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDList = list()
|
| | | self.GiftCount = 0
|
| | | self.BuyCountGiftList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.CTGIDCount
|
| | | length += 1
|
| | | for i in range(self.GiftCount):
|
| | | length += self.BuyCountGiftList[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.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteBYTE(data, self.ResetType)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteDWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.GiftCount)
|
| | | for i in range(self.GiftCount):
|
| | | data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | CTGIDCount:%d,
|
| | | CTGIDList:%s,
|
| | | GiftCount:%d,
|
| | | BuyCountGiftList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.CTGIDCount,
|
| | | "...",
|
| | | self.GiftCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBuyCountGiftInfo=tagMCActBuyCountGiftInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftInfo.Head.Cmd,m_NAtagMCActBuyCountGiftInfo.Head.SubCmd))] = m_NAtagMCActBuyCountGiftInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 75 购买次数礼包活动玩家信息 #tagMCActBuyCountGiftPlayerInfo
|
| | |
|
| | | class tagMCActBuyCountGiftPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("GiftAwardRecord", c_int), # 购买次数礼包领奖记录,直接用购买次数做位运算判断是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x75
|
| | | 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 = 0x75
|
| | | self.ActNum = 0
|
| | | self.GiftAwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBuyCountGiftPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 75 购买次数礼包活动玩家信息 //tagMCActBuyCountGiftPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | GiftAwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.GiftAwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBuyCountGiftPlayerInfo=tagMCActBuyCountGiftPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftPlayerInfo.Cmd,m_NAtagMCActBuyCountGiftPlayerInfo.SubCmd))] = m_NAtagMCActBuyCountGiftPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 65 买一送多活动信息 #tagMCActBuyOneInfo
|
| | |
|
| | | class tagMCActBuyOneInfoFreeItem(Structure):
|
| | |
| | | ("WORD", "LVLimit", 0),
|
| | | ),
|
| | |
|
| | | "ActBuyCountGift":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("list", "PlatformList", 0),
|
| | | ("list", "ServerGroupIDList", 0),
|
| | | ("BYTE", "ActNum", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ),
|
| | |
|
| | | "ActTask":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("list", "PlatformList", 0),
|
| | |
| | | def GetNotifyInfoEnd(self): return self.attrTuple[10] # 全服提示信息 - 相对结束时间 dict
|
| | | def GetLVLimit(self): return self.attrTuple[11] # 限制等级 WORD |
| | | |
| | | # 购买次数礼包活动时间表 |
| | | class IPY_ActBuyCountGift(): |
| | | |
| | | 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 GetNotifyInfoStart(self): return self.attrTuple[6] # 全服提示信息 - 相对开始时间 dict
|
| | | def GetNotifyInfoEnd(self): return self.attrTuple[7] # 全服提示信息 - 相对结束时间 dict
|
| | | def GetNotifyInfoLoop(self): return self.attrTuple[8] # 全服提示信息 - 循环广播[间隔分钟, 广播key] list
|
| | | def GetIsDayReset(self): return self.attrTuple[9] # 是否每天重置 BYTE
|
| | | def GetResetType(self): return self.attrTuple[10] # 重置类型,0-0点重置;1-5点重置 BYTE |
| | | |
| | | # 任务活动时间表 |
| | | class IPY_ActTask(): |
| | | |
| | |
| | | self.__LoadFileData("CrossDemonLandZoneMap", onlyCheck)
|
| | | self.__LoadFileData("CrossFamilyFlagwarZoneMap", onlyCheck)
|
| | | self.__LoadFileData("ActWeekParty", onlyCheck)
|
| | | self.__LoadFileData("ActBuyCountGift", onlyCheck)
|
| | | self.__LoadFileData("ActTask", onlyCheck)
|
| | | self.__LoadFileData("ActLoginNew", onlyCheck)
|
| | | self.__LoadFileData("ActLoginAward", onlyCheck)
|
| | |
| | | self.CheckLoadData("ActWeekParty") |
| | | return self.ipyActWeekPartyCache[index]
|
| | | |
| | | def GetActBuyCountGiftCount(self): |
| | | self.CheckLoadData("ActBuyCountGift") |
| | | return self.ipyActBuyCountGiftLen
|
| | | def GetActBuyCountGiftByIndex(self, index): |
| | | self.CheckLoadData("ActBuyCountGift") |
| | | return self.ipyActBuyCountGiftCache[index]
|
| | | |
| | | def GetActTaskCount(self): |
| | | self.CheckLoadData("ActTask") |
| | | return self.ipyActTaskLen
|
| | |
| | | OperationActionName_BossTrial = "ActBossTrial" # Boss历练
|
| | | OperationActionName_ActLoginNew = "ActLoginNew" # 登录活动-新
|
| | | OperationActionName_ActTask = "ActTask" # 活动任务
|
| | | OperationActionName_BuyCountGift = "ActBuyCountGift" # 购买次数礼包活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_XianXiaMJ, OperationActionName_GodGift,
|
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | |
| | | OperationActionName_XianXiaMJ, OperationActionName_GodGift,
|
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | |
| | | Def_PDict_ActTaskTempID = "ActTaskTempID_%s" # 任务活动模板ID,参数:(活动编号)
|
| | | Def_PDict_ActTaskValue = "ActTaskValue_%s_%s" # 任务活动当前任务进度值,参数:(活动编号, 任务类型)
|
| | | Def_PDict_ActTaskAward = "ActTaskAward_%s_%s" # 任务活动奖励记录,按位记录任务ID是否已领取,参数:(活动编号,key编号)
|
| | |
|
| | | #购买次数礼包活动
|
| | | Def_PDict_BuyCountGiftID = "BuyCountGiftID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time,参数(活动编号)
|
| | | Def_PDict_BuyCountGiftAward = "BuyCountGiftAward_%s" # 礼包奖励记录,按位记录是否已领取,参数(活动编号)
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | #开服活动,Def_PDictType_OpenServerCampaign
|
| | |
| | | Def_RewardType_MineTreasure, #福地聚宝盆奖励 69
|
| | | Def_RewardType_ActLoginAwardNew, # 领取登录活动奖励70
|
| | | Def_RewardType_ActTask, # 领取任务活动奖励71
|
| | | )= range(72)
|
| | | Def_RewardType_ActBuyCountGift, # 领取购买次数礼包活动 72
|
| | | )= range(73)
|
| | |
|
| | | #boss复活相关活动定义
|
| | | BossRebornActIDList = (
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 74 购买次数礼包活动信息 #tagMCActBuyCountGiftInfo
|
| | |
|
| | | class tagMCActBuyCountGiftItem(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(tagMCActBuyCountGiftItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGift(Structure):
|
| | | NeedBuyCount = 0 #(BYTE NeedBuyCount)// 所需总购买次数
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActBuyCountGiftItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.NeedBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActBuyCountGiftItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.NeedBuyCount = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.NeedBuyCount)
|
| | | 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 = '''
|
| | | NeedBuyCount:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.NeedBuyCount,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGiftInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDList = list() #(vector<DWORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | GiftCount = 0 #(BYTE GiftCount)
|
| | | BuyCountGiftList = list() #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x74
|
| | | 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.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftCount):
|
| | | temBuyCountGiftList = tagMCActBuyCountGift()
|
| | | _pos = temBuyCountGiftList.ReadData(_lpData, _pos)
|
| | | self.BuyCountGiftList.append(temBuyCountGiftList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x74
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDList = list()
|
| | | self.GiftCount = 0
|
| | | self.BuyCountGiftList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.CTGIDCount
|
| | | length += 1
|
| | | for i in range(self.GiftCount):
|
| | | length += self.BuyCountGiftList[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.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteBYTE(data, self.ResetType)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteDWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.GiftCount)
|
| | | for i in range(self.GiftCount):
|
| | | data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | CTGIDCount:%d,
|
| | | CTGIDList:%s,
|
| | | GiftCount:%d,
|
| | | BuyCountGiftList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.CTGIDCount,
|
| | | "...",
|
| | | self.GiftCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBuyCountGiftInfo=tagMCActBuyCountGiftInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftInfo.Head.Cmd,m_NAtagMCActBuyCountGiftInfo.Head.SubCmd))] = m_NAtagMCActBuyCountGiftInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 75 购买次数礼包活动玩家信息 #tagMCActBuyCountGiftPlayerInfo
|
| | |
|
| | | class tagMCActBuyCountGiftPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("GiftAwardRecord", c_int), # 购买次数礼包领奖记录,直接用购买次数做位运算判断是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x75
|
| | | 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 = 0x75
|
| | | self.ActNum = 0
|
| | | self.GiftAwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBuyCountGiftPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 75 购买次数礼包活动玩家信息 //tagMCActBuyCountGiftPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | GiftAwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.GiftAwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBuyCountGiftPlayerInfo=tagMCActBuyCountGiftPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftPlayerInfo.Cmd,m_NAtagMCActBuyCountGiftPlayerInfo.SubCmd))] = m_NAtagMCActBuyCountGiftPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 65 买一送多活动信息 #tagMCActBuyOneInfo
|
| | |
|
| | | class tagMCActBuyOneInfoFreeItem(Structure):
|
| | |
| | | ("WORD", "Point", 0),
|
| | | ),
|
| | |
|
| | | "ActBuyCountGift":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("list", "CTGIDList", 0),
|
| | | ("dict", "CTGCountAwardInfo", 0),
|
| | | ),
|
| | |
|
| | | "ActTask":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | |
| | | def GetReward(self): return self.attrTuple[4] # 奖励物品 list
|
| | | def GetPoint(self): return self.attrTuple[5] # 积分 WORD |
| | | |
| | | # 购买次数礼包活动时间表 |
| | | class IPY_ActBuyCountGift(): |
| | | |
| | | 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 GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
|
| | | def GetIsDayReset(self): return self.attrTuple[4] # 是否每天重置 BYTE
|
| | | def GetResetType(self): return self.attrTuple[5] # 重置类型,0-0点重置;1-5点重置 BYTE
|
| | | def GetCTGIDList(self): return self.attrTuple[6] # 充值ID列表 list
|
| | | def GetCTGCountAwardInfo(self): return self.attrTuple[7] # 累计充值次数额外奖励 dict |
| | | |
| | | # 任务活动时间表 |
| | | class IPY_ActTask(): |
| | | |
| | |
| | | self.__LoadFileData("CoatChestUp", onlyCheck)
|
| | | self.__LoadFileData("ActWeekParty", onlyCheck)
|
| | | self.__LoadFileData("WeekParty", onlyCheck)
|
| | | self.__LoadFileData("ActBuyCountGift", onlyCheck)
|
| | | self.__LoadFileData("ActTask", onlyCheck)
|
| | | self.__LoadFileData("ActTaskTemp", onlyCheck)
|
| | | self.__LoadFileData("ActLoginNew", onlyCheck)
|
| | |
| | | self.CheckLoadData("WeekParty") |
| | | return self.ipyWeekPartyCache[index]
|
| | | |
| | | def GetActBuyCountGiftCount(self): |
| | | self.CheckLoadData("ActBuyCountGift") |
| | | return self.ipyActBuyCountGiftLen
|
| | | def GetActBuyCountGiftByIndex(self, index): |
| | | self.CheckLoadData("ActBuyCountGift") |
| | | return self.ipyActBuyCountGiftCache[index]
|
| | | |
| | | def GetActTaskCount(self): |
| | | self.CheckLoadData("ActTask") |
| | | return self.ipyActTaskLen
|
| | |
| | | import GameObj
|
| | | import PlayerChangeJob
|
| | | import PlayerActLoginNew
|
| | | import PlayerActBuyCountGift
|
| | | import PlayerActTask
|
| | |
|
| | | import datetime
|
| | |
| | | PlayerActHorsePetFeast.OnLogin(curPlayer)
|
| | | # 周狂欢活动
|
| | | PlayerWeekParty.OnLogin(curPlayer)
|
| | | # 购买次数礼包活动
|
| | | PlayerActBuyCountGift.OnPlayerLogin(curPlayer)
|
| | | # 任务活动
|
| | | PlayerActTask.OnPlayerLogin(curPlayer)
|
| | | # 登录活动
|
| | |
| | | # 领取登录活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ActLoginAwardNew:
|
| | | PlayerActLoginNew.OnGetActLoginAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取购买次数礼包活动
|
| | | elif rewardType == ChConfig.Def_RewardType_ActBuyCountGift:
|
| | | PlayerActBuyCountGift.OnGetBuyCountGiftAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取任务活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ActTask:
|
| | | PlayerActTask.OnGetActTaskAward(curPlayer, dataEx, dataExStr)
|
New file |
| | |
| | | #!/usr/bin/python |
| | | # -*- coding: GBK -*- |
| | | #------------------------------------------------------------------------------- |
| | | # |
| | | ##@package Player.PlayerActBuyCountGift |
| | | # |
| | | # @todo:购买次数礼包活动 |
| | | # @author hxp |
| | | # @date 2024-06-05 |
| | | # @version 1.0 |
| | | # |
| | | # 详细描述: 购买次数礼包活动 |
| | | # |
| | | #------------------------------------------------------------------------------- |
| | | #"""Version = 2024-06-05 12:00""" |
| | | #------------------------------------------------------------------------------- |
| | | |
| | | import PyGameData |
| | | import ShareDefine |
| | | import PlayerControl |
| | | import IpyGameDataPY |
| | | import ChPyNetSendPack |
| | | import DataRecordPack |
| | | import NetPackCommon |
| | | import ItemControler |
| | | import IPY_GameWorld |
| | | import PlayerCoin |
| | | import GameWorld |
| | | import ChConfig |
| | | |
| | | def OnPlayerLogin(curPlayer): |
| | | |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BuyCountGift, {}).values(): |
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0) |
| | | isReset = __CheckPlayerBuyCountGiftAction(curPlayer, actNum) |
| | | # 活动中同步活动信息 |
| | | if not isReset and actInfo.get(ShareDefine.ActKey_State): |
| | | Sync_BuyCountGiftActionInfo(curPlayer, actNum) |
| | | Sync_BuyCountGiftPlayerInfo(curPlayer, actNum) |
| | | |
| | | return |
| | | |
| | | def RefreshBuyCountGiftActionInfo(actNum): |
| | | ## 收到GameServer同步的活动信息,刷新活动信息 |
| | | playerManager = GameWorld.GetPlayerManager() |
| | | for index in xrange(playerManager.GetPlayerCount()): |
| | | curPlayer = playerManager.GetPlayerByIndex(index) |
| | | if curPlayer.GetID() == 0: |
| | | continue |
| | | __CheckPlayerBuyCountGiftAction(curPlayer, actNum) |
| | | |
| | | return |
| | | |
| | | def __CheckPlayerBuyCountGiftAction(curPlayer, actNum): |
| | | ## 检查玩活动数据信息 |
| | | |
| | | playerID = curPlayer.GetPlayerID() |
| | | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_BuyCountGift, 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_BuyCountGiftID % actNum) # 玩家身上的活动ID |
| | | |
| | | # 活动ID 相同的话不处理 |
| | | if actID == playerActID: |
| | | GameWorld.DebugLog("购买次数礼包活动ID不变,不处理! actNum=%s,cfgID=%s,actID=%s" % (actNum, cfgID, actID), curPlayer.GetPlayerID()) |
| | | return |
| | | GameWorld.DebugLog("购买次数礼包活动重置! actNum=%s,cfgID=%s,actID=%s,playerActID=%s,state=%s" % (actNum, cfgID, actID, playerActID, state), playerID) |
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BuyCountGiftID % actNum, actID) |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BuyCountGiftAward % actNum, 0) |
| | | |
| | | if state: |
| | | # 重置充值ID充值记录 |
| | | __ResetCTGIDCount(curPlayer, actInfo) |
| | | |
| | | Sync_BuyCountGiftActionInfo(curPlayer, actNum) |
| | | Sync_BuyCountGiftPlayerInfo(curPlayer, actNum) |
| | | |
| | | return True |
| | | |
| | | def __ResetCTGIDCount(curPlayer, actInfo): |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID) |
| | | if not ipyData: |
| | | return |
| | | resetCTGIDList = ipyData.GetCTGIDList() |
| | | PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActBuyCountGift", resetCTGIDList) |
| | | return |
| | | |
| | | def OnGetBuyCountGiftAward(curPlayer, buyCount, actNum): |
| | | playerID = curPlayer.GetPlayerID() |
| | | |
| | | actNum = GameWorld.ToIntDef(actNum, 0) |
| | | if actNum <= 0: |
| | | GameWorld.DebugLog("没有指定领取的活动编号! actNum=%s" % actNum, playerID) |
| | | return |
| | | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_BuyCountGift, actNum) |
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State): |
| | | GameWorld.DebugLog("购买次数礼包非活动中无法领取奖励! actNum=%s" % actNum, playerID) |
| | | return |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID) |
| | | if not ipyData: |
| | | return |
| | | CTGIDList = ipyData.GetCTGIDList() |
| | | CTGCountAwardInfo = ipyData.GetCTGCountAwardInfo() |
| | | if buyCount not in CTGCountAwardInfo: |
| | | GameWorld.DebugLog("购买次数礼包没有该次数礼包奖励! actNum=%s,cfgID=%s,buyCount=%s" % (actNum, cfgID, buyCount), playerID) |
| | | return |
| | | awardItemList = CTGCountAwardInfo[buyCount] |
| | | |
| | | totalBuyCount = 0 |
| | | for ctgID in CTGIDList: |
| | | totalBuyCount += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % ctgID) |
| | | |
| | | if totalBuyCount < buyCount: |
| | | GameWorld.Log("购买次数礼包活动累计购买次数不足,无法免费领取! actNum=%s,cfgID=%s,CTGIDList=%s,totalBuyCount=%s < %s" |
| | | % (actNum, cfgID, CTGIDList, totalBuyCount, buyCount), playerID) |
| | | return |
| | | |
| | | awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftAward % actNum) |
| | | if awardRecord & pow(2, buyCount): |
| | | GameWorld.Log("购买次数礼包活动已经领取过该奖励! actNum=%s,cfgID=%s,buyCount=%s,awardRecord=%s" |
| | | % (actNum, cfgID, buyCount, awardRecord), playerID) |
| | | return |
| | | |
| | | # 检查背包 |
| | | if not ItemControler.CheckPackSpaceEnough(curPlayer, awardItemList): |
| | | return |
| | | |
| | | awardRecord |= pow(2, buyCount) |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BuyCountGiftAward % actNum, awardRecord) |
| | | Sync_BuyCountGiftPlayerInfo(curPlayer, actNum) |
| | | |
| | | for itemID, itemCount, isAuctionItem in awardItemList: |
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActBuyCountGift", False, {}]) |
| | | |
| | | addDataDict = {"actNum":actNum, "cfgID":cfgID, "buyCount":buyCount, "awardItemList":str(awardItemList)} |
| | | DataRecordPack.DR_FuncGiveItem(curPlayer, "ActBuyCountGift", addDataDict) |
| | | GameWorld.Log("购买次数礼包活动领取奖励! actNum=%s,cfgID=%s,buyCount=%s,awardItemList=%s" |
| | | % (actNum, cfgID, buyCount, awardItemList), playerID) |
| | | return |
| | | |
| | | def Sync_BuyCountGiftPlayerInfo(curPlayer, actNum): |
| | | ## 通知玩家数据信息 |
| | | clientPack = ChPyNetSendPack.tagMCActBuyCountGiftPlayerInfo() |
| | | clientPack.ActNum = actNum |
| | | clientPack.GiftAwardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftAward % actNum) |
| | | NetPackCommon.SendFakePack(curPlayer, clientPack) |
| | | return |
| | | |
| | | def Sync_BuyCountGiftActionInfo(curPlayer, actNum): |
| | | ## 通知活动信息 |
| | | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_BuyCountGift, actNum) |
| | | if not actInfo.get(ShareDefine.ActKey_State): |
| | | return |
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID) |
| | | if not ipyData: |
| | | return |
| | | CTGCountAwardInfo = ipyData.GetCTGCountAwardInfo() |
| | | |
| | | startDateStr, endDateStr = GameWorld.GetOperationActionDateStr(ipyData) |
| | | startDateSync = actInfo.get(ShareDefine.ActKey_StartDateSync, startDateStr) |
| | | actInfo = ChPyNetSendPack.tagMCActBuyCountGiftInfo() |
| | | actInfo.ActNum = actNum |
| | | actInfo.StartDate = startDateSync |
| | | actInfo.EndtDate = endDateStr |
| | | actInfo.LimitLV = ipyData.GetLVLimit() |
| | | actInfo.IsDayReset = ipyData.GetIsDayReset() |
| | | actInfo.ResetType = ipyData.GetResetType() |
| | | actInfo.CTGIDList = ipyData.GetCTGIDList() |
| | | actInfo.CTGIDCount = len(actInfo.CTGIDList) |
| | | actInfo.BuyCountGiftList = [] |
| | | |
| | | for buyCount, awardItemList in CTGCountAwardInfo.items(): |
| | | giftbag = ChPyNetSendPack.tagMCActBuyCountGift() |
| | | giftbag.NeedBuyCount = buyCount |
| | | giftbag.AwardItemList = [] |
| | | for itemID, itemCount, isAuctionItem in awardItemList: |
| | | giftItem = ChPyNetSendPack.tagMCActBuyCountGiftItem() |
| | | giftItem.ItemID = itemID |
| | | giftItem.ItemCount = itemCount |
| | | giftItem.IsBind = isAuctionItem |
| | | giftbag.AwardItemList.append(giftItem) |
| | | giftbag.Count = len(giftbag.AwardItemList) |
| | | |
| | | actInfo.BuyCountGiftList.append(giftbag) |
| | | |
| | | actInfo.GiftCount = len(actInfo.BuyCountGiftList) |
| | | NetPackCommon.SendFakePack(curPlayer, actInfo) |
| | | return |
| | |
| | | import PlayerFeastLogin
|
| | | import PlayerFeastWish
|
| | | import PlayerActTask
|
| | | import PlayerActBuyCountGift
|
| | | import PlayerActLoginNew
|
| | | import PlayerActLogin
|
| | | import PlayerFlashGiftbag
|
| | |
| | | elif actionName == ShareDefine.OperationActionName_WeekParty:
|
| | | PlayerWeekParty.RefreshOperationAction_WeekParty()
|
| | |
|
| | | elif actionName == ShareDefine.OperationActionName_BuyCountGift:
|
| | | PlayerActBuyCountGift.RefreshBuyCountGiftActionInfo(actNum)
|
| | | |
| | | elif actionName == ShareDefine.OperationActionName_ActTask:
|
| | | PlayerActTask.RefreshActTaskActionInfo(actNum)
|
| | |
|
| | |
| | | OperationActionName_BossTrial = "ActBossTrial" # Boss历练
|
| | | OperationActionName_ActLoginNew = "ActLoginNew" # 登录活动-新
|
| | | OperationActionName_ActTask = "ActTask" # 活动任务
|
| | | OperationActionName_BuyCountGift = "ActBuyCountGift" # 购买次数礼包活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_XianXiaMJ, OperationActionName_GodGift,
|
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | |
| | | OperationActionName_XianXiaMJ, OperationActionName_GodGift,
|
| | | OperationActionName_BuyOne, OperationActionName_BossTrial,
|
| | | OperationActionName_ActLoginNew, OperationActionName_ActTask,
|
| | | OperationActionName_BuyCountGift,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|