hxp
2021-05-08 043a9c0e0df19388055bb7ad3b15952d7da91506
8721 【主干】【BT2】【后端】H.活动-合服庆典(骑宠盛宴)
14个文件已修改
1个文件已添加
601 ■■■■■ 已修改文件
PySysDB/PySysDBG.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCustomRefresh.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetFeast.py 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -467,6 +467,23 @@
    list        NotifyInfoLoop;    //全服提示信息 - 循环广播[间隔分钟, 广播key]
};
//骑宠盛宴活动
struct tagActHorsePetFeast
{
    DWORD        _CfgID;    //配置ID
    list        PlatformList;    //活动平台列表["平台A", "平台A", ...],配[]代表所有
    list        ServerGroupIDList;    //服务器ID列表
    BYTE        ActNum;    //活动分组编号, 活动类型 * 10 + 不同界面编号
    char        StartDate;    //开启日期
    char        EndDate;    //结束日期
    list        StartTimeList;    //开启时间列表, 支持多个时段
    list        EndTimeList;    //结束时间列表, 支持多个时段
    dict        NotifyInfoStart;    //全服提示信息 - 相对开始时间
    dict        NotifyInfoEnd;    //全服提示信息 - 相对结束时间
    BYTE        IsDayReset;    //是否每天重置
};
//BOSS复活活动时间表
struct tagActBossReborn
PySysDB/PySysDBPY.h
@@ -1432,6 +1432,18 @@
    BYTE        NeedNotify;        //是否需要广播
};
//骑宠盛宴活动
struct tagActHorsePetFeast
{
    DWORD        _CfgID;    //配置ID
    char        StartDate;    //开启日期
    char        EndDate;    //结束日期
    list        StartTimeList;    //开启时间列表, 支持多个时段
    list        EndTimeList;    //结束时间列表, 支持多个时段
    WORD        LVLimit;    //限制等级
};
//BOSS复活活动时间表
struct tagActBossReborn
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24885,6 +24885,148 @@
#------------------------------------------------------
# AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo
class  tagMCActHorsePetFeastTime(Structure):
    StartTime = ""    #(char StartTime[5])// 开始时间 H:M
    EndtTime = ""    #(char EndtTime[5])// 结束时间 H:M
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
        self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
        return _pos
    def Clear(self):
        self.StartTime = ""
        self.EndtTime = ""
        return
    def GetLength(self):
        length = 0
        length += 5
        length += 5
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, 5, self.StartTime)
        data = CommFunc.WriteString(data, 5, self.EndtTime)
        return data
    def OutputString(self):
        DumpString = '''
                                StartTime:%s,
                                EndtTime:%s
                                '''\
                                %(
                                self.StartTime,
                                self.EndtTime
                                )
        return DumpString
class  tagMCActHorsePetFeastInfo(Structure):
    Head = tagHead()
    ActNum = 0    #(BYTE ActNum)//活动编号
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    TimeCount = 0    #(BYTE TimeCount)
    ActTimeList = list()    #(vector<tagMCActHorsePetFeastTime> ActTimeList)// 活动时间 H:M 列表
    LimitLV = 0    #(WORD LimitLV)// 限制等级
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x54
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.TimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TimeCount):
            temActTimeList = tagMCActHorsePetFeastTime()
            _pos = temActTimeList.ReadData(_lpData, _pos)
            self.ActTimeList.append(temActTimeList)
        self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x54
        self.ActNum = 0
        self.StartDate = ""
        self.EndtDate = ""
        self.TimeCount = 0
        self.ActTimeList = list()
        self.LimitLV = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 10
        length += 10
        length += 1
        for i in range(self.TimeCount):
            length += self.ActTimeList[i].GetLength()
        length += 2
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActNum)
        data = CommFunc.WriteString(data, 10, self.StartDate)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        data = CommFunc.WriteBYTE(data, self.TimeCount)
        for i in range(self.TimeCount):
            data = CommFunc.WriteString(data, self.ActTimeList[i].GetLength(), self.ActTimeList[i].GetBuffer())
        data = CommFunc.WriteWORD(data, self.LimitLV)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActNum:%d,
                                StartDate:%s,
                                EndtDate:%s,
                                TimeCount:%d,
                                ActTimeList:%s,
                                LimitLV:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActNum,
                                self.StartDate,
                                self.EndtDate,
                                self.TimeCount,
                                "...",
                                self.LimitLV
                                )
        return DumpString
m_NAtagMCActHorsePetFeastInfo=tagMCActHorsePetFeastInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetFeastInfo.Head.Cmd,m_NAtagMCActHorsePetFeastInfo.Head.SubCmd))] = m_NAtagMCActHorsePetFeastInfo
#------------------------------------------------------
# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
class  tagMCActLoginAwardAction(Structure):
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -854,6 +854,12 @@
                if isReload and ipyData:
                    GameWorldBoss.SetBossRebornNeedPoint(True)
    
            elif actName == ShareDefine.OperationActionName_HorsePetFeast:
                if preState != state and state:
                    relatedID = "%s|%s" % (actName, actNum)
                    GameWorld.Log("    骑宠盛宴开始: relatedID=%s" % (relatedID))
                    GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ActionBossRebornSign % relatedID, int(time.time()))
            elif actName == ShareDefine.OperationActionName_FairyCeremony:
                if isReload and ipyData:
                    PlayerFairyCeremony.Sync_OperationAction_FairyCeremony(ipyData)
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -395,6 +395,20 @@
                        ("list", "NotifyInfoLoop", 0),
                        ),
                "ActHorsePetFeast":(
                        ("DWORD", "CfgID", 1),
                        ("list", "PlatformList", 0),
                        ("list", "ServerGroupIDList", 0),
                        ("BYTE", "ActNum", 0),
                        ("char", "StartDate", 0),
                        ("char", "EndDate", 0),
                        ("list", "StartTimeList", 0),
                        ("list", "EndTimeList", 0),
                        ("dict", "NotifyInfoStart", 0),
                        ("dict", "NotifyInfoEnd", 0),
                        ("BYTE", "IsDayReset", 0),
                        ),
                "ActBossReborn":(
                        ("DWORD", "CfgID", 1),
                        ("list", "ServerGroupIDList", 0),
@@ -1493,6 +1507,35 @@
    def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
    def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
# 骑宠盛宴活动
class IPY_ActHorsePetFeast():
    def __init__(self):
        self.CfgID = 0
        self.PlatformList = []
        self.ServerGroupIDList = []
        self.ActNum = 0
        self.StartDate = ""
        self.EndDate = ""
        self.StartTimeList = []
        self.EndTimeList = []
        self.NotifyInfoStart = {}
        self.NotifyInfoEnd = {}
        self.IsDayReset = 0
        return
    def GetCfgID(self): return self.CfgID # 配置ID
    def GetPlatformList(self): return self.PlatformList # 活动平台列表["平台A", "平台A", ...],配[]代表所有
    def GetServerGroupIDList(self): return self.ServerGroupIDList # 服务器ID列表
    def GetActNum(self): return self.ActNum # 活动分组编号, 活动类型 * 10 + 不同界面编号
    def GetStartDate(self): return self.StartDate # 开启日期
    def GetEndDate(self): return self.EndDate # 结束日期
    def GetStartTimeList(self): return self.StartTimeList # 开启时间列表, 支持多个时段
    def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
    def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
    def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
    def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
# BOSS复活活动时间表
class IPY_ActBossReborn():
    
@@ -2288,6 +2331,8 @@
        self.ipyActCostRebateLen = len(self.ipyActCostRebateCache)
        self.ipyActCollectWordsCache = self.__LoadFileData("ActCollectWords", IPY_ActCollectWords)
        self.ipyActCollectWordsLen = len(self.ipyActCollectWordsCache)
        self.ipyActHorsePetFeastCache = self.__LoadFileData("ActHorsePetFeast", IPY_ActHorsePetFeast)
        self.ipyActHorsePetFeastLen = len(self.ipyActHorsePetFeastCache)
        self.ipyActBossRebornCache = self.__LoadFileData("ActBossReborn", IPY_ActBossReborn)
        self.ipyActBossRebornLen = len(self.ipyActBossRebornCache)
        self.ipyActFairyCeremonyCache = self.__LoadFileData("ActFairyCeremony", IPY_ActFairyCeremony)
@@ -2586,6 +2631,8 @@
    def GetActCostRebateByIndex(self, index): return self.ipyActCostRebateCache[index]
    def GetActCollectWordsCount(self): return self.ipyActCollectWordsLen
    def GetActCollectWordsByIndex(self, index): return self.ipyActCollectWordsCache[index]
    def GetActHorsePetFeastCount(self): return self.ipyActHorsePetFeastLen
    def GetActHorsePetFeastByIndex(self, index): return self.ipyActHorsePetFeastCache[index]
    def GetActBossRebornCount(self): return self.ipyActBossRebornLen
    def GetActBossRebornByIndex(self, index): return self.ipyActBossRebornCache[index]
    def GetActFairyCeremonyCount(self): return self.ipyActFairyCeremonyLen
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -235,6 +235,7 @@
OperationActionName_ManyDayRecharge = "ActManyDayRecharge" # 多日连充活动
OperationActionName_SingleRecharge = "ActSingleRecharge" # 单笔累充活动
OperationActionName_Turntable = "ActTurntable" # 转盘活动
OperationActionName_HorsePetFeast = "ActHorsePetFeast" # 骑宠盛宴活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
@@ -252,7 +253,7 @@
                           OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
                           OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
                           OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
                           OperationActionName_Turntable,
                           OperationActionName_Turntable, OperationActionName_HorsePetFeast,
                           ] + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
@@ -273,7 +274,7 @@
                                   OperationActionName_FlashGiftbag, OperationActionName_CostRebate,
                                   OperationActionName_SpringSale, OperationActionName_FlashSale,
                                   OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
                                   OperationActionName_Turntable,
                                   OperationActionName_Turntable, OperationActionName_HorsePetFeast,
                                   ]
#跨服运营活动表名定义
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24885,6 +24885,148 @@
#------------------------------------------------------
# AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo
class  tagMCActHorsePetFeastTime(Structure):
    StartTime = ""    #(char StartTime[5])// 开始时间 H:M
    EndtTime = ""    #(char EndtTime[5])// 结束时间 H:M
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
        self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
        return _pos
    def Clear(self):
        self.StartTime = ""
        self.EndtTime = ""
        return
    def GetLength(self):
        length = 0
        length += 5
        length += 5
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, 5, self.StartTime)
        data = CommFunc.WriteString(data, 5, self.EndtTime)
        return data
    def OutputString(self):
        DumpString = '''
                                StartTime:%s,
                                EndtTime:%s
                                '''\
                                %(
                                self.StartTime,
                                self.EndtTime
                                )
        return DumpString
class  tagMCActHorsePetFeastInfo(Structure):
    Head = tagHead()
    ActNum = 0    #(BYTE ActNum)//活动编号
    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    TimeCount = 0    #(BYTE TimeCount)
    ActTimeList = list()    #(vector<tagMCActHorsePetFeastTime> ActTimeList)// 活动时间 H:M 列表
    LimitLV = 0    #(WORD LimitLV)// 限制等级
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x54
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
        self.TimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TimeCount):
            temActTimeList = tagMCActHorsePetFeastTime()
            _pos = temActTimeList.ReadData(_lpData, _pos)
            self.ActTimeList.append(temActTimeList)
        self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAA
        self.Head.SubCmd = 0x54
        self.ActNum = 0
        self.StartDate = ""
        self.EndtDate = ""
        self.TimeCount = 0
        self.ActTimeList = list()
        self.LimitLV = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 10
        length += 10
        length += 1
        for i in range(self.TimeCount):
            length += self.ActTimeList[i].GetLength()
        length += 2
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ActNum)
        data = CommFunc.WriteString(data, 10, self.StartDate)
        data = CommFunc.WriteString(data, 10, self.EndtDate)
        data = CommFunc.WriteBYTE(data, self.TimeCount)
        for i in range(self.TimeCount):
            data = CommFunc.WriteString(data, self.ActTimeList[i].GetLength(), self.ActTimeList[i].GetBuffer())
        data = CommFunc.WriteWORD(data, self.LimitLV)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ActNum:%d,
                                StartDate:%s,
                                EndtDate:%s,
                                TimeCount:%d,
                                ActTimeList:%s,
                                LimitLV:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ActNum,
                                self.StartDate,
                                self.EndtDate,
                                self.TimeCount,
                                "...",
                                self.LimitLV
                                )
        return DumpString
m_NAtagMCActHorsePetFeastInfo=tagMCActHorsePetFeastInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetFeastInfo.Head.Cmd,m_NAtagMCActHorsePetFeastInfo.Head.SubCmd))] = m_NAtagMCActHorsePetFeastInfo
#------------------------------------------------------
# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
class  tagMCActLoginAwardAction(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1143,6 +1143,15 @@
                        ("BYTE", "NeedNotify", 0),
                        ),
                "ActHorsePetFeast":(
                        ("DWORD", "CfgID", 1),
                        ("char", "StartDate", 0),
                        ("char", "EndDate", 0),
                        ("list", "StartTimeList", 0),
                        ("list", "EndTimeList", 0),
                        ("WORD", "LVLimit", 0),
                        ),
                "ActBossReborn":(
                        ("DWORD", "CfgID", 1),
                        ("char", "StartDate", 0),
@@ -4136,6 +4145,25 @@
    def GetNeedItemList(self): return self.NeedItemList # 所需物品信息列表 [[物品ID,个数,是否绑定], ...]
    def GetNeedNotify(self): return self.NeedNotify # 是否需要广播
# 骑宠盛宴活动
class IPY_ActHorsePetFeast():
    def __init__(self):
        self.CfgID = 0
        self.StartDate = ""
        self.EndDate = ""
        self.StartTimeList = []
        self.EndTimeList = []
        self.LVLimit = 0
        return
    def GetCfgID(self): return self.CfgID # 配置ID
    def GetStartDate(self): return self.StartDate # 开启日期
    def GetEndDate(self): return self.EndDate # 结束日期
    def GetStartTimeList(self): return self.StartTimeList # 开启时间列表, 支持多个时段
    def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
    def GetLVLimit(self): return self.LVLimit # 限制等级
# BOSS复活活动时间表
class IPY_ActBossReborn():
    
@@ -5779,6 +5807,8 @@
        self.ipyActCollectWordsLen = len(self.ipyActCollectWordsCache)
        self.ipyCollectWordsExchangeCache = self.__LoadFileData("CollectWordsExchange", IPY_CollectWordsExchange)
        self.ipyCollectWordsExchangeLen = len(self.ipyCollectWordsExchangeCache)
        self.ipyActHorsePetFeastCache = self.__LoadFileData("ActHorsePetFeast", IPY_ActHorsePetFeast)
        self.ipyActHorsePetFeastLen = len(self.ipyActHorsePetFeastCache)
        self.ipyActBossRebornCache = self.__LoadFileData("ActBossReborn", IPY_ActBossReborn)
        self.ipyActBossRebornLen = len(self.ipyActBossRebornCache)
        self.ipyBossRebornCache = self.__LoadFileData("BossReborn", IPY_BossReborn)
@@ -6313,6 +6343,8 @@
    def GetActCollectWordsByIndex(self, index): return self.ipyActCollectWordsCache[index]
    def GetCollectWordsExchangeCount(self): return self.ipyCollectWordsExchangeLen
    def GetCollectWordsExchangeByIndex(self, index): return self.ipyCollectWordsExchangeCache[index]
    def GetActHorsePetFeastCount(self): return self.ipyActHorsePetFeastLen
    def GetActHorsePetFeastByIndex(self, index): return self.ipyActHorsePetFeastCache[index]
    def GetActBossRebornCount(self): return self.ipyActBossRebornLen
    def GetActBossRebornByIndex(self, index): return self.ipyActBossRebornCache[index]
    def GetBossRebornCount(self): return self.ipyBossRebornLen
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py
@@ -461,6 +461,11 @@
    if npcID in npcUseSkillOnDieDict:
        useSkillIDOnDie = npcUseSkillOnDieDict[npcID][0]
        
    useSkillAfterOtherDieDict = {}
    useSkillAfterOtherDieNPCDict = ReadChConfig.GetEvalChConfig("NPCLogic_AI_UseSkillAfterOtherDie")
    if npcID in useSkillAfterOtherDieNPCDict:
        useSkillAfterOtherDieDict = useSkillAfterOtherDieNPCDict[npcID]
    skillManager = curNPC.GetSkillManager()
    tagObjType = curTag.GetGameObjType()
    
@@ -475,6 +480,14 @@
            #GameWorld.DebugLog("死亡释放的技能仅在死亡时才能释放!useSkillIDOnDie=%s" % useSkillIDOnDie)
            continue
        
        skillTypeID = useSkill.GetSkillTypeID()
        if skillTypeID in useSkillAfterOtherDieDict:
            checkIsDeadNPCID = useSkillAfterOtherDieDict[skillTypeID]
            if GameWorld.FindNPCByNPCID(checkIsDeadNPCID):
                #GameWorld.DebugLog("目标NPC还活着,该技能未解锁,无法释放!npcID=%s,skillTypeID=%s,checkIsDeadNPCID=%s"
                #                   % (npcID, skillTypeID, checkIsDeadNPCID))
                continue
        #被动技能不释放
        if SkillCommon.isPassiveSkill(useSkill):
            #GameWorld.Log('被动技能不释放不释放 = %s'%(useSkill.GetSkillName()))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCustomRefresh.py
@@ -328,6 +328,7 @@
        __DoRefreshWorldBossCrossServer(npcRefresh, tick)
        return
    rebornLineID = 0
    assignLineID = 0
    mapID = GameWorld.GetMap().GetMapID()
    refreshMark = npcRefresh.GetRefreshMark()
    lineID = GameWorld.GetGameWorld().GetLineID()
@@ -364,6 +365,9 @@
        relatedType = ipyData.GetRelatedType()
        relatedID = ipyData.GetRelatedID()
        isNeedShunt = ipyData.GetIsNeedShunt()
        assignLineID = ipyData.GetRefreshLine() # 指定刷新的线路
        if assignLineID > 0:
            rebornLineID = assignLineID - 1
    if not bossID and not stoneNPCID:
        return
    gameFB = GameWorld.GetGameFB()
@@ -379,7 +383,14 @@
        
    # 关联运营活动,待扩展
    elif relatedType == 2:
        operationActionInfo = PyGameData.g_operationActionDict.get(relatedID, {})
        actNameInfo = relatedID.split("|")
        actName = actNameInfo[0]
        if actName in ShareDefine.MultiActNumOperationActNameList:
            actNum = GameWorld.ToIntDef(actNameInfo[1] if len(actNameInfo) > 1 else "10")
            actInfo = GameWorld.GetActInfo(actName, actNum)
            operationActionState = actInfo.get(ShareDefine.ActKey_State, 0)
        else:
            operationActionInfo = PyGameData.g_operationActionDict.get(actName, {})
        operationActionState = operationActionInfo.get(ShareDefine.ActKey_State, 0)
        rebornBossState = 1 if operationActionState else 0
        
@@ -394,7 +405,9 @@
        
    # 关联活动boss
    if relatedType:
        if assignLineID == 0: # 没有指定刷新线路的,活动boss固定刷在活动线
        rebornLineID = activityLineID # 活动boss只刷在活动线
        # 不是活动线 
        if rebornBossState and lineID != rebornLineID:
            rebornBossState = 0
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
@@ -23,6 +23,7 @@
import IPY_GameWorld
import IpyGameDataPY
import PlayerBossReborn
import PlayerActHorsePetFeast
import ChPyNetSendPack
import NetPackCommon
import ShareDefine
@@ -356,6 +357,8 @@
        if self.npcID == IpyGameDataPY.GetFuncCfg("BossRebornServerBoss", 3):
            PlayerBossReborn.DoBossRebornActionBossOnKilledLogic(self)
            
        PlayerActHorsePetFeast.DoActBossOnKilledLogic(self)
        ## 同样榜单逻辑的不同功能奖励处理 ...
        
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -109,6 +109,7 @@
import PlayerActRechargeRebateGold
import PlayerActManyDayRecharge
import PlayerActSingleRecharge
import PlayerActHorsePetFeast
import PlayerSpringSale
import PlayerFairyCeremony
import PlayerNewFairyCeremony
@@ -705,6 +706,8 @@
    PlayerFreeGoods.OnLogin(curPlayer)
    # BOSS复活活动
    PlayerBossReborn.OnLogin(curPlayer)
    # 骑宠盛宴活动
    PlayerActHorsePetFeast.OnLogin(curPlayer)
    # 周狂欢活动
    PlayerWeekParty.OnLogin(curPlayer)
    # 节日巡礼活动
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetFeast.py
New file
@@ -0,0 +1,155 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Player.PlayerActHorsePetFeast
#
# @todo:骑宠盛宴
# @author hxp
# @date 2021-05-08
# @version 1.0
#
# 详细描述: 骑宠盛宴
#
#-------------------------------------------------------------------------------
#"""Version = 2021-05-08 17:00"""
#-------------------------------------------------------------------------------
import ChConfig
import PlayerTJG
import ShareDefine
import IpyGameDataPY
import ChPyNetSendPack
import NetPackCommon
import PyGameData
import GameWorld
import NPCCommon
def OnLogin(curPlayer):
    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_HorsePetFeast, {}).values():
        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
        if actInfo.get(ShareDefine.ActKey_CfgID):
            SyncHorsePetFeastInfo(curPlayer, actNum)
    return
def RefreshOperationAction_HorsePetFeast(actNum):
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_HorsePetFeast, actNum)
    if not actInfo.get(ShareDefine.ActKey_CfgID):
        return
    playerManager = GameWorld.GetPlayerManager()
    for i in xrange(playerManager.GetPlayerCount()):
        curPlayer = playerManager.GetPlayerByIndex(i)
        if curPlayer == None or not curPlayer.GetInitOK():
            continue
        SyncHorsePetFeastInfo(curPlayer, actNum)
    return
def SyncHorsePetFeastInfo(curPlayer, actNum):
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_HorsePetFeast, actNum)
    #state = actInfo.get(ShareDefine.ActKey_State)
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
    if not cfgID:
        return
    actIpyData = IpyGameDataPY.GetIpyGameData("ActHorsePetFeast", cfgID)
    if not actIpyData:
        return
    startTimeList = actIpyData.GetStartTimeList()
    endTimeList = actIpyData.GetEndTimeList()
    if len(startTimeList) != len(endTimeList):
        return
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    actInfo = ChPyNetSendPack.tagMCActHorsePetFeastInfo()
    actInfo.Clear()
    actInfo.StartDate = GameWorld.GetOperationActionDateStr(actIpyData.GetStartDate(), openServerDay)
    actInfo.EndtDate = GameWorld.GetOperationActionDateStr(actIpyData.GetEndDate(), openServerDay)
    actInfo.ActTimeList = []
    for i, startTime in enumerate(startTimeList):
        timeObj = ChPyNetSendPack.tagMCActHorsePetFeastTime()
        timeObj.StartTime = startTime
        timeObj.EndtTime = endTimeList[i]
        actInfo.ActTimeList.append(timeObj)
    actInfo.TimeCount = len(actInfo.ActTimeList)
    actInfo.LimitLV = actIpyData.GetLVLimit()
    NetPackCommon.SendFakePack(curPlayer, actInfo)
    return
def DoActBossOnKilledLogic(npcRankHurtMgr):
    ## 活动boss被击杀
    #  @param rankHurtList: NPCHurtMgr.PlayerRankHurtList
    npcID = npcRankHurtMgr.npcID
    # 受奖励次数影响的物品掉落概率 {NPCID:[[物品ID,个数, 是否拍品, 掉落万分率], ...], ...},根据奖励次数随机多次,注意该配置非饼图,每种物品都会独立判断
    dropByPlayerCountInfo = IpyGameDataPY.GetFuncEvalCfg("HorsePetFeast", 2, {})
    if npcID not in dropByPlayerCountInfo:
        return
    # 不受奖励次数影响的物品掉落概率 {NPCID:[[物品ID,个数, 是否拍品, 掉落万分率], ...], ...},仅随机一次,注意该配置非饼图,每种物品都会独立判断
    dropOneChanceInfo = IpyGameDataPY.GetFuncEvalCfg("HorsePetFeast", 3, {})
    GameWorld.Log("骑宠盛宴活动boss被击杀: npcID=%s" % (npcID))
    curNPC = npcRankHurtMgr.curNPC
    awardPlayerDict = {}
    copyPlayerManager = GameWorld.GetMapCopyPlayerManager()
    for index in xrange(npcRankHurtMgr.GetHurtCount()):
        hurtObj = npcRankHurtMgr.GetHurtAt(index)
        if hurtObj.GetValueType() != ChConfig.Def_NPCHurtTypePlayer:
            continue
        playerID = hurtObj.GetValueID()
        hurtPlayer = copyPlayerManager.FindPlayerByID(playerID)
        if not hurtPlayer or PlayerTJG.GetIsTJG(hurtPlayer):
            continue
        if curNPC and not hurtPlayer.CanSeeOther(curNPC):
            GameWorld.Log("    伤血玩家不在boss视野内,无法获得奖励!playerPos(%s,%s), npcPos(%s,%s)"
                          % (hurtPlayer.GetPosX(), hurtPlayer.GetPosY(), curNPC.GetPosX(), curNPC.GetPosY()))
            continue
        awardPlayerDict[playerID] = hurtPlayer
    awardPlayerIDList = awardPlayerDict.keys()
    GameWorld.Log("    奖励玩家人数=%s, awardPlayerIDList=%s" % (len(awardPlayerIDList), awardPlayerIDList))
    if not awardPlayerDict:
        return
    awardRandCount = len(awardPlayerIDList)
    awardRandCountMin, awardRandCountMax = IpyGameDataPY.GetFuncEvalCfg("HorsePetFeast", 1, [])
    awardRandCount = max(awardRandCountMin, min(awardRandCountMax, awardRandCount))
    GameWorld.Log("    奖励随机次数: %s" % awardRandCount)
    dropPosX, dropPosY = curNPC.GetPosX(), curNPC.GetPosY()
    awardByPlayerCountList = dropByPlayerCountInfo[npcID]
    awardOneChanceList = dropOneChanceInfo.get(npcID, [])
    for playerID, hurtPlayer in awardPlayerDict.items():
        awardItemList = []
        for itemID, itemCount, isAuctionItem, dropRate in awardByPlayerCountList:
            dropCountTotal = 0
            for _ in xrange(awardRandCount):
                if dropRate < ShareDefine.Def_MaxRateValue and not GameWorld.CanHappen(dropRate):
                    continue
                dropCountTotal += itemCount
            if not dropCountTotal:
                continue
            awardItemList.append([itemID, dropCountTotal, isAuctionItem])
        for itemID, itemCount, isAuctionItem, dropRate in awardOneChanceList:
            if not GameWorld.CanHappen(dropRate):
                continue
            awardItemList.append([itemID, itemCount, isAuctionItem])
        GameWorld.Log("        玩家掉落: %s" % awardItemList, playerID)
        if not awardItemList:
            continue
        # 直接给物品并展示虚拟掉落
        NPCCommon.DoGiveItemByVirtualDrop(hurtPlayer, awardItemList, npcID, dropPosX, dropPosY)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -95,6 +95,7 @@
import PlayerDailyGiftbag
import PlayerFairyCeremony
import PlayerNewFairyCeremony
import PlayerActHorsePetFeast
import PlayerFeastRedPacket
import PlayerLuckyTreasure
import PlayerAuctionHouse
@@ -1381,6 +1382,9 @@
            elif actionName == ShareDefine.OperationActionName_BossReborn:
                PlayerBossReborn.RefreshOperationAction_BossReborn()
                
            elif actionName == ShareDefine.OperationActionName_HorsePetFeast:
                PlayerActHorsePetFeast.RefreshOperationAction_HorsePetFeast(actNum)
            elif actionName == ShareDefine.OperationActionName_FlashGiftbag:
                PlayerFlashGiftbag.RefreshFlashGiftbagActionInfo(actNum)
                
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -235,6 +235,7 @@
OperationActionName_ManyDayRecharge = "ActManyDayRecharge" # 多日连充活动
OperationActionName_SingleRecharge = "ActSingleRecharge" # 单笔累充活动
OperationActionName_Turntable = "ActTurntable" # 转盘活动
OperationActionName_HorsePetFeast = "ActHorsePetFeast" # 骑宠盛宴活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
@@ -252,7 +253,7 @@
                           OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
                           OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
                           OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
                           OperationActionName_Turntable,
                           OperationActionName_Turntable, OperationActionName_HorsePetFeast,
                           ] + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
@@ -273,7 +274,7 @@
                                   OperationActionName_FlashGiftbag, OperationActionName_CostRebate,
                                   OperationActionName_SpringSale, OperationActionName_FlashSale,
                                   OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
                                   OperationActionName_Turntable,
                                   OperationActionName_Turntable, OperationActionName_HorsePetFeast,
                                   ]
#跨服运营活动表名定义