hxp
2019-01-28 a344551ca682f49117577f22bd8f0e67b1c0a314
6087 【后端】【1.5.200】春节红包雨活动(封包、表、通用定义)
9个文件已修改
352 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -954,15 +954,12 @@
    BYTE        PacketCnt;    //红包个数
};
//节日红包每日任务表
//节日红包每日成就表
struct tagActFeastRedPacketTask
struct tagActFeastRedPacketSucc
{
    BYTE        _FeastDay;    //节日第几天
    BYTE        _FeastTaskType;    //节日任务类型
    DWORD        _FeastTaskData;    //节日任务数据
    WORD        TotalTimes;    //任务目标数
    WORD        RedPacketID;    //奖励红包ID
    list        FeastSuccIDList;    //节日成就ID列表
};
//NPC秀表
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -12760,6 +12760,7 @@
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("RedPaketID", c_int),    # 红包ID
                  ("GetWay", c_ubyte),    #获得途径
                  ]
    def __init__(self):
@@ -12777,6 +12778,7 @@
        self.Cmd = 0xAB
        self.SubCmd = 0x12
        self.RedPaketID = 0
        self.GetWay = 0
        return
    def GetLength(self):
@@ -12789,12 +12791,14 @@
        DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
                                Cmd:%s,
                                SubCmd:%s,
                                RedPaketID:%d
                                RedPaketID:%d,
                                GetWay:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.RedPaketID
                                self.RedPaketID,
                                self.GetWay
                                )
        return DumpString
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -25471,129 +25471,6 @@
#------------------------------------------------------
# AB 26 节日红包任务进度信息 #tagMCFeastRedPackTaskInfo
class  tagMCFeastRedPackTaskProgress(Structure):
    _pack_ = 1
    _fields_ = [
                  ("TaskType", c_ubyte),    #任务类型
                  ("TaskData", c_int),    #任务数据
                  ("CurTimes", c_ushort),    #当前完成次数
                  ("RedPackState", 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.TaskType = 0
        self.TaskData = 0
        self.CurTimes = 0
        self.RedPackState = 0
        return
    def GetLength(self):
        return sizeof(tagMCFeastRedPackTaskProgress)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AB 26 节日红包任务进度信息 //tagMCFeastRedPackTaskInfo:
                                TaskType:%d,
                                TaskData:%d,
                                CurTimes:%d,
                                RedPackState:%d
                                '''\
                                %(
                                self.TaskType,
                                self.TaskData,
                                self.CurTimes,
                                self.RedPackState
                                )
        return DumpString
class  tagMCFeastRedPackTaskInfo(Structure):
    Head = tagHead()
    FeastDayIndex = 0    #(BYTE FeastDayIndex)//节日天索引,从0开始
    TaskCount = 0    #(BYTE TaskCount)//今日任务数
    TaskProgressList = list()    #(vector<tagMCFeastRedPackTaskProgress> TaskProgressList)// 任务进度信息列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x26
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.FeastDayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TaskCount):
            temTaskProgressList = tagMCFeastRedPackTaskProgress()
            _pos = temTaskProgressList.ReadData(_lpData, _pos)
            self.TaskProgressList.append(temTaskProgressList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x26
        self.FeastDayIndex = 0
        self.TaskCount = 0
        self.TaskProgressList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        for i in range(self.TaskCount):
            length += self.TaskProgressList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.FeastDayIndex)
        data = CommFunc.WriteBYTE(data, self.TaskCount)
        for i in range(self.TaskCount):
            data = CommFunc.WriteString(data, self.TaskProgressList[i].GetLength(), self.TaskProgressList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                FeastDayIndex:%d,
                                TaskCount:%d,
                                TaskProgressList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.FeastDayIndex,
                                self.TaskCount,
                                "..."
                                )
        return DumpString
m_NAtagMCFeastRedPackTaskInfo=tagMCFeastRedPackTaskInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackTaskInfo.Head.Cmd,m_NAtagMCFeastRedPackTaskInfo.Head.SubCmd))] = m_NAtagMCFeastRedPackTaskInfo
#------------------------------------------------------
# AB 07 节日活动奖励状态 #tagMCFestivalLoginAwardState
class  tagMCFestivalLoginAwardState(Structure):
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -233,8 +233,10 @@
OperationActionName_WeekParty = "ActWeekParty" # 周狂欢活动
OperationActionName_LoginAward = "ActLoginAward" # 登录奖励活动
OperationActionName_FeastWeekParty = "ActFeastWeekParty" # 节日巡礼狂欢活动
OperationActionName_FeastRedPacket = "ActFeastRedPacket" # 节日红包活动
OperationActionName_FeastCollectWords = "ActFeastCollectWords" # 节日集字活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty]
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket, OperationActionName_FeastCollectWords]
#所有的运营活动列表,含节日活动
OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                           OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -1709,10 +1711,19 @@
SuccType_Collect, #采集X物品X次131
SuccType_InlayGatherSoul, #镶嵌X枚X品质聚魂(不包含核心)132
SuccType_GatherSoulLvUp, #累计聚魂总等级XX(不包含核心)133
) = range(1, 134)
SuccType_FeastRedPack_TalkWorld, #节日红包 - 世界频道发言 x次 134
SuccType_FeastRedPack_Pray, # 节日红包 - 祈祷x次 135
SuccType_FeastRedPack_KillSpecificNPC, # 节日红包 - 击杀特定NPC x次 136
SuccType_FeastRedPack_KillBoss, # 节日红包 - 指定类型boss x次 137
SuccType_FeastRedPack_EnterMap, # 节日红包 - 进入指定地图 x次  138
SuccType_FeastRedPack_TaskCRun, # 节日红包 - 完成x次日常环任务成就 139
SuccType_FeastRedPack_Dice, # 节日红包 - 天机摇骰子x次  140
SuccType_FeastRedPack_CrossPK, # 节日红包 - 跨服PK x次  141
SuccType_FeastRedPack_FBSweep, # 节日红包 - 副本扫荡 x次  142
) = range(1, 143)
# 节日红包成就类型
FeastRedPackSuccessTypeList = range(SuccType_FeastRedPack_TalkWorld, SuccType_FeastRedPack_FBSweep + 1)
# 连续天规则的成就类型
ContinueSuccessTypeList = []
@@ -1852,3 +1863,12 @@
Def_Boss_Func_Dogz, # 神兽功能BOSS
) = range(3)
# 红包类型定义
RedPackType_GoldPacket = 0 # 主动发钻石红包
RedPackType_OpenServer = 5 # 开服红包
RedPackType_FeastSysBig = 31 # 节日系统大红包
RedPackType_FeastSysSmall = 32 # 节日系统小红包
RedPackType_FeastSucc = 33 # 节日成就红包
# 节日红包类型
FeastRedPackType = [RedPackType_FeastSysBig, RedPackType_FeastSysSmall, RedPackType_FeastSucc]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3934,6 +3934,11 @@
Def_PDict_OSRedPacketCanGrabCnt = "OSRedPacketCanGrabCnt"  # 开服红包可抢次数
Def_PDict_OSRedPacketStartTime = "OSRedPacketStartTime" #开服红包开始倒计时时间
#节日红包
Def_PDict_FeastRedPacketActID = "FeastRedPacketActID"  # 玩家身上的节日红包活动ID,唯一标识,取活动开始日期time值
Def_PDict_FeastRedPacketGrabMoney = "FeastRedPacketGrabMoney"  # 节日红包已抢数量
Def_PDict_FeastRedPacketCanGrabCnt = "FeastRedPacketCanGrabCnt"  # 节日红包可抢次数
#境界
Def_PDict_RealmFBIsOpen = "RealmFBIsOpen" #渡劫副本是否开启 0未开启 1已开启 2可升级境界
Def_PDict_RealmFBAttrAdd = "RealmFBAttrAdd_%s" #渡劫副本属性加成 参数属性ID
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -12760,6 +12760,7 @@
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("RedPaketID", c_int),    # 红包ID
                  ("GetWay", c_ubyte),    #获得途径
                  ]
    def __init__(self):
@@ -12777,6 +12778,7 @@
        self.Cmd = 0xAB
        self.SubCmd = 0x12
        self.RedPaketID = 0
        self.GetWay = 0
        return
    def GetLength(self):
@@ -12789,12 +12791,14 @@
        DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
                                Cmd:%s,
                                SubCmd:%s,
                                RedPaketID:%d
                                RedPaketID:%d,
                                GetWay:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.RedPaketID
                                self.RedPaketID,
                                self.GetWay
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -25471,129 +25471,6 @@
#------------------------------------------------------
# AB 26 节日红包任务进度信息 #tagMCFeastRedPackTaskInfo
class  tagMCFeastRedPackTaskProgress(Structure):
    _pack_ = 1
    _fields_ = [
                  ("TaskType", c_ubyte),    #任务类型
                  ("TaskData", c_int),    #任务数据
                  ("CurTimes", c_ushort),    #当前完成次数
                  ("RedPackState", 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.TaskType = 0
        self.TaskData = 0
        self.CurTimes = 0
        self.RedPackState = 0
        return
    def GetLength(self):
        return sizeof(tagMCFeastRedPackTaskProgress)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// AB 26 节日红包任务进度信息 //tagMCFeastRedPackTaskInfo:
                                TaskType:%d,
                                TaskData:%d,
                                CurTimes:%d,
                                RedPackState:%d
                                '''\
                                %(
                                self.TaskType,
                                self.TaskData,
                                self.CurTimes,
                                self.RedPackState
                                )
        return DumpString
class  tagMCFeastRedPackTaskInfo(Structure):
    Head = tagHead()
    FeastDayIndex = 0    #(BYTE FeastDayIndex)//节日天索引,从0开始
    TaskCount = 0    #(BYTE TaskCount)//今日任务数
    TaskProgressList = list()    #(vector<tagMCFeastRedPackTaskProgress> TaskProgressList)// 任务进度信息列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x26
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.FeastDayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.TaskCount):
            temTaskProgressList = tagMCFeastRedPackTaskProgress()
            _pos = temTaskProgressList.ReadData(_lpData, _pos)
            self.TaskProgressList.append(temTaskProgressList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xAB
        self.Head.SubCmd = 0x26
        self.FeastDayIndex = 0
        self.TaskCount = 0
        self.TaskProgressList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        for i in range(self.TaskCount):
            length += self.TaskProgressList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.FeastDayIndex)
        data = CommFunc.WriteBYTE(data, self.TaskCount)
        for i in range(self.TaskCount):
            data = CommFunc.WriteString(data, self.TaskProgressList[i].GetLength(), self.TaskProgressList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                FeastDayIndex:%d,
                                TaskCount:%d,
                                TaskProgressList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.FeastDayIndex,
                                self.TaskCount,
                                "..."
                                )
        return DumpString
m_NAtagMCFeastRedPackTaskInfo=tagMCFeastRedPackTaskInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackTaskInfo.Head.Cmd,m_NAtagMCFeastRedPackTaskInfo.Head.SubCmd))] = m_NAtagMCFeastRedPackTaskInfo
#------------------------------------------------------
# AB 07 节日活动奖励状态 #tagMCFestivalLoginAwardState
class  tagMCFestivalLoginAwardState(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -788,6 +788,11 @@
                        ("BYTE", "PacketCnt", 0),
                        ),
                "ActFeastRedPacketSucc":(
                        ("BYTE", "FeastDay", 1),
                        ("list", "FeastSuccIDList", 0),
                        ),
                "NPCShow":(
                        ("DWORD", "NPCID", 1),
                        ("DWORD", "MapID", 1),
@@ -2901,6 +2906,17 @@
    def GetMoneyType(self): return self.MoneyType # 金钱类型
    def GetPacketCnt(self): return self.PacketCnt # 红包个数
# 节日红包每日成就表
class IPY_ActFeastRedPacketSucc():
    def __init__(self):
        self.FeastDay = 0
        self.FeastSuccIDList = []
        return
    def GetFeastDay(self): return self.FeastDay # 节日第几天
    def GetFeastSuccIDList(self): return self.FeastSuccIDList # 成就ID列表
# NPC秀表
class IPY_NPCShow():
    
@@ -4187,6 +4203,8 @@
        self.ipyFamilyActivityLen = len(self.ipyFamilyActivityCache)
        self.ipyFamilyRedPackCache = self.__LoadFileData("FamilyRedPack", IPY_FamilyRedPack)
        self.ipyFamilyRedPackLen = len(self.ipyFamilyRedPackCache)
        self.ipyActFeastRedPacketSuccCache = self.__LoadFileData("ActFeastRedPacketSucc", IPY_ActFeastRedPacketSucc)
        self.ipyActFeastRedPacketSuccLen = len(self.ipyActFeastRedPacketSuccCache)
        self.ipyNPCShowCache = self.__LoadFileData("NPCShow", IPY_NPCShow)
        self.ipyNPCShowLen = len(self.ipyNPCShowCache)
        self.ipySealDemonCache = self.__LoadFileData("SealDemon", IPY_SealDemon)
@@ -4605,6 +4623,8 @@
    def GetFamilyActivityByIndex(self, index): return self.ipyFamilyActivityCache[index]
    def GetFamilyRedPackCount(self): return self.ipyFamilyRedPackLen
    def GetFamilyRedPackByIndex(self, index): return self.ipyFamilyRedPackCache[index]
    def GetActFeastRedPacketSuccCount(self): return self.ipyActFeastRedPacketSuccLen
    def GetActFeastRedPacketSuccByIndex(self, index): return self.ipyActFeastRedPacketSuccCache[index]
    def GetNPCShowCount(self): return self.ipyNPCShowLen
    def GetNPCShowByIndex(self, index): return self.ipyNPCShowCache[index]
    def GetSealDemonCount(self): return self.ipySealDemonLen
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -233,8 +233,10 @@
OperationActionName_WeekParty = "ActWeekParty" # 周狂欢活动
OperationActionName_LoginAward = "ActLoginAward" # 登录奖励活动
OperationActionName_FeastWeekParty = "ActFeastWeekParty" # 节日巡礼狂欢活动
OperationActionName_FeastRedPacket = "ActFeastRedPacket" # 节日红包活动
OperationActionName_FeastCollectWords = "ActFeastCollectWords" # 节日集字活动
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty]
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket, OperationActionName_FeastCollectWords]
#所有的运营活动列表,含节日活动
OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                           OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -1709,10 +1711,19 @@
SuccType_Collect, #采集X物品X次131
SuccType_InlayGatherSoul, #镶嵌X枚X品质聚魂(不包含核心)132
SuccType_GatherSoulLvUp, #累计聚魂总等级XX(不包含核心)133
) = range(1, 134)
SuccType_FeastRedPack_TalkWorld, #节日红包 - 世界频道发言 x次 134
SuccType_FeastRedPack_Pray, # 节日红包 - 祈祷x次 135
SuccType_FeastRedPack_KillSpecificNPC, # 节日红包 - 击杀特定NPC x次 136
SuccType_FeastRedPack_KillBoss, # 节日红包 - 指定类型boss x次 137
SuccType_FeastRedPack_EnterMap, # 节日红包 - 进入指定地图 x次  138
SuccType_FeastRedPack_TaskCRun, # 节日红包 - 完成x次日常环任务成就 139
SuccType_FeastRedPack_Dice, # 节日红包 - 天机摇骰子x次  140
SuccType_FeastRedPack_CrossPK, # 节日红包 - 跨服PK x次  141
SuccType_FeastRedPack_FBSweep, # 节日红包 - 副本扫荡 x次  142
) = range(1, 143)
# 节日红包成就类型
FeastRedPackSuccessTypeList = range(SuccType_FeastRedPack_TalkWorld, SuccType_FeastRedPack_FBSweep + 1)
# 连续天规则的成就类型
ContinueSuccessTypeList = []
@@ -1852,3 +1863,12 @@
Def_Boss_Func_Dogz, # 神兽功能BOSS
) = range(3)
# 红包类型定义
RedPackType_GoldPacket = 0 # 主动发钻石红包
RedPackType_OpenServer = 5 # 开服红包
RedPackType_FeastSysBig = 31 # 节日系统大红包
RedPackType_FeastSysSmall = 32 # 节日系统小红包
RedPackType_FeastSucc = 33 # 节日成就红包
# 节日红包类型
FeastRedPackType = [RedPackType_FeastSysBig, RedPackType_FeastSysSmall, RedPackType_FeastSucc]