8716 【主干】【后端】【BT2】H.活动-节日祈愿(增加节日祝福);
| | |
| | | char EndDate; //结束日期
|
| | | };
|
| | |
|
| | | //节日祝福时间表
|
| | |
|
| | | struct tagActFeastWish
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char ActMark; //活动组标记
|
| | | list PlatformList; //活动平台列表["平台A", "平台A", ...],配[]代表所有
|
| | | list ServerGroupIDList; //服务器ID列表
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | };
|
| | |
|
| | | //等级开启功能 #tagFuncOpenLV
|
| | |
|
| | | struct tagFuncOpenLV
|
| | |
| | | list LoginAwardItemList; //奖励列表[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //节日祝福时间表
|
| | |
|
| | | struct tagActFeastWish
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | dict TemplateIDInfo; //模板信息 {(世界等级A,B):模板编号, ...}
|
| | | };
|
| | |
|
| | | //节日祝福瓶模板表
|
| | |
|
| | | struct tagActFeastWishBottle
|
| | | {
|
| | | BYTE _TemplateID; //模板ID
|
| | | BYTE WishBottleNum; //祝福瓶编号
|
| | | WORD NeedWishValue; //单次领奖所需祝福值
|
| | | BYTE ChooseTimeMax; //最大可领奖次数
|
| | | dict ChoosePrizeItem; //选择奖励物品信息,选完为止 {记录索引:[物品ID,个数,是否拍品], ...}
|
| | | list GoodItemIDList; //需要广播的物品ID列表 [物品ID, ...]
|
| | | char WorldNotifyKey; //全服广播key,参数(玩家名, 物品ID, 物品数据, 个数,)
|
| | | };
|
| | |
|
| | | //节日祝福池模板表
|
| | |
|
| | | struct tagActFeastWishPool
|
| | | {
|
| | | BYTE _TemplateID; //模板ID
|
| | | list WishPoolItemWeightInfo; //祝福池产出物品权重 [[权重, [物品ID,个数]], ..]
|
| | | list WishPoolClientItemShow; //前端展示物品列表 [物品ID, ...]
|
| | | list GoodItemIDList; //需要广播的物品ID列表 [物品ID, ...]
|
| | | char WorldNotifyKey; //全服广播key,参数(玩家名, 物品ID, 物品数据, 个数,)
|
| | | };
|
| | |
|
| | | //诛仙BOSS表
|
| | |
|
| | | struct tagZhuXianBoss
|
| | |
| | | ShareDefine.Def_UniversalGameRecType_DujieHelpRecord:10000, #渡劫副本护法详细记录
|
| | | ShareDefine.Def_UniversalGameRecType_ZhuXianBossRecord:100, #诛仙BOSS结算记录
|
| | | ShareDefine.Def_UniversalGameRecType_LuckyTreasure:5, #幸运鉴宝记录
|
| | | ShareDefine.Def_UniversalGameRecType_FeastWish:30, #节日祝福大奖记录
|
| | | }
|
| | | #---------------------------------------------------------------------
|
| | | #比较标识
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem
|
| | |
|
| | | class tagCMFeastWishBottleChooseItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BottleNum", c_ubyte), #瓶子编号
|
| | | ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x10
|
| | | self.BottleNum = 0
|
| | | self.RecordIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFeastWishBottleChooseItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 10 节日祝福瓶选择奖励物品 //tagCMFeastWishBottleChooseItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BottleNum:%d,
|
| | | RecordIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BottleNum,
|
| | | self.RecordIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFeastWishBottleChooseItem=tagCMFeastWishBottleChooseItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishBottleChooseItem.Cmd,m_NAtagCMFeastWishBottleChooseItem.SubCmd))] = m_NAtagCMFeastWishBottleChooseItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish
|
| | |
|
| | | class tagCMFeastWishPoolWish(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("WishCount", c_ubyte), #祝福次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x11
|
| | | 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 = 0x11
|
| | | self.WishCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFeastWishPoolWish)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 11 节日祝福池祝福 //tagCMFeastWishPoolWish:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | WishCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.WishCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFeastWishPoolWish=tagCMFeastWishPoolWish()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishPoolWish.Cmd,m_NAtagCMFeastWishPoolWish.SubCmd))] = m_NAtagCMFeastWishPoolWish
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 05 限时抢购预约 #tagCMFlashSaleAppointment
|
| | |
|
| | | class tagCMFlashSaleAppointment(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 43 节日祝福活动信息 #tagMCFeastWishInfo
|
| | |
|
| | | class tagMCFeastWishBottleItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择
|
| | | ("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.RecordIndex = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFeastWishBottleItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 43 节日祝福活动信息 //tagMCFeastWishInfo:
|
| | | RecordIndex:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordIndex,
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishBottleInfo(Structure):
|
| | | BottleNum = 0 #(BYTE BottleNum)//瓶子编号
|
| | | NeedWishValue = 0 #(WORD NeedWishValue)//单次领奖所需祝福值
|
| | | ChooseTimeMax = 0 #(BYTE ChooseTimeMax)//最大可领奖次数
|
| | | ChoosePrizeCount = 0 #(BYTE ChoosePrizeCount)//可选择奖励个数
|
| | | ChoosePrizeList = list() #(vector<tagMCFeastWishBottleItem> ChoosePrizeList)// 选择奖励物品列表,已选过的无法再选
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.BottleNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ChooseTimeMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ChoosePrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | temChoosePrizeList = tagMCFeastWishBottleItem()
|
| | | _pos = temChoosePrizeList.ReadData(_lpData, _pos)
|
| | | self.ChoosePrizeList.append(temChoosePrizeList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.BottleNum = 0
|
| | | self.NeedWishValue = 0
|
| | | self.ChooseTimeMax = 0
|
| | | self.ChoosePrizeCount = 0
|
| | | self.ChoosePrizeList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | length += self.ChoosePrizeList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.BottleNum)
|
| | | data = CommFunc.WriteWORD(data, self.NeedWishValue)
|
| | | data = CommFunc.WriteBYTE(data, self.ChooseTimeMax)
|
| | | data = CommFunc.WriteBYTE(data, self.ChoosePrizeCount)
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | data = CommFunc.WriteString(data, self.ChoosePrizeList[i].GetLength(), self.ChoosePrizeList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | BottleNum:%d,
|
| | | NeedWishValue:%d,
|
| | | ChooseTimeMax:%d,
|
| | | ChoosePrizeCount:%d,
|
| | | ChoosePrizeList:%s
|
| | | '''\
|
| | | %(
|
| | | self.BottleNum,
|
| | | self.NeedWishValue,
|
| | | self.ChooseTimeMax,
|
| | | self.ChoosePrizeCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | WishPoolShowCount = 0 #(BYTE WishPoolShowCount)//祝福池展示物品数
|
| | | WishPoolShowItemList = list() #(vector<DWORD> WishPoolShowItemList)//祝福池展示物品ID列表
|
| | | BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数
|
| | | BottleInfoList = list() #(vector<tagMCFeastWishBottleInfo> BottleInfoList)// 祝福瓶信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x43
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.WishPoolShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.WishPoolShowCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.WishPoolShowItemList.append(value)
|
| | | self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BottleCount):
|
| | | temBottleInfoList = tagMCFeastWishBottleInfo()
|
| | | _pos = temBottleInfoList.ReadData(_lpData, _pos)
|
| | | self.BottleInfoList.append(temBottleInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x43
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.WishPoolShowCount = 0
|
| | | self.WishPoolShowItemList = list()
|
| | | self.BottleCount = 0
|
| | | self.BottleInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 4 * self.WishPoolShowCount
|
| | | length += 1
|
| | | for i in range(self.BottleCount):
|
| | | length += self.BottleInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.WishPoolShowCount)
|
| | | for i in range(self.WishPoolShowCount):
|
| | | data = CommFunc.WriteDWORD(data, self.WishPoolShowItemList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.BottleCount)
|
| | | for i in range(self.BottleCount):
|
| | | data = CommFunc.WriteString(data, self.BottleInfoList[i].GetLength(), self.BottleInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | WishPoolShowCount:%d,
|
| | | WishPoolShowItemList:%s,
|
| | | BottleCount:%d,
|
| | | BottleInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.WishPoolShowCount,
|
| | | "...",
|
| | | self.BottleCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishInfo=tagMCFeastWishInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishInfo.Head.Cmd,m_NAtagMCFeastWishInfo.Head.SubCmd))] = m_NAtagMCFeastWishInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 44 节日祝福活动玩家信息 #tagMCFeastWishPlayerInfo
|
| | |
|
| | | class tagMCFeastWishPlayerBottle(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("BottleNum", c_ubyte), #瓶子编号
|
| | | ("WishValue", c_ushort), #当前可用祝福值
|
| | | ("ChooseRecord", c_int), #已选物品索引记录,与记录索引位运算判断是否已选择;累计已选择次数前端自己计算,通过该值可算出
|
| | | ]
|
| | |
|
| | | 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.BottleNum = 0
|
| | | self.WishValue = 0
|
| | | self.ChooseRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFeastWishPlayerBottle)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 44 节日祝福活动玩家信息 //tagMCFeastWishPlayerInfo:
|
| | | BottleNum:%d,
|
| | | WishValue:%d,
|
| | | ChooseRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.BottleNum,
|
| | | self.WishValue,
|
| | | self.ChooseRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数
|
| | | PlayerBottleInfo = list() #(vector<tagMCFeastWishPlayerBottle> PlayerBottleInfo)// 祝福瓶信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x44
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BottleCount):
|
| | | temPlayerBottleInfo = tagMCFeastWishPlayerBottle()
|
| | | _pos = temPlayerBottleInfo.ReadData(_lpData, _pos)
|
| | | self.PlayerBottleInfo.append(temPlayerBottleInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x44
|
| | | self.BottleCount = 0
|
| | | self.PlayerBottleInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.BottleCount):
|
| | | length += self.PlayerBottleInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.BottleCount)
|
| | | for i in range(self.BottleCount):
|
| | | data = CommFunc.WriteString(data, self.PlayerBottleInfo[i].GetLength(), self.PlayerBottleInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | BottleCount:%d,
|
| | | PlayerBottleInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.BottleCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishPlayerInfo=tagMCFeastWishPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishPlayerInfo.Head.Cmd,m_NAtagMCFeastWishPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastWishPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 45 节日祝福祝福结果 #tagMCFeastWishResult
|
| | |
|
| | | class tagMCFeastWishResult(Structure):
|
| | | Head = tagHead()
|
| | | AddWishValue = 0 #(WORD AddWishValue)// 本次增加的祝福值
|
| | | WishResultLen = 0 #(WORD WishResultLen)
|
| | | WishResult = "" #(String WishResult)// 获得物品结果[[物品ID,个数,是否绑定], ...]
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x45
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.AddWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.WishResultLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.WishResult,_pos = CommFunc.ReadString(_lpData, _pos,self.WishResultLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x45
|
| | | self.AddWishValue = 0
|
| | | self.WishResultLen = 0
|
| | | self.WishResult = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += 2
|
| | | length += len(self.WishResult)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.AddWishValue)
|
| | | data = CommFunc.WriteWORD(data, self.WishResultLen)
|
| | | data = CommFunc.WriteString(data, self.WishResultLen, self.WishResult)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | AddWishValue:%d,
|
| | | WishResultLen:%d,
|
| | | WishResult:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.AddWishValue,
|
| | | self.WishResultLen,
|
| | | self.WishResult
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishResult=tagMCFeastWishResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishResult.Head.Cmd,m_NAtagMCFeastWishResult.Head.SubCmd))] = m_NAtagMCFeastWishResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 02 首充信息 #tagMCFirstGoldInfo
|
| | |
|
| | | class tagMCFirstGoldInfo(Structure):
|
| | |
| | | ("char", "EndDate", 0),
|
| | | ),
|
| | |
|
| | | "ActFeastWish":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActMark", 0),
|
| | | ("list", "PlatformList", 0),
|
| | | ("list", "ServerGroupIDList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ),
|
| | |
|
| | | "FuncOpenLV":(
|
| | | ("DWORD", "FuncId", 1),
|
| | | ("DWORD", "LimitLV", 0),
|
| | |
| | | def GetServerGroupIDList(self): return self.ServerGroupIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期 |
| | | |
| | | # 节日祝福时间表 |
| | | class IPY_ActFeastWish(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.ActMark = ""
|
| | | self.PlatformList = []
|
| | | self.ServerGroupIDList = []
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.ResetType = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.NotifyInfoLoop = [] |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetActMark(self): return self.ActMark # 活动组标记
|
| | | def GetPlatformList(self): return self.PlatformList # 活动平台列表["平台A", "平台A", ...],配[]代表所有
|
| | | def GetServerGroupIDList(self): return self.ServerGroupIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key] |
| | | |
| | | # 等级开启功能 |
| | | class IPY_FuncOpenLV(): |
| | |
| | | self.ipyActFeastRedPacketLen = len(self.ipyActFeastRedPacketCache)
|
| | | self.ipyActFeastLoginCache = self.__LoadFileData("ActFeastLogin", IPY_ActFeastLogin)
|
| | | self.ipyActFeastLoginLen = len(self.ipyActFeastLoginCache)
|
| | | self.ipyActFeastWishCache = self.__LoadFileData("ActFeastWish", IPY_ActFeastWish)
|
| | | self.ipyActFeastWishLen = len(self.ipyActFeastWishCache)
|
| | | self.ipyFuncOpenLVCache = self.__LoadFileData("FuncOpenLV", IPY_FuncOpenLV)
|
| | | self.ipyFuncOpenLVLen = len(self.ipyFuncOpenLVCache)
|
| | | self.ipyChinNPCCache = self.__LoadFileData("ChinNPC", IPY_ChinNPC)
|
| | |
| | | def GetActFeastRedPacketByIndex(self, index): return self.ipyActFeastRedPacketCache[index]
|
| | | def GetActFeastLoginCount(self): return self.ipyActFeastLoginLen
|
| | | def GetActFeastLoginByIndex(self, index): return self.ipyActFeastLoginCache[index]
|
| | | def GetActFeastWishCount(self): return self.ipyActFeastWishLen
|
| | | def GetActFeastWishByIndex(self, index): return self.ipyActFeastWishCache[index]
|
| | | def GetFuncOpenLVCount(self): return self.ipyFuncOpenLVLen
|
| | | def GetFuncOpenLVByIndex(self, index): return self.ipyFuncOpenLVCache[index]
|
| | | def GetChinNPCCount(self): return self.ipyChinNPCLen
|
| | |
| | | import ShareDefine
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import PlayerControl
|
| | |
|
| | | import time
|
| | | #---------------------------------------------------------------------
|
| | |
| | | @param recType: 记录类型
|
| | | @param valueList: [Value1,...,Value5]
|
| | | @param strValueList: [StrValue1, StrValue2, StrValue3]
|
| | | @param notifyType: 0-不通知; 1-通知本人; 2-通知全服
|
| | | @param notifyType: 0-不通知; 1-通知本人; 2-通知全服;3-通知本人单条;4-通知全服单条
|
| | | @param isSort: 删除时是否需要先排序, 默认是
|
| | | '''
|
| | | if recType not in ShareDefine.Def_UniversalGameRecTypeList:
|
| | |
| | | SendUniversalGameRecInfo(curPlayer, recType)
|
| | | elif notifyType == 2:
|
| | | SendUniversalGameRecInfo(None, recType)
|
| | | elif notifyType == 3:
|
| | | SendUniversalGameRecSingle(curPlayer, recObj)
|
| | | elif notifyType == 4:
|
| | | SendUniversalGameRecSingle(None, recObj)
|
| | |
|
| | | return recObj
|
| | |
|
| | |
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in range(0, playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(i)
|
| | | if curPlayer == None or not curPlayer.GetInitOK():
|
| | | if curPlayer == None or not curPlayer.GetInitOK() or PlayerControl.GetIsTJG(curPlayer):
|
| | | continue
|
| | |
|
| | | NetPackCommon.SendFakePack(curPlayer, universalGameRecInfo)
|
| | |
| | | OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
|
| | | OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
|
| | | OperationActionName_FeastLogin = "ActFeastLogin" # 节日登录活动
|
| | | OperationActionName_FeastWish = "ActFeastWish" # 节日祝愿活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | | OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
|
| | | OperationActionName_FeastWish,
|
| | | ]
|
| | | #所有的运营活动列表,含节日活动
|
| | | OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate,
|
| | |
| | | OperationActionName_WeekParty,
|
| | | OperationActionName_CollectWords, OperationActionName_CollectWords2,
|
| | | OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
|
| | | OperationActionName_FeastWish,
|
| | | ]
|
| | |
|
| | | #所有的累计充值活动
|
| | |
| | | Def_UniversalGameRecType_Reward, # 通用奖励表(TopBar)14
|
| | | Def_UniversalGameRecType_ArenaBattleRecord, # 竞技场玩家挑战记录 15
|
| | | Def_UniversalGameRecType_CrossActInfo, # 跨服运营活动信息记录 16
|
| | | Def_UniversalGameRecType_17,
|
| | | Def_UniversalGameRecType_FeastWish, #节日祝福大奖记录17
|
| | | Def_UniversalGameRecType_18,
|
| | | Def_UniversalGameRecType_19,
|
| | | Def_UniversalGameRecType_20,
|
| | |
| | | PacketSubCMD_2=0x10
|
| | | PacketCallFunc_2=OnArenaBattle
|
| | |
|
| | | ;节日祝福
|
| | | [PlayerFeastWish]
|
| | | ScriptName = Player\PlayerFeastWish.py
|
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 2
|
| | |
|
| | | PacketCMD_1=0xAA
|
| | | PacketSubCMD_1=0x10
|
| | | PacketCallFunc_1=OnFeastWishBottleChooseItem
|
| | |
|
| | | PacketCMD_2=0xAA
|
| | | PacketSubCMD_2=0x11
|
| | | PacketCallFunc_2=OnFeastWishPoolWish
|
| | |
|
| | | ;缥缈仙域
|
| | | [PlayerFairyDomain]
|
| | | ScriptName = Player\PlayerFairyDomain.py
|
| | |
| | | #节日登录活动
|
| | | Def_PDict_FeastLoginID = "FeastLoginID" # 玩家身上的活动ID,唯一标识,取活动开始日期time值
|
| | | Def_PDict_FeastLoginAwardState = "FeastLoginAwardState" # 活动登录领奖记录,按天编号-1为索引进行二进制位运算记录当天是否已领奖
|
| | |
|
| | | #节日祝福活动
|
| | | Def_PDict_FeastWishID = "FeastWishID" # 玩家身上的活动ID,唯一标识,取活动开始日期time值
|
| | | Def_PDict_FeastWishBottleValue = "FeastWishBottleValue_%s" # 祝福瓶当前祝福值,参数(瓶子编号)
|
| | | Def_PDict_FeastWishBottleGetState = "FeastWishBottleGetState_%s" # 祝福瓶已领取记录,参数(瓶子编号),按记录索引二进制位存储是否已领取
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | #开服活动,Def_PDictType_OpenServerCampaign
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem
|
| | |
|
| | | class tagCMFeastWishBottleChooseItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BottleNum", c_ubyte), #瓶子编号
|
| | | ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x10
|
| | | self.BottleNum = 0
|
| | | self.RecordIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFeastWishBottleChooseItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 10 节日祝福瓶选择奖励物品 //tagCMFeastWishBottleChooseItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BottleNum:%d,
|
| | | RecordIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BottleNum,
|
| | | self.RecordIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFeastWishBottleChooseItem=tagCMFeastWishBottleChooseItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishBottleChooseItem.Cmd,m_NAtagCMFeastWishBottleChooseItem.SubCmd))] = m_NAtagCMFeastWishBottleChooseItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish
|
| | |
|
| | | class tagCMFeastWishPoolWish(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("WishCount", c_ubyte), #祝福次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x11
|
| | | 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 = 0x11
|
| | | self.WishCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFeastWishPoolWish)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 11 节日祝福池祝福 //tagCMFeastWishPoolWish:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | WishCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.WishCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFeastWishPoolWish=tagCMFeastWishPoolWish()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishPoolWish.Cmd,m_NAtagCMFeastWishPoolWish.SubCmd))] = m_NAtagCMFeastWishPoolWish
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 05 限时抢购预约 #tagCMFlashSaleAppointment
|
| | |
|
| | | class tagCMFlashSaleAppointment(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 43 节日祝福活动信息 #tagMCFeastWishInfo
|
| | |
|
| | | class tagMCFeastWishBottleItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择
|
| | | ("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.RecordIndex = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFeastWishBottleItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 43 节日祝福活动信息 //tagMCFeastWishInfo:
|
| | | RecordIndex:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordIndex,
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishBottleInfo(Structure):
|
| | | BottleNum = 0 #(BYTE BottleNum)//瓶子编号
|
| | | NeedWishValue = 0 #(WORD NeedWishValue)//单次领奖所需祝福值
|
| | | ChooseTimeMax = 0 #(BYTE ChooseTimeMax)//最大可领奖次数
|
| | | ChoosePrizeCount = 0 #(BYTE ChoosePrizeCount)//可选择奖励个数
|
| | | ChoosePrizeList = list() #(vector<tagMCFeastWishBottleItem> ChoosePrizeList)// 选择奖励物品列表,已选过的无法再选
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.BottleNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ChooseTimeMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ChoosePrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | temChoosePrizeList = tagMCFeastWishBottleItem()
|
| | | _pos = temChoosePrizeList.ReadData(_lpData, _pos)
|
| | | self.ChoosePrizeList.append(temChoosePrizeList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.BottleNum = 0
|
| | | self.NeedWishValue = 0
|
| | | self.ChooseTimeMax = 0
|
| | | self.ChoosePrizeCount = 0
|
| | | self.ChoosePrizeList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | length += self.ChoosePrizeList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.BottleNum)
|
| | | data = CommFunc.WriteWORD(data, self.NeedWishValue)
|
| | | data = CommFunc.WriteBYTE(data, self.ChooseTimeMax)
|
| | | data = CommFunc.WriteBYTE(data, self.ChoosePrizeCount)
|
| | | for i in range(self.ChoosePrizeCount):
|
| | | data = CommFunc.WriteString(data, self.ChoosePrizeList[i].GetLength(), self.ChoosePrizeList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | BottleNum:%d,
|
| | | NeedWishValue:%d,
|
| | | ChooseTimeMax:%d,
|
| | | ChoosePrizeCount:%d,
|
| | | ChoosePrizeList:%s
|
| | | '''\
|
| | | %(
|
| | | self.BottleNum,
|
| | | self.NeedWishValue,
|
| | | self.ChooseTimeMax,
|
| | | self.ChoosePrizeCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | WishPoolShowCount = 0 #(BYTE WishPoolShowCount)//祝福池展示物品数
|
| | | WishPoolShowItemList = list() #(vector<DWORD> WishPoolShowItemList)//祝福池展示物品ID列表
|
| | | BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数
|
| | | BottleInfoList = list() #(vector<tagMCFeastWishBottleInfo> BottleInfoList)// 祝福瓶信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x43
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.WishPoolShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.WishPoolShowCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.WishPoolShowItemList.append(value)
|
| | | self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BottleCount):
|
| | | temBottleInfoList = tagMCFeastWishBottleInfo()
|
| | | _pos = temBottleInfoList.ReadData(_lpData, _pos)
|
| | | self.BottleInfoList.append(temBottleInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x43
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.WishPoolShowCount = 0
|
| | | self.WishPoolShowItemList = list()
|
| | | self.BottleCount = 0
|
| | | self.BottleInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 4 * self.WishPoolShowCount
|
| | | length += 1
|
| | | for i in range(self.BottleCount):
|
| | | length += self.BottleInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.WishPoolShowCount)
|
| | | for i in range(self.WishPoolShowCount):
|
| | | data = CommFunc.WriteDWORD(data, self.WishPoolShowItemList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.BottleCount)
|
| | | for i in range(self.BottleCount):
|
| | | data = CommFunc.WriteString(data, self.BottleInfoList[i].GetLength(), self.BottleInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | WishPoolShowCount:%d,
|
| | | WishPoolShowItemList:%s,
|
| | | BottleCount:%d,
|
| | | BottleInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.WishPoolShowCount,
|
| | | "...",
|
| | | self.BottleCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishInfo=tagMCFeastWishInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishInfo.Head.Cmd,m_NAtagMCFeastWishInfo.Head.SubCmd))] = m_NAtagMCFeastWishInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 44 节日祝福活动玩家信息 #tagMCFeastWishPlayerInfo
|
| | |
|
| | | class tagMCFeastWishPlayerBottle(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("BottleNum", c_ubyte), #瓶子编号
|
| | | ("WishValue", c_ushort), #当前可用祝福值
|
| | | ("ChooseRecord", c_int), #已选物品索引记录,与记录索引位运算判断是否已选择;累计已选择次数前端自己计算,通过该值可算出
|
| | | ]
|
| | |
|
| | | 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.BottleNum = 0
|
| | | self.WishValue = 0
|
| | | self.ChooseRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFeastWishPlayerBottle)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 44 节日祝福活动玩家信息 //tagMCFeastWishPlayerInfo:
|
| | | BottleNum:%d,
|
| | | WishValue:%d,
|
| | | ChooseRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.BottleNum,
|
| | | self.WishValue,
|
| | | self.ChooseRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastWishPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数
|
| | | PlayerBottleInfo = list() #(vector<tagMCFeastWishPlayerBottle> PlayerBottleInfo)// 祝福瓶信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x44
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BottleCount):
|
| | | temPlayerBottleInfo = tagMCFeastWishPlayerBottle()
|
| | | _pos = temPlayerBottleInfo.ReadData(_lpData, _pos)
|
| | | self.PlayerBottleInfo.append(temPlayerBottleInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x44
|
| | | self.BottleCount = 0
|
| | | self.PlayerBottleInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.BottleCount):
|
| | | length += self.PlayerBottleInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.BottleCount)
|
| | | for i in range(self.BottleCount):
|
| | | data = CommFunc.WriteString(data, self.PlayerBottleInfo[i].GetLength(), self.PlayerBottleInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | BottleCount:%d,
|
| | | PlayerBottleInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.BottleCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishPlayerInfo=tagMCFeastWishPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishPlayerInfo.Head.Cmd,m_NAtagMCFeastWishPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastWishPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 45 节日祝福祝福结果 #tagMCFeastWishResult
|
| | |
|
| | | class tagMCFeastWishResult(Structure):
|
| | | Head = tagHead()
|
| | | AddWishValue = 0 #(WORD AddWishValue)// 本次增加的祝福值
|
| | | WishResultLen = 0 #(WORD WishResultLen)
|
| | | WishResult = "" #(String WishResult)// 获得物品结果[[物品ID,个数,是否绑定], ...]
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x45
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.AddWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.WishResultLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.WishResult,_pos = CommFunc.ReadString(_lpData, _pos,self.WishResultLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x45
|
| | | self.AddWishValue = 0
|
| | | self.WishResultLen = 0
|
| | | self.WishResult = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += 2
|
| | | length += len(self.WishResult)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.AddWishValue)
|
| | | data = CommFunc.WriteWORD(data, self.WishResultLen)
|
| | | data = CommFunc.WriteString(data, self.WishResultLen, self.WishResult)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | AddWishValue:%d,
|
| | | WishResultLen:%d,
|
| | | WishResult:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.AddWishValue,
|
| | | self.WishResultLen,
|
| | | self.WishResult
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastWishResult=tagMCFeastWishResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishResult.Head.Cmd,m_NAtagMCFeastWishResult.Head.SubCmd))] = m_NAtagMCFeastWishResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 02 首充信息 #tagMCFirstGoldInfo
|
| | |
|
| | | class tagMCFirstGoldInfo(Structure):
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package GM.Commands.FeastWish
|
| | | #
|
| | | # @todo:节日祝福
|
| | | # @author hxp
|
| | | # @date 2021-01-29
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 节日祝福
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2021-01-29 11:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import GameWorld
|
| | | import PlayerControl
|
| | | import PlayerFeastWish
|
| | | import ChConfig
|
| | |
|
| | |
|
| | | def __Help(curPlayer):
|
| | | GameWorld.DebugAnswer(curPlayer, "重置祝福瓶: FeastWish 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置祝福瓶: FeastWish 编号 祝福值")
|
| | | GameWorld.DebugAnswer(curPlayer, "祝福瓶领取: FeastWish 编号 记录索引 是否领取")
|
| | | return
|
| | |
|
| | | ## GM命令执行入口
|
| | | # @param curPlayer 当前玩家
|
| | | # @param paramList 参数列表 []
|
| | | # @return None
|
| | | # @remarks 函数详细说明.
|
| | | def OnExec(curPlayer, paramList):
|
| | | |
| | | if not paramList:
|
| | | __Help(curPlayer)
|
| | | return
|
| | | |
| | | if paramList[0] == 0:
|
| | | bottleNumList = PlayerFeastWish.GetWishBottleNumList()
|
| | | for bottleNum in bottleNumList:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, 0)
|
| | | GameWorld.DebugAnswer(curPlayer, "重置OK!")
|
| | | elif len(paramList) == 2:
|
| | | bottleNum, wishValue = paramList
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, wishValue)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置祝福瓶(%s),祝福值=%s" % (bottleNum, wishValue))
|
| | | elif len(paramList) == 3:
|
| | | bottleNum, recordIndex, isGet = paramList
|
| | | getState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum)
|
| | | updState = GameWorld.SetBitValue(getState, recordIndex, isGet)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, updState)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置祝福瓶(%s),getState=%s,updState=%s" % (bottleNum, getState, updState))
|
| | | else:
|
| | | __Help(curPlayer)
|
| | | return
|
| | | |
| | | PlayerFeastWish.Sync_FeastWishActionInfo(curPlayer)
|
| | | PlayerFeastWish.Sync_FeastWishPlayerInfo(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | numValue += pow(10, dataIndex)*(dataValue - lastTagLV)
|
| | | return numValue
|
| | |
|
| | | def GetBitValue(dataValue, index):
|
| | | """ 得到某个字节值中某一位(Bit)的值
|
| | | @param dataValue: 待取值的字节值
|
| | | @param index: 待读取位的序号,从右向左0开始,0-7为一个完整字节的8个位
|
| | | @return: 返回读取该位的值,0或1
|
| | | """
|
| | | return 1 if dataValue & (1 << index) else 0
|
| | |
|
| | | def SetBitValue(dataValue, index, val):
|
| | | """ 更改某个字节值中某一位(Bit)的值
|
| | | @param dataValue: 准备更改的字节原值
|
| | | @param index: 待更改位的序号,从右向左0开始,0-7为一个完整字节的8个位
|
| | | @param val: 目标位预更改的值,0或1
|
| | | @return: 返回更改后字节的值
|
| | | """
|
| | | if val:
|
| | | return dataValue | (1 << index)
|
| | | return dataValue & ~(1 << index)
|
| | |
|
| | | ## 自写round函数
|
| | | # @param num
|
| | |
| | | @param recType: 通用记录类型, 对应 ShareDefine.Def_UniversalGameRecTypeList
|
| | | @param valueList: 数值列表[value1, value2, ...], 按顺序, 支持value1 ~ value5
|
| | | @param strValueList: 字符值列表[strValue1, strValue2, ...], 按顺序, 支持strValue1 ~ strValue3
|
| | | @param notifyType: 0-不通知; 1-通知本人; 2-通知全服
|
| | | @param notifyType: 0-不通知; 1-通知本人; 2-通知全服;3-通知本人单条;4-通知全服单条
|
| | | @param isSort: 存储记录满需删除时是否需要先按时间排序, 默认1是, 先进先出
|
| | | '''
|
| | | msgStr = str([recType, valueList, strValueList, notifyType, isSort])
|
| | |
| | | ("list", "LoginAwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "ActFeastWish":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("dict", "TemplateIDInfo", 0),
|
| | | ),
|
| | |
|
| | | "ActFeastWishBottle":(
|
| | | ("BYTE", "TemplateID", 1),
|
| | | ("BYTE", "WishBottleNum", 0),
|
| | | ("WORD", "NeedWishValue", 0),
|
| | | ("BYTE", "ChooseTimeMax", 0),
|
| | | ("dict", "ChoosePrizeItem", 0),
|
| | | ("list", "GoodItemIDList", 0),
|
| | | ("char", "WorldNotifyKey", 0),
|
| | | ),
|
| | |
|
| | | "ActFeastWishPool":(
|
| | | ("BYTE", "TemplateID", 1),
|
| | | ("list", "WishPoolItemWeightInfo", 0),
|
| | | ("list", "WishPoolClientItemShow", 0),
|
| | | ("list", "GoodItemIDList", 0),
|
| | | ("char", "WorldNotifyKey", 0),
|
| | | ),
|
| | |
|
| | | "ZhuXianBoss":(
|
| | | ("DWORD", "NPCID", 0),
|
| | | ("BYTE", "LineID", 1),
|
| | |
| | | def GetDayNum(self): return self.DayNum # 第X天从1开始
|
| | | def GetLoginAwardItemList(self): return self.LoginAwardItemList # 奖励列表[[物品ID,个数,是否拍品], ...] |
| | | |
| | | # 节日祝福时间表 |
| | | class IPY_ActFeastWish(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.TemplateIDInfo = {} |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetTemplateIDInfo(self): return self.TemplateIDInfo # 模板信息 {(世界等级A,B):模板编号, ...} |
| | | |
| | | # 节日祝福瓶模板表 |
| | | class IPY_ActFeastWishBottle(): |
| | | |
| | | def __init__(self): |
| | | self.TemplateID = 0
|
| | | self.WishBottleNum = 0
|
| | | self.NeedWishValue = 0
|
| | | self.ChooseTimeMax = 0
|
| | | self.ChoosePrizeItem = {}
|
| | | self.GoodItemIDList = []
|
| | | self.WorldNotifyKey = "" |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.TemplateID # 模板ID
|
| | | def GetWishBottleNum(self): return self.WishBottleNum # 祝福瓶编号
|
| | | def GetNeedWishValue(self): return self.NeedWishValue # 单次领奖所需祝福值
|
| | | def GetChooseTimeMax(self): return self.ChooseTimeMax # 最大可领奖次数
|
| | | def GetChoosePrizeItem(self): return self.ChoosePrizeItem # 选择奖励物品信息,选完为止 {记录索引:[物品ID,个数,是否拍品], ...}
|
| | | def GetGoodItemIDList(self): return self.GoodItemIDList # 需要广播的物品ID列表 [物品ID, ...]
|
| | | def GetWorldNotifyKey(self): return self.WorldNotifyKey # 全服广播key,参数(玩家名, 物品ID, 物品数据, 个数,) |
| | | |
| | | # 节日祝福池模板表 |
| | | class IPY_ActFeastWishPool(): |
| | | |
| | | def __init__(self): |
| | | self.TemplateID = 0
|
| | | self.WishPoolItemWeightInfo = []
|
| | | self.WishPoolClientItemShow = []
|
| | | self.GoodItemIDList = []
|
| | | self.WorldNotifyKey = "" |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.TemplateID # 模板ID
|
| | | def GetWishPoolItemWeightInfo(self): return self.WishPoolItemWeightInfo # 祝福池产出物品权重 [[权重, [物品ID,个数]], ..]
|
| | | def GetWishPoolClientItemShow(self): return self.WishPoolClientItemShow # 前端展示物品列表 [物品ID, ...]
|
| | | def GetGoodItemIDList(self): return self.GoodItemIDList # 需要广播的物品ID列表 [物品ID, ...]
|
| | | def GetWorldNotifyKey(self): return self.WorldNotifyKey # 全服广播key,参数(玩家名, 物品ID, 物品数据, 个数,) |
| | | |
| | | # 诛仙BOSS表 |
| | | class IPY_ZhuXianBoss(): |
| | | |
| | |
| | | self.ipyActFeastLoginLen = len(self.ipyActFeastLoginCache)
|
| | | self.ipyActFeastLoginAwardCache = self.__LoadFileData("ActFeastLoginAward", IPY_ActFeastLoginAward)
|
| | | self.ipyActFeastLoginAwardLen = len(self.ipyActFeastLoginAwardCache)
|
| | | self.ipyActFeastWishCache = self.__LoadFileData("ActFeastWish", IPY_ActFeastWish)
|
| | | self.ipyActFeastWishLen = len(self.ipyActFeastWishCache)
|
| | | self.ipyActFeastWishBottleCache = self.__LoadFileData("ActFeastWishBottle", IPY_ActFeastWishBottle)
|
| | | self.ipyActFeastWishBottleLen = len(self.ipyActFeastWishBottleCache)
|
| | | self.ipyActFeastWishPoolCache = self.__LoadFileData("ActFeastWishPool", IPY_ActFeastWishPool)
|
| | | self.ipyActFeastWishPoolLen = len(self.ipyActFeastWishPoolCache)
|
| | | self.ipyZhuXianBossCache = self.__LoadFileData("ZhuXianBoss", IPY_ZhuXianBoss)
|
| | | self.ipyZhuXianBossLen = len(self.ipyZhuXianBossCache)
|
| | | self.ipyActFeastWeekPartyCache = self.__LoadFileData("ActFeastWeekParty", IPY_ActFeastWeekParty)
|
| | |
| | | def GetActFeastLoginByIndex(self, index): return self.ipyActFeastLoginCache[index]
|
| | | def GetActFeastLoginAwardCount(self): return self.ipyActFeastLoginAwardLen
|
| | | def GetActFeastLoginAwardByIndex(self, index): return self.ipyActFeastLoginAwardCache[index]
|
| | | def GetActFeastWishCount(self): return self.ipyActFeastWishLen
|
| | | def GetActFeastWishByIndex(self, index): return self.ipyActFeastWishCache[index]
|
| | | def GetActFeastWishBottleCount(self): return self.ipyActFeastWishBottleLen
|
| | | def GetActFeastWishBottleByIndex(self, index): return self.ipyActFeastWishBottleCache[index]
|
| | | def GetActFeastWishPoolCount(self): return self.ipyActFeastWishPoolLen
|
| | | def GetActFeastWishPoolByIndex(self, index): return self.ipyActFeastWishPoolCache[index]
|
| | | def GetZhuXianBossCount(self): return self.ipyZhuXianBossLen
|
| | | def GetZhuXianBossByIndex(self, index): return self.ipyZhuXianBossCache[index]
|
| | | def GetActFeastWeekPartyCount(self): return self.ipyActFeastWeekPartyLen
|
| | |
| | | import PlayerActCollectWords
|
| | | import PlayerNewFairyCeremony
|
| | | import GameLogic_CrossGrassland
|
| | | import PlayerFeastWish
|
| | | import PlayerWeekParty
|
| | | import NPCHurtManager
|
| | | import PlayerActLogin
|
| | |
| | | for gItemExID, gItemExCount in gradeItemExList:
|
| | | dropIDList += [gItemExID] * gItemExCount
|
| | |
|
| | | # 7.相关活动掉落
|
| | | feastWishDropIDList = PlayerFeastWish.GetFeastWishDropItemIDList(dropPlayer, npcData)
|
| | | if feastWishDropIDList:
|
| | | dropIDList.extend(feastWishDropIDList)
|
| | | |
| | | # 检查掉落互斥ID组
|
| | | dropIDList = __RemoveMutexDropID(dropIDList, IpyGameDataPY.GetFuncCfg("MutexDrop", 1))
|
| | |
|
| | |
| | | import PlayerWeekParty
|
| | | import PlayerFeastWeekParty
|
| | | import PlayerFeastLogin
|
| | | import PlayerFeastWish
|
| | | import PlayerActLogin
|
| | | import PlayerTreasure
|
| | | import GameLogic_GodArea
|
| | |
| | | PlayerFeastWeekParty.OnLogin(curPlayer)
|
| | | # 节日登录活动
|
| | | PlayerFeastLogin.OnPlayerLogin(curPlayer)
|
| | | # 节日祝福活动
|
| | | PlayerFeastWish.OnPlayerLogin(curPlayer)
|
| | | # 登录奖励活动
|
| | | PlayerActLogin.OnLogin(curPlayer)
|
| | | # 仙界盛典活动
|
| | |
| | | import PlayerWeekParty
|
| | | import PlayerFeastWeekParty
|
| | | import PlayerFeastLogin
|
| | | import PlayerFeastWish
|
| | | import PlayerActLogin
|
| | | import PlayerFlashGiftbag
|
| | | import PlayerDailyGiftbag
|
| | |
| | | elif actionName == ShareDefine.OperationActionName_FeastLogin:
|
| | | PlayerFeastLogin.RefreshFeastLoginActionInfo()
|
| | |
|
| | | elif actionName == ShareDefine.OperationActionName_FeastWish:
|
| | | PlayerFeastWish.RefreshFeastWishActionInfo()
|
| | | |
| | | elif actionName == ShareDefine.OperationActionName_FeastWeekParty:
|
| | | PlayerFeastWeekParty.RefreshOperationAction_FeastWeekParty()
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Player.PlayerFeastWish
|
| | | #
|
| | | # @todo:节日祝福
|
| | | # @author hxp
|
| | | # @date 2021-01-29
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 节日祝福
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2021-01-29 11:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import ItemCommon
|
| | | import PyGameData
|
| | | import ShareDefine
|
| | | import PlayerControl
|
| | | import IpyGameDataPY
|
| | | import ItemControler
|
| | | import ChPyNetSendPack
|
| | | import IPY_GameWorld
|
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | | import random
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | isReset = __CheckPlayerFeastWishAction(curPlayer)
|
| | | if not isReset:
|
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWish, {})
|
| | | # 活动中同步活动信息
|
| | | if actInfo.get(ShareDefine.ActKey_State):
|
| | | Sync_FeastWishActionInfo(curPlayer)
|
| | | Sync_FeastWishPlayerInfo(curPlayer)
|
| | | return
|
| | |
|
| | | def RefreshFeastWishActionInfo():
|
| | | ## 收到GameServer同步的活动信息,刷新活动信息
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if curPlayer.GetID() == 0:
|
| | | continue
|
| | | __CheckPlayerFeastWishAction(curPlayer)
|
| | | return
|
| | |
|
| | | def __CheckPlayerFeastWishAction(curPlayer):
|
| | | ## 检查玩家活动信息
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | |
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWish, {})
|
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | |
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishID) # 玩家身上的活动ID
|
| | | # 活动ID 相同的话不处理
|
| | | if actID == playerActID:
|
| | | GameWorld.DebugLog("节日祝福活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | | GameWorld.DebugLog("节日祝福活动重置! actID=%s,playerActID=%s,state=%s" % (actID, playerActID, state), playerID)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishID, actID)
|
| | | if not state:
|
| | | return
|
| | | |
| | | bottleNumList = GetWishBottleNumList()
|
| | | for bottleNum in bottleNumList:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, 0)
|
| | | |
| | | Sync_FeastWishActionInfo(curPlayer)
|
| | | Sync_FeastWishPlayerInfo(curPlayer)
|
| | | return True
|
| | |
|
| | | #// AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem
|
| | | #
|
| | | #struct tagCMFeastWishBottleChooseItem
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE BottleNum; //瓶子编号
|
| | | # BYTE RecordIndex; //物品索引,用于选择及记录是否已选择
|
| | | #};
|
| | | def OnFeastWishBottleChooseItem(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | bottleNum = clientData.BottleNum
|
| | | getRecordIndex = clientData.RecordIndex
|
| | | |
| | | templateID = __GetWishTemplateID()
|
| | | GameWorld.DebugLog("节日祝福瓶选择奖励! templateID=%s,bottleNum=%s,getRecordIndex=%s" % (templateID, bottleNum, getRecordIndex))
|
| | | if not templateID:
|
| | | return
|
| | | |
| | | bottleIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastWishBottle", templateID)
|
| | | if not bottleIpyDataList:
|
| | | return
|
| | | |
| | | findIpyData = None
|
| | | for bottleIpyData in bottleIpyDataList:
|
| | | if bottleNum == bottleIpyData.GetWishBottleNum():
|
| | | findIpyData = bottleIpyData
|
| | | break
|
| | | |
| | | if not findIpyData:
|
| | | GameWorld.DebugLog(" 找不到对应节日祝福瓶! bottleNum=%s" % bottleNum)
|
| | | return
|
| | | |
| | | choosePrizeItemDict = findIpyData.GetChoosePrizeItem()
|
| | | if getRecordIndex not in choosePrizeItemDict:
|
| | | GameWorld.DebugLog(" 找不到对应节日祝福瓶奖励物品! getRecordIndex=%s" % getRecordIndex)
|
| | | return
|
| | | |
| | | curWishValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleValue % bottleNum)
|
| | | getState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum)
|
| | | getTimes = 0
|
| | | for recordIndex in choosePrizeItemDict.keys():
|
| | | if getState & pow(2, recordIndex):
|
| | | getTimes += 1
|
| | | if getRecordIndex == recordIndex:
|
| | | GameWorld.DebugLog(" 该物品已经选择过! getRecordIndex=%s,getState=%s" % (getRecordIndex, getState))
|
| | | return
|
| | | |
| | | if getTimes >= findIpyData.GetChooseTimeMax():
|
| | | GameWorld.DebugLog(" 已没有领取次数! getState=%s,getTimes=%s >= %s" % (getState, getTimes, findIpyData.GetChooseTimeMax()))
|
| | | return
|
| | | |
| | | if curWishValue < findIpyData.GetNeedWishValue():
|
| | | GameWorld.DebugLog(" 祝福值不足领取! curWishValue=%s < %s" % (curWishValue, findIpyData.GetNeedWishValue()))
|
| | | return
|
| | | |
| | | if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
|
| | | return
|
| | | itemInfo = choosePrizeItemDict[getRecordIndex]
|
| | | itemID, itemCount, isAuctionItem = itemInfo
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], ["", False, {}]):
|
| | | return
|
| | | |
| | | updWishValue = curWishValue - findIpyData.GetNeedWishValue()
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, updWishValue)
|
| | | |
| | | updGetState = getState | pow(2, getRecordIndex)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, updGetState)
|
| | | |
| | | Sync_FeastWishPlayerInfo(curPlayer, [bottleNum])
|
| | | |
| | | GameWorld.DebugLog(" 选择成功: getState=%s,updGetState=%s,curWishValue=%s,updWishValue=%s,itemInfo=%s" |
| | | % (getState, updGetState, curWishValue, updWishValue, itemInfo))
|
| | | |
| | | if itemID in findIpyData.GetGoodItemIDList():
|
| | | recFromType = 1 # 记录来源: 1-祝福瓶,2-祝福池
|
| | | valueList = [itemID, itemCount, recFromType]
|
| | | strValueList = [curPlayer.GetPlayerName()]
|
| | | notifyType = 4 # 通知全服单条
|
| | | GameWorld.AddUniversalGameRec(0, ShareDefine.Def_UniversalGameRecType_FeastWish, valueList, strValueList, notifyType)
|
| | | |
| | | notifyKey = findIpyData.GetWorldNotifyKey()
|
| | | if notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), itemID, "", itemCount])
|
| | | |
| | | return
|
| | |
|
| | | #// AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish
|
| | | #
|
| | | #struct tagCMFeastWishPoolWish
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE WishCount; //祝福次数
|
| | | #};
|
| | | def OnFeastWishPoolWish(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | wishCount = clientData.WishCount
|
| | | |
| | | templateID = __GetWishTemplateID()
|
| | | GameWorld.DebugLog("玩家节日祝福: wishCount=%s,templateID=%s" % (wishCount, templateID))
|
| | | if not templateID:
|
| | | return
|
| | | |
| | | bottleIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastWishBottle", templateID)
|
| | | poolIpyData = IpyGameDataPY.GetIpyGameData("ActFeastWishPool", templateID)
|
| | | if not bottleIpyDataList or not poolIpyData:
|
| | | return
|
| | | |
| | | canWishCountList = IpyGameDataPY.GetFuncEvalCfg("FeastWishCfg", 2)
|
| | | if wishCount not in canWishCountList:
|
| | | return
|
| | | |
| | | costItemID = IpyGameDataPY.GetFuncCfg("FeastWishCfg", 1)
|
| | | |
| | | costItemNeedCount = wishCount
|
| | | costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID)
|
| | | lackCount = max(0, costItemNeedCount - bindCnt - unBindCnt)
|
| | | if lackCount > 0:
|
| | | GameWorld.DebugLog(" 所需祝福道具不足!costItemID=%s,costItemNeedCount=%s,lackCount=%s" |
| | | % (costItemID, costItemNeedCount, lackCount))
|
| | | return
|
| | | |
| | | giveWishValueTotal = 0
|
| | | wishValueRange = IpyGameDataPY.GetFuncEvalCfg("FeastWishCfg", 3)
|
| | | |
| | | giveItemDict = {} # 用于判断占用背包用
|
| | | giveItemList = [] # 用于实际给物品及通知前端用,一个个给
|
| | | isAuctionItem = 0 # 默认给非拍品
|
| | | itemWeightInfoList = poolIpyData.GetWishPoolItemWeightInfo()
|
| | | for _ in xrange(wishCount):
|
| | | randItemInfo = GameWorld.GetResultByWeightList(itemWeightInfoList)
|
| | | if not randItemInfo:
|
| | | GameWorld.ErrLog("节日祝福池物品权重配置异常! %s" % itemWeightInfoList)
|
| | | return
|
| | | itemID, itemCount = randItemInfo
|
| | | giveItemList.append([itemID, itemCount, isAuctionItem])
|
| | | giveItemDict[itemID] = giveItemDict.get(itemID, 0) + itemCount
|
| | | giveWishValueTotal += random.randint(wishValueRange[0], wishValueRange[1])
|
| | | |
| | | checkSpaceList = [[itemID, itemCount, isAuctionItem] for itemID, itemCount in giveItemDict.items()]
|
| | | if not ItemControler.CheckPackSpaceEnough(curPlayer, checkSpaceList):
|
| | | return
|
| | | |
| | | GameWorld.DebugLog(" giveWishValueTotal=%s,giveItemList=%s" % (giveWishValueTotal, giveItemList))
|
| | | |
| | | # 扣除消耗
|
| | | ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemNeedCount, "FeastWish")
|
| | | |
| | | # 加祝福值
|
| | | syncBottleNumList = []
|
| | | for bottleIpyData in bottleIpyDataList:
|
| | | bottleNum = bottleIpyData.GetWishBottleNum()
|
| | | curWishValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleValue % bottleNum)
|
| | | getState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum)
|
| | | getTimes = 0
|
| | | for recordIndex in bottleIpyData.GetChoosePrizeItem().keys():
|
| | | if getState & pow(2, recordIndex):
|
| | | getTimes += 1
|
| | | canGetTimes = max(0, bottleIpyData.GetChooseTimeMax() - getTimes)
|
| | | wishValueMax = bottleIpyData.GetNeedWishValue() * canGetTimes
|
| | | if curWishValue >= wishValueMax:
|
| | | GameWorld.DebugLog(" 瓶子祝福值已满! bottleNum=%s,canGetTimes=%s,wishValueMax=%s <= curWishValue=%s" |
| | | % (bottleNum, canGetTimes, wishValueMax, curWishValue))
|
| | | continue
|
| | | updWishValue = min(wishValueMax, curWishValue + giveWishValueTotal)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, updWishValue)
|
| | | GameWorld.DebugLog(" 瓶子祝福值更新! bottleNum=%s,canGetTimes=%s,wishValueMax=%s,curWishValue=%s,updWishValue=%s" |
| | | % (bottleNum, canGetTimes, wishValueMax, curWishValue, updWishValue))
|
| | | syncBottleNumList.append(bottleNum)
|
| | | |
| | | # 给物品
|
| | | goodItemIDList = poolIpyData.GetGoodItemIDList()
|
| | | notifyKey = poolIpyData.GetWorldNotifyKey()
|
| | | for itemID, itemCount, isAuctionItem in giveItemList:
|
| | | itemObj = ItemControler.GetOutPutItemObj(itemID, itemCount, isAuctionItem, curPlayer=curPlayer)
|
| | | itemUserData = itemObj.GetUserData()
|
| | | isOK = ItemControler.DoLogic_PutItemInPack(curPlayer, itemObj, ["FeastWish", False, {}], [IPY_GameWorld.rptItem])
|
| | | |
| | | if isOK and itemID in goodItemIDList:
|
| | | # 通知GameServer记录好物品轮播
|
| | | recFromType = 2 # 记录来源: 1-祝福瓶,2-祝福池
|
| | | valueList = [itemID, itemCount, recFromType]
|
| | | strValueList = [curPlayer.GetPlayerName()]
|
| | | notifyType = 4 # 通知全服单条
|
| | | GameWorld.AddUniversalGameRec(0, ShareDefine.Def_UniversalGameRecType_FeastWish, valueList, strValueList, notifyType)
|
| | | |
| | | if notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), itemID, itemUserData, itemCount])
|
| | | |
| | | # 通知前端结果
|
| | | retPack = ChPyNetSendPack.tagMCFeastWishResult()
|
| | | retPack.AddWishValue = giveWishValueTotal
|
| | | retPack.WishResult = str(giveItemList)
|
| | | retPack.WishResultLen = len(retPack.WishResult)
|
| | | NetPackCommon.SendFakePack(curPlayer, retPack)
|
| | | |
| | | if syncBottleNumList:
|
| | | Sync_FeastWishPlayerInfo(curPlayer, syncBottleNumList)
|
| | | |
| | | return
|
| | |
|
| | | def GetFeastWishDropItemIDList(curPlayer, npcData):
|
| | | ## 获取掉落祝福道具ID列表
|
| | | ## @return: [itemID, ...]
|
| | | |
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWish, {})
|
| | | if not actInfo:
|
| | | return []
|
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return []
|
| | | |
| | | if not ChConfig.IsGameBoss(npcData):
|
| | | return []
|
| | | |
| | | npcID = npcData.GetNPCID()
|
| | | killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
|
| | | limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
|
| | | if limitIndex not in [ShareDefine.Def_Boss_Func_World, ShareDefine.Def_Boss_Func_Home]:
|
| | | # 规定只有世界boss、boss之家可掉落
|
| | | return
|
| | | |
| | | dropRate = IpyGameDataPY.GetFuncCfg("FeastWishCfg", 4)
|
| | | if not GameWorld.CanHappen(dropRate):
|
| | | return
|
| | | wishItemID = IpyGameDataPY.GetFuncCfg("FeastWishCfg", 1) # 默认掉1个
|
| | | #GameWorld.DebugLog("掉落节日祝福道具: npcID=%s,dropRate=%s,wishItemID=%s" % (npcID, dropRate, wishItemID))
|
| | | return [wishItemID]
|
| | |
|
| | | def Sync_FeastWishPlayerInfo(curPlayer, bottleNumList=[]):
|
| | | ## 通知活动玩家信息
|
| | | |
| | | if bottleNumList:
|
| | | syncBottleNumList = bottleNumList
|
| | | else:
|
| | | syncBottleNumList = GetWishBottleNumList()
|
| | | |
| | | playerPack = ChPyNetSendPack.tagMCFeastWishPlayerInfo()
|
| | | playerPack.PlayerBottleInfo = []
|
| | | for bottleNum in syncBottleNumList:
|
| | | playerBottle = ChPyNetSendPack.tagMCFeastWishPlayerBottle()
|
| | | playerBottle.BottleNum = bottleNum
|
| | | playerBottle.WishValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleValue % bottleNum)
|
| | | playerBottle.ChooseRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum)
|
| | | playerPack.PlayerBottleInfo.append(playerBottle)
|
| | | playerPack.BottleCount = len(playerPack.PlayerBottleInfo)
|
| | | NetPackCommon.SendFakePack(curPlayer, playerPack)
|
| | | return
|
| | |
|
| | | def GetWishBottleNumList():
|
| | | templateID = __GetWishTemplateID()
|
| | | if not templateID:
|
| | | return []
|
| | | |
| | | bottleIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastWishBottle", templateID)
|
| | | if not bottleIpyDataList:
|
| | | return []
|
| | | return [bottleIpyData.GetWishBottleNum() for bottleIpyData in bottleIpyDataList]
|
| | |
|
| | | def __GetWishTemplateID():
|
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWish, {})
|
| | | if not actInfo:
|
| | | return
|
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFeastWish", cfgID)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | worldLV = actInfo.get(ShareDefine.ActKey_WorldLV)
|
| | | templateID = GameWorld.GetDictValueByRangeKey(ipyData.GetTemplateIDInfo(), worldLV, 0)
|
| | | return templateID
|
| | |
|
| | | def Sync_FeastWishActionInfo(curPlayer):
|
| | | ## 通知活动信息
|
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWish, {})
|
| | | if not actInfo:
|
| | | return
|
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFeastWish", cfgID)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | worldLV = actInfo.get(ShareDefine.ActKey_WorldLV)
|
| | | templateID = GameWorld.GetDictValueByRangeKey(ipyData.GetTemplateIDInfo(), worldLV, 0)
|
| | | if not templateID:
|
| | | return
|
| | | |
| | | bottleIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastWishBottle", templateID)
|
| | | poolIpyData = IpyGameDataPY.GetIpyGameData("ActFeastWishPool", templateID)
|
| | | |
| | | openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | actPack = ChPyNetSendPack.tagMCFeastWishInfo()
|
| | | actPack.Clear()
|
| | | actPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
|
| | | actPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
|
| | | actPack.WishPoolShowItemList = poolIpyData.GetWishPoolClientItemShow() if poolIpyData else []
|
| | | actPack.WishPoolShowCount = len(actPack.WishPoolShowItemList)
|
| | | actPack.BottleInfoList = []
|
| | | if bottleIpyDataList:
|
| | | for bottleIpyData in bottleIpyDataList:
|
| | | bottleInfo = ChPyNetSendPack.tagMCFeastWishBottleInfo()
|
| | | bottleInfo.BottleNum = bottleIpyData.GetWishBottleNum()
|
| | | bottleInfo.NeedWishValue = bottleIpyData.GetNeedWishValue()
|
| | | bottleInfo.ChooseTimeMax = bottleIpyData.GetChooseTimeMax()
|
| | | bottleInfo.ChoosePrizeList = []
|
| | | prizeItemDict = bottleIpyData.GetChoosePrizeItem()
|
| | | for recordIndex, itemInfo in prizeItemDict.items():
|
| | | itemID, itemCount, isAuctionItem = itemInfo
|
| | | itemInfo = ChPyNetSendPack.tagMCFeastWishBottleItem()
|
| | | itemInfo.RecordIndex = recordIndex
|
| | | itemInfo.ItemID = itemID
|
| | | itemInfo.ItemCount = itemCount
|
| | | itemInfo.IsBind = isAuctionItem
|
| | | bottleInfo.ChoosePrizeList.append(itemInfo)
|
| | | bottleInfo.ChoosePrizeCount = len(bottleInfo.ChoosePrizeList)
|
| | | actPack.BottleInfoList.append(bottleInfo)
|
| | | actPack.BottleCount = len(actPack.BottleInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, actPack)
|
| | | return
|
| | |
|
| | |
| | | OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
|
| | | OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
|
| | | OperationActionName_FeastLogin = "ActFeastLogin" # 节日登录活动
|
| | | OperationActionName_FeastWish = "ActFeastWish" # 节日祝愿活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | | OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
|
| | | OperationActionName_FeastWish,
|
| | | ]
|
| | | #所有的运营活动列表,含节日活动
|
| | | OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate,
|
| | |
| | | OperationActionName_WeekParty,
|
| | | OperationActionName_CollectWords, OperationActionName_CollectWords2,
|
| | | OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
|
| | | OperationActionName_FeastWish,
|
| | | ]
|
| | |
|
| | | #所有的累计充值活动
|
| | |
| | | Def_UniversalGameRecType_Reward, # 通用奖励表(TopBar)14
|
| | | Def_UniversalGameRecType_ArenaBattleRecord, # 竞技场玩家挑战记录 15
|
| | | Def_UniversalGameRecType_CrossActInfo, # 跨服运营活动信息记录 16
|
| | | Def_UniversalGameRecType_17,
|
| | | Def_UniversalGameRecType_FeastWish, #节日祝福大奖记录17
|
| | | Def_UniversalGameRecType_18,
|
| | | Def_UniversalGameRecType_19,
|
| | | Def_UniversalGameRecType_20,
|