8716 【主干】【后端】【BT2】H.活动-节日祈愿(增加节日登录奖励活动);
11个文件已修改
1个文件已添加
695 ■■■■■ 已修改文件
PySysDB/PySysDBG.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -270,6 +270,18 @@
    WORD        LVLimit;    //限制等级
};
//节日登录奖励时间表
struct tagActFeastLogin
{
    DWORD        _CfgID;    //配置ID
    char        ActMark;    //活动组标记
    list        PlatformList;    //活动平台列表["平台A", "平台A", ...],配[]代表所有
    list        ServerGroupIDList;    //服务器ID列表
    char        StartDate;    //开启日期
    char        EndDate;    //结束日期
};
//等级开启功能 #tagFuncOpenLV
struct    tagFuncOpenLV
PySysDB/PySysDBPY.h
@@ -1851,6 +1851,25 @@
    char        Reward;    //奖励物品
};
//节日登录奖励时间表
struct tagActFeastLogin
{
    DWORD        _CfgID;    //配置ID
    char        StartDate;    //开启日期
    char        EndDate;    //结束日期
    dict        TemplateIDInfo;    //模板信息 {(世界等级A,B):奖励模板编号, ...}
};
//节日登录奖励模板表
struct tagActFeastLoginAward
{
    BYTE        _TemplateID;    //模板ID
    BYTE        DayNum;    //第X天从1开始
    list        LoginAwardItemList;    //奖励列表[[物品ID,个数,是否拍品], ...]
};
//诛仙BOSS表
struct tagZhuXianBoss
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -27243,6 +27243,189 @@
#------------------------------------------------------
# AA 42 节日登录奖励活动信息 #tagMCFeastLoginInfo
class  tagMCFeastLoginDayAwardItem(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(tagMCFeastLoginDayAwardItem)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AA 42 节日登录奖励活动信息 //tagMCFeastLoginInfo:
                                ItemID:%d,
                                ItemCount:%d,
                                IsBind:%d
                                '''\
                                %(
                                self.ItemID,
                                self.ItemCount,
                                self.IsBind
                                )
        return DumpString
class  tagMCFeastLoginDayAward(Structure):
    DayNum = 0    #(BYTE DayNum)//天编号,从1开始,活动第X天只能领对应第X天的奖励
    AwardCount = 0    #(BYTE AwardCount)
    AwardItemList = list()    #(vector<tagMCFeastLoginDayAwardItem> AwardItemList)// 奖励物品列表
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.DayNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.AwardCount):
            temAwardItemList = tagMCFeastLoginDayAwardItem()
            _pos = temAwardItemList.ReadData(_lpData, _pos)
            self.AwardItemList.append(temAwardItemList)
        return _pos
    def Clear(self):
        self.DayNum = 0
        self.AwardCount = 0
        self.AwardItemList = list()
        return
    def GetLength(self):
        length = 0
        length += 1
        length += 1
        for i in range(self.AwardCount):
            length += self.AwardItemList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteBYTE(data, self.DayNum)
        data = CommFunc.WriteBYTE(data, self.AwardCount)
        for i in range(self.AwardCount):
            data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                DayNum:%d,
                                AwardCount:%d,
                                AwardItemList:%s
                                '''\
                                %(
                                self.DayNum,
                                self.AwardCount,
                                "..."
                                )
        return DumpString
class  tagMCFeastLoginInfo(Structure):
    Head = tagHead()
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    DayCount = 0    #(BYTE DayCount)// 总共几天
    DayAwardList = list()    #(vector<tagMCFeastLoginDayAward> DayAwardList)//登录天奖励列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x42
        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.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.DayCount):
            temDayAwardList = tagMCFeastLoginDayAward()
            _pos = temDayAwardList.ReadData(_lpData, _pos)
            self.DayAwardList.append(temDayAwardList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x42
        self.StartDate = ""
        self.EndtDate = ""
        self.DayCount = 0
        self.DayAwardList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 10
        length += 10
        length += 1
        for i in range(self.DayCount):
            length += self.DayAwardList[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.DayCount)
        for i in range(self.DayCount):
            data = CommFunc.WriteString(data, self.DayAwardList[i].GetLength(), self.DayAwardList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                StartDate:%s,
                                EndtDate:%s,
                                DayCount:%d,
                                DayAwardList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.DayCount,
                                "..."
                                )
        return DumpString
m_NAtagMCFeastLoginInfo=tagMCFeastLoginInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastLoginInfo.Head.Cmd,m_NAtagMCFeastLoginInfo.Head.SubCmd))] = m_NAtagMCFeastLoginInfo
#------------------------------------------------------
# AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo
class  tagMCFeastWeekPartyItem(Structure):
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -238,6 +238,15 @@
                        ("WORD", "LVLimit", 0),
                        ),
                "ActFeastLogin":(
                        ("DWORD", "CfgID", 1),
                        ("char", "ActMark", 0),
                        ("list", "PlatformList", 0),
                        ("list", "ServerGroupIDList", 0),
                        ("char", "StartDate", 0),
                        ("char", "EndDate", 0),
                        ),
                "FuncOpenLV":(
                        ("DWORD", "FuncId", 1),
                        ("DWORD", "LimitLV", 0),
@@ -1107,6 +1116,25 @@
    def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
    def GetRedPacketIDList(self): return self.RedPacketIDList # 每日对应红包ID列表[[第一天红包ID列表], ...]
    def GetLVLimit(self): return self.LVLimit # 限制等级
# 节日登录奖励时间表
class IPY_ActFeastLogin():
    def __init__(self):
        self.CfgID = 0
        self.ActMark = ""
        self.PlatformList = []
        self.ServerGroupIDList = []
        self.StartDate = ""
        self.EndDate = ""
        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 # 结束日期
# 等级开启功能
class IPY_FuncOpenLV():
@@ -2083,6 +2111,8 @@
        self.ipyFamilyRedPackLen = len(self.ipyFamilyRedPackCache)
        self.ipyActFeastRedPacketCache = self.__LoadFileData("ActFeastRedPacket", IPY_ActFeastRedPacket)
        self.ipyActFeastRedPacketLen = len(self.ipyActFeastRedPacketCache)
        self.ipyActFeastLoginCache = self.__LoadFileData("ActFeastLogin", IPY_ActFeastLogin)
        self.ipyActFeastLoginLen = len(self.ipyActFeastLoginCache)
        self.ipyFuncOpenLVCache = self.__LoadFileData("FuncOpenLV", IPY_FuncOpenLV)
        self.ipyFuncOpenLVLen = len(self.ipyFuncOpenLVCache)
        self.ipyChinNPCCache = self.__LoadFileData("ChinNPC", IPY_ChinNPC)
@@ -2371,6 +2401,8 @@
    def GetFamilyRedPackByIndex(self, index): return self.ipyFamilyRedPackCache[index]
    def GetActFeastRedPacketCount(self): return self.ipyActFeastRedPacketLen
    def GetActFeastRedPacketByIndex(self, index): return self.ipyActFeastRedPacketCache[index]
    def GetActFeastLoginCount(self): return self.ipyActFeastLoginLen
    def GetActFeastLoginByIndex(self, index): return self.ipyActFeastLoginCache[index]
    def GetFuncOpenLVCount(self): return self.ipyFuncOpenLVLen
    def GetFuncOpenLVByIndex(self, index): return self.ipyFuncOpenLVCache[index]
    def GetChinNPCCount(self): return self.ipyChinNPCLen
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -224,9 +224,12 @@
OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
OperationActionName_FeastLogin = "ActFeastLogin" # 节日登录活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy]
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
                                OperationActionName_FeastLogin,
                                ]
#所有的运营活动列表,含节日活动
OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                           OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -247,6 +250,7 @@
                                   OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
                                   OperationActionName_WeekParty,
                                   OperationActionName_CollectWords, OperationActionName_CollectWords2,
                                   OperationActionName_FeastLogin,
                                   ]
#跨服运营活动表名定义
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3825,6 +3825,10 @@
Def_PDict_LuckyTreasureFree = "LuckyTreasureFree" #是否免费过
Def_PDict_LuckyTreasurePoint = "LuckyTreasurePoint" #幸运值
Def_PDict_LuckyTreasureCnt = "LuckyTreasureCnt" #鉴宝次数
#节日登录活动
Def_PDict_FeastLoginID = "FeastLoginID"  # 玩家身上的活动ID,唯一标识,取活动开始日期time值
Def_PDict_FeastLoginAwardState = "FeastLoginAwardState"  # 活动登录领奖记录,按天编号-1为索引进行二进制位运算记录当天是否已领奖
#-------------------------------------------------------------------------------
#开服活动,Def_PDictType_OpenServerCampaign
@@ -5363,7 +5367,8 @@
Def_RewardType_ShareGame, #每日分享奖励34
Def_RewardType_GoodGame, #游戏好评奖励35
Def_RewardType_CACTGBillboardDabiao, #跨服充值排行活动达标奖励36
)= range(37)
Def_RewardType_FeastLogin, #节日登录奖励37
)= range(38)
#boss复活相关活动定义
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -27243,6 +27243,189 @@
#------------------------------------------------------
# AA 42 节日登录奖励活动信息 #tagMCFeastLoginInfo
class  tagMCFeastLoginDayAwardItem(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(tagMCFeastLoginDayAwardItem)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AA 42 节日登录奖励活动信息 //tagMCFeastLoginInfo:
                                ItemID:%d,
                                ItemCount:%d,
                                IsBind:%d
                                '''\
                                %(
                                self.ItemID,
                                self.ItemCount,
                                self.IsBind
                                )
        return DumpString
class  tagMCFeastLoginDayAward(Structure):
    DayNum = 0    #(BYTE DayNum)//天编号,从1开始,活动第X天只能领对应第X天的奖励
    AwardCount = 0    #(BYTE AwardCount)
    AwardItemList = list()    #(vector<tagMCFeastLoginDayAwardItem> AwardItemList)// 奖励物品列表
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.DayNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.AwardCount):
            temAwardItemList = tagMCFeastLoginDayAwardItem()
            _pos = temAwardItemList.ReadData(_lpData, _pos)
            self.AwardItemList.append(temAwardItemList)
        return _pos
    def Clear(self):
        self.DayNum = 0
        self.AwardCount = 0
        self.AwardItemList = list()
        return
    def GetLength(self):
        length = 0
        length += 1
        length += 1
        for i in range(self.AwardCount):
            length += self.AwardItemList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteBYTE(data, self.DayNum)
        data = CommFunc.WriteBYTE(data, self.AwardCount)
        for i in range(self.AwardCount):
            data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                DayNum:%d,
                                AwardCount:%d,
                                AwardItemList:%s
                                '''\
                                %(
                                self.DayNum,
                                self.AwardCount,
                                "..."
                                )
        return DumpString
class  tagMCFeastLoginInfo(Structure):
    Head = tagHead()
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    DayCount = 0    #(BYTE DayCount)// 总共几天
    DayAwardList = list()    #(vector<tagMCFeastLoginDayAward> DayAwardList)//登录天奖励列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x42
        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.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.DayCount):
            temDayAwardList = tagMCFeastLoginDayAward()
            _pos = temDayAwardList.ReadData(_lpData, _pos)
            self.DayAwardList.append(temDayAwardList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x42
        self.StartDate = ""
        self.EndtDate = ""
        self.DayCount = 0
        self.DayAwardList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 10
        length += 10
        length += 1
        for i in range(self.DayCount):
            length += self.DayAwardList[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.DayCount)
        for i in range(self.DayCount):
            data = CommFunc.WriteString(data, self.DayAwardList[i].GetLength(), self.DayAwardList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                StartDate:%s,
                                EndtDate:%s,
                                DayCount:%d,
                                DayAwardList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.DayCount,
                                "..."
                                )
        return DumpString
m_NAtagMCFeastLoginInfo=tagMCFeastLoginInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastLoginInfo.Head.Cmd,m_NAtagMCFeastLoginInfo.Head.SubCmd))] = m_NAtagMCFeastLoginInfo
#------------------------------------------------------
# AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo
class  tagMCFeastWeekPartyItem(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1447,6 +1447,19 @@
                        ("char", "Reward", 0),
                        ),
                "ActFeastLogin":(
                        ("DWORD", "CfgID", 1),
                        ("char", "StartDate", 0),
                        ("char", "EndDate", 0),
                        ("dict", "TemplateIDInfo", 0),
                        ),
                "ActFeastLoginAward":(
                        ("BYTE", "TemplateID", 1),
                        ("BYTE", "DayNum", 0),
                        ("list", "LoginAwardItemList", 0),
                        ),
                "ZhuXianBoss":(
                        ("DWORD", "NPCID", 0),
                        ("BYTE", "LineID", 1),
@@ -4658,6 +4671,34 @@
    def GetSingleTimes(self): return self.SingleTimes # 单次领奖需要的次数
    def GetReward(self): return self.Reward # 奖励物品
# 节日登录奖励时间表
class IPY_ActFeastLogin():
    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_ActFeastLoginAward():
    def __init__(self):
        self.TemplateID = 0
        self.DayNum = 0
        self.LoginAwardItemList = []
        return
    def GetTemplateID(self): return self.TemplateID # 模板ID
    def GetDayNum(self): return self.DayNum # 第X天从1开始
    def GetLoginAwardItemList(self): return self.LoginAwardItemList # 奖励列表[[物品ID,个数,是否拍品], ...]
# 诛仙BOSS表
class IPY_ZhuXianBoss():
    
@@ -5469,6 +5510,10 @@
        self.ipyActLoginAwardLen = len(self.ipyActLoginAwardCache)
        self.ipyLoginAwardCache = self.__LoadFileData("LoginAward", IPY_LoginAward)
        self.ipyLoginAwardLen = len(self.ipyLoginAwardCache)
        self.ipyActFeastLoginCache = self.__LoadFileData("ActFeastLogin", IPY_ActFeastLogin)
        self.ipyActFeastLoginLen = len(self.ipyActFeastLoginCache)
        self.ipyActFeastLoginAwardCache = self.__LoadFileData("ActFeastLoginAward", IPY_ActFeastLoginAward)
        self.ipyActFeastLoginAwardLen = len(self.ipyActFeastLoginAwardCache)
        self.ipyZhuXianBossCache = self.__LoadFileData("ZhuXianBoss", IPY_ZhuXianBoss)
        self.ipyZhuXianBossLen = len(self.ipyZhuXianBossCache)
        self.ipyActFeastWeekPartyCache = self.__LoadFileData("ActFeastWeekParty", IPY_ActFeastWeekParty)
@@ -5975,6 +6020,10 @@
    def GetActLoginAwardByIndex(self, index): return self.ipyActLoginAwardCache[index]
    def GetLoginAwardCount(self): return self.ipyLoginAwardLen
    def GetLoginAwardByIndex(self, index): return self.ipyLoginAwardCache[index]
    def GetActFeastLoginCount(self): return self.ipyActFeastLoginLen
    def GetActFeastLoginByIndex(self, index): return self.ipyActFeastLoginCache[index]
    def GetActFeastLoginAwardCount(self): return self.ipyActFeastLoginAwardLen
    def GetActFeastLoginAwardByIndex(self, index): return self.ipyActFeastLoginAwardCache[index]
    def GetZhuXianBossCount(self): return self.ipyZhuXianBossLen
    def GetZhuXianBossByIndex(self, index): return self.ipyZhuXianBossCache[index]
    def GetActFeastWeekPartyCount(self): return self.ipyActFeastWeekPartyLen
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -80,6 +80,7 @@
import PlayerBossReborn
import PlayerWeekParty
import PlayerFeastWeekParty
import PlayerFeastLogin
import PlayerActLogin
import PlayerTreasure
import GameLogic_GodArea
@@ -697,6 +698,8 @@
    PlayerWeekParty.OnLogin(curPlayer)
    # 节日巡礼活动
    PlayerFeastWeekParty.OnLogin(curPlayer)
    # 节日登录活动
    PlayerFeastLogin.OnPlayerLogin(curPlayer)
    # 登录奖励活动
    PlayerActLogin.OnLogin(curPlayer)
    # 仙界盛典活动
@@ -5401,6 +5404,9 @@
    # 领取节日巡礼积分奖励
    elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyPoint:
        PlayerFeastWeekParty.GetFeastWeekPartyPointAward(curPlayer, dataEx, dataExStr)
    # 领取节日登录奖励
    elif rewardType == ChConfig.Def_RewardType_FeastLogin:
        PlayerFeastLogin.GetFeastLoginAward(curPlayer, dataEx)
    # 领取跨服充值排行活动达标奖励
    elif rewardType == ChConfig.Def_RewardType_CACTGBillboardDabiao:
        CrossActCTGBillboard.GetDabiaoAward(curPlayer, dataEx)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -83,6 +83,7 @@
import PlayerBossReborn
import PlayerWeekParty
import PlayerFeastWeekParty
import PlayerFeastLogin
import PlayerActLogin
import PlayerFlashGiftbag
import PlayerDailyGiftbag
@@ -1382,6 +1383,9 @@
            elif actionName == ShareDefine.OperationActionName_LoginAward:
                PlayerActLogin.RefreshOperationAction_LoginAward()
                
            elif actionName == ShareDefine.OperationActionName_FeastLogin:
                PlayerFeastLogin.RefreshFeastLoginActionInfo()
            elif actionName == ShareDefine.OperationActionName_FeastWeekParty:
                PlayerFeastWeekParty.RefreshOperationAction_FeastWeekParty()
                
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py
New file
@@ -0,0 +1,188 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Player.PlayerFeastLogin
#
# @todo:节日登录
# @author hxp
# @date 2021-01-27
# @version 1.0
#
# 详细描述: 节日登录
#
#-------------------------------------------------------------------------------
#"""Version = 2021-01-27 17:00"""
#-------------------------------------------------------------------------------
import PyGameData
import ShareDefine
import PlayerControl
import IpyGameDataPY
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
import NetPackCommon
import GameWorld
import ChConfig
import ChPlayer
def OnPlayerLogin(curPlayer):
    isReset = __CheckPlayerFeastLoginAction(curPlayer)
    if not isReset:
        actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastLogin, {})
        # 活动中同步活动信息
        if actInfo.get(ShareDefine.ActKey_State):
            Sync_FeastLoginActionInfo(curPlayer)
            Sync_FeastLoginPlayerInfo(curPlayer)
    return
def RefreshFeastLoginActionInfo():
    ## 收到GameServer同步的活动信息,刷新活动信息
    playerManager = GameWorld.GetPlayerManager()
    for index in xrange(playerManager.GetPlayerCount()):
        curPlayer = playerManager.GetPlayerByIndex(index)
        if curPlayer.GetID() == 0:
            continue
        __CheckPlayerFeastLoginAction(curPlayer)
    return
def __CheckPlayerFeastLoginAction(curPlayer):
    ## 检查玩家活动信息
    playerID = curPlayer.GetPlayerID()
    actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastLogin, {})
    actID = actInfo.get(ShareDefine.ActKey_ID, 0)
    state = actInfo.get(ShareDefine.ActKey_State, 0)
    playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginID) # 玩家身上的活动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_FeastLoginID, actID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastLoginAwardState, 0)
    Sync_FeastLoginActionInfo(curPlayer)
    Sync_FeastLoginPlayerInfo(curPlayer)
    return True
def GetFeastLoginAward(curPlayer, dayNum):
    ## 领取活动奖励
    actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastLogin, {})
    if not actInfo:
        return
    if not actInfo.get(ShareDefine.ActKey_State):
        GameWorld.DebugLog("非节日登录活动中!")
        return
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
    ipyData = IpyGameDataPY.GetIpyGameData("ActFeastLogin", cfgID)
    if not ipyData:
        return
    worldLV = actInfo.get(ShareDefine.ActKey_WorldLV)
    templateID = GameWorld.GetDictValueByRangeKey(ipyData.GetTemplateIDInfo(), worldLV, 0)
    if not templateID:
        return
    dayIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastLoginAward", templateID)
    if not dayIpyDataList:
        return
    findIpyData = None
    for dayIpyData in dayIpyDataList:
        if dayIpyData.GetDayNum() == dayNum:
            findIpyData = dayIpyData
            break
    if not findIpyData:
        GameWorld.DebugLog("找不到对应的天奖励! dayNum=%s" % dayNum)
        return
    awardIndex = dayNum - 1
    dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex)
    if awardIndex != dayIndex:
        GameWorld.DebugLog("非当天奖励,不可领奖! dayNum=%s, awardIndex=%s != dayIndex=%s" % (dayNum, awardIndex, dayIndex))
        return
    awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginAwardState)
    if awardRecord & pow(2, awardIndex):
        GameWorld.DebugLog("节日登录活动该天已领奖!dayNum=%s" % dayNum)
        return
    awardItemList = findIpyData.GetLoginAwardItemList()
    if not ItemControler.CheckPackSpaceEnough(curPlayer, awardItemList):
        return
    updAwardRecord = awardRecord | pow(2, awardIndex)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastLoginAwardState, updAwardRecord)
    Sync_FeastLoginPlayerInfo(curPlayer)
    GameWorld.DebugLog("领取节日登录奖励!dayNum=%s,awardIndex=%s,awardItemList=%s" % (dayNum, awardIndex, awardItemList))
    for itemID, itemCount, isAuctionItem in awardItemList:
        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem],
                                     event=["FeastLogin", False, {}])
    return
def Sync_FeastLoginPlayerInfo(curPlayer):
    ## 通知活动玩家信息
    awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginAwardState)
    ChPlayer.Sync_RewardGetRecordInfo(curPlayer, ChConfig.Def_RewardType_FeastLogin, awardState)
    return
def Sync_FeastLoginActionInfo(curPlayer):
    ## 通知活动信息
    actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastLogin, {})
    if not actInfo:
        return
    if not actInfo.get(ShareDefine.ActKey_State):
        return
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
    ipyData = IpyGameDataPY.GetIpyGameData("ActFeastLogin", cfgID)
    if not ipyData:
        return
    worldLV = actInfo.get(ShareDefine.ActKey_WorldLV)
    templateID = GameWorld.GetDictValueByRangeKey(ipyData.GetTemplateIDInfo(), worldLV, 0)
    if not templateID:
        return
    dayIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFeastLoginAward", templateID)
    if not dayIpyDataList:
        return
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    actPack = ChPyNetSendPack.tagMCFeastLoginInfo()
    actPack.Clear()
    actPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
    actPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
    actPack.DayAwardList = []
    for dayIpyData in dayIpyDataList:
        dayInfo = ChPyNetSendPack.tagMCFeastLoginDayAward()
        dayInfo.DayNum = dayIpyData.GetDayNum()
        dayInfo.AwardItemList = []
        for itemID, itemCount, isAuctionItem in dayIpyData.GetLoginAwardItemList():
            itemInfo = ChPyNetSendPack.tagMCFeastLoginDayAwardItem()
            itemInfo.ItemID = itemID
            itemInfo.ItemCount = itemCount
            itemInfo.IsBind = isAuctionItem
            dayInfo.AwardItemList.append(itemInfo)
        dayInfo.AwardCount = len(dayInfo.AwardItemList)
        actPack.DayAwardList.append(dayInfo)
    actPack.DayCount = len(actPack.DayAwardList)
    NetPackCommon.SendFakePack(curPlayer, actPack)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -224,9 +224,12 @@
OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
OperationActionName_FeastLogin = "ActFeastLogin" # 节日登录活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy]
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
                                OperationActionName_FeastLogin,
                                ]
#所有的运营活动列表,含节日活动
OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                           OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -247,6 +250,7 @@
                                   OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
                                   OperationActionName_WeekParty,
                                   OperationActionName_CollectWords, OperationActionName_CollectWords2,
                                   OperationActionName_FeastLogin,
                                   ]
#跨服运营活动表名定义