From d50bce0513256c13a3b1887034a4b2866fa9b7ef Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 25 一月 2019 21:29:31 +0800
Subject: [PATCH] 6087 【后端】【1.5.200】春节红包雨活动(活动表、封包)
---
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py | 51 ++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 145 ++++++++++++++++++++++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 145 ++++++++++++++++++++++++
PySysDB/PySysDBG.h | 17 ++
4 files changed, 356 insertions(+), 2 deletions(-)
diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
index 371c0b5..dbf0d7f 100644
--- a/PySysDB/PySysDBG.h
+++ b/PySysDB/PySysDBG.h
@@ -187,6 +187,23 @@
BYTE MoneyType; //金钱类型
BYTE PacketCnt; //红包个数
BYTE LeaderOwn; //是否归属盟主
+ char PacketOpenTime; //发放红包时间yyyy-MM-dd hh:mm
+ BYTE ValidMinutes; //红包有效时长(分)
+};
+
+//节日红包时间表
+
+struct tagActFeastRedPacket
+{
+ DWORD _CfgID; //配置ID
+ char ActMark; //活动组标记
+ list PlatformList; //活动平台列表["平台A", "平台A", ...],配[]代表所有
+ list ServerIDList; //服务器ID列表
+ char StartDate; //开启日期
+ char EndDate; //结束日期
+ BYTE ResetType; //重置类型,0-0点重置;1-5点重置
+ list RedPacketIDList; //每日对应红包ID列表[[第一天红包ID列表], ...]
+ WORD LVLimit; //限制等级
};
//等级开启功能 #tagFuncOpenLV
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 1c222e0..f1c93ec 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4715,6 +4715,151 @@
#------------------------------------------------------
+# AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo
+
+class tagGCFeastRedPacketDay(Structure):
+ RedPacketCount = 0 #(BYTE RedPacketCount)
+ RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包ID列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.RedPacketCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RedPacketCount):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.RedPacketIDList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.RedPacketCount = 0
+ self.RedPacketIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 1
+ length += 2 * self.RedPacketCount
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.RedPacketCount)
+ for i in range(self.RedPacketCount):
+ data = CommFunc.WriteWORD(data, self.RedPacketIDList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ RedPacketCount:%d,
+ RedPacketIDList:%s
+ '''\
+ %(
+ self.RedPacketCount,
+ "..."
+ )
+ return DumpString
+
+
+class tagGCFeastRedPacketInfo(Structure):
+ Head = tagHead()
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
+ RedPacketDays = 0 #(BYTE RedPacketDays)
+ RedPacketDayList = list() #(vector<tagGCFeastRedPacketDay> RedPacketDayList)// 每日系统红包信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAC
+ self.Head.SubCmd = 0x11
+ 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.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.RedPacketDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RedPacketDays):
+ temRedPacketDayList = tagGCFeastRedPacketDay()
+ _pos = temRedPacketDayList.ReadData(_lpData, _pos)
+ self.RedPacketDayList.append(temRedPacketDayList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAC
+ self.Head.SubCmd = 0x11
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.LimitLV = 0
+ self.ResetType = 0
+ self.RedPacketDays = 0
+ self.RedPacketDayList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ length += 1
+ for i in range(self.RedPacketDays):
+ length += self.RedPacketDayList[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.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteBYTE(data, self.RedPacketDays)
+ for i in range(self.RedPacketDays):
+ data = CommFunc.WriteString(data, self.RedPacketDayList[i].GetLength(), self.RedPacketDayList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ StartDate:%s,
+ EndtDate:%s,
+ LimitLV:%d,
+ ResetType:%d,
+ RedPacketDays:%d,
+ RedPacketDayList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.StartDate,
+ self.EndtDate,
+ self.LimitLV,
+ self.ResetType,
+ self.RedPacketDays,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo
+
+
+#------------------------------------------------------
# AC 02 通知仙魔之争信息 #tagGCXMZZInfo
class tagGCXMZZInfo(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index b8ec879..e4000d5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -173,6 +173,20 @@
("BYTE", "MoneyType", 0),
("BYTE", "PacketCnt", 0),
("BYTE", "LeaderOwn", 0),
+ ("char", "PacketOpenTime", 0),
+ ("BYTE", "ValidMinutes", 0),
+ ),
+
+ "ActFeastRedPacket":(
+ ("DWORD", "CfgID", 1),
+ ("char", "ActMark", 0),
+ ("list", "PlatformList", 0),
+ ("list", "ServerIDList", 0),
+ ("char", "StartDate", 0),
+ ("char", "EndDate", 0),
+ ("BYTE", "ResetType", 0),
+ ("list", "RedPacketIDList", 0),
+ ("WORD", "LVLimit", 0),
),
"FuncOpenLV":(
@@ -763,7 +777,9 @@
self.MoneyNum = 0
self.MoneyType = 0
self.PacketCnt = 0
- self.LeaderOwn = 0
+ self.LeaderOwn = 0
+ self.PacketOpenTime = ""
+ self.ValidMinutes = 0
return
def GetID(self): return self.ID # ID
@@ -771,7 +787,34 @@
def GetMoneyNum(self): return self.MoneyNum # 红包额度
def GetMoneyType(self): return self.MoneyType # 金钱类型
def GetPacketCnt(self): return self.PacketCnt # 红包个数
- def GetLeaderOwn(self): return self.LeaderOwn # 是否归属盟主
+ def GetLeaderOwn(self): return self.LeaderOwn # 是否归属盟主
+ def GetPacketOpenTime(self): return self.PacketOpenTime # 发放红包时间yyyy-MM-dd hh:mm
+ def GetValidMinutes(self): return self.ValidMinutes # 红包有效时长(分)
+
+# 节日红包时间表
+class IPY_ActFeastRedPacket():
+
+ def __init__(self):
+ self.CfgID = 0
+ self.ActMark = ""
+ self.PlatformList = []
+ self.ServerIDList = []
+ self.StartDate = ""
+ self.EndDate = ""
+ self.ResetType = 0
+ self.RedPacketIDList = []
+ self.LVLimit = 0
+ return
+
+ def GetCfgID(self): return self.CfgID # 配置ID
+ def GetActMark(self): return self.ActMark # 活动组标记
+ def GetPlatformList(self): return self.PlatformList # 活动平台列表["平台A", "平台A", ...],配[]代表所有
+ def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
+ def GetStartDate(self): return self.StartDate # 开启日期
+ def GetEndDate(self): return self.EndDate # 结束日期
+ 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_FuncOpenLV():
@@ -1442,6 +1485,8 @@
self.ipyQuestionBankLen = len(self.ipyQuestionBankCache)
self.ipyFamilyRedPackCache = self.__LoadFileData("FamilyRedPack", IPY_FamilyRedPack)
self.ipyFamilyRedPackLen = len(self.ipyFamilyRedPackCache)
+ self.ipyActFeastRedPacketCache = self.__LoadFileData("ActFeastRedPacket", IPY_ActFeastRedPacket)
+ self.ipyActFeastRedPacketLen = len(self.ipyActFeastRedPacketCache)
self.ipyFuncOpenLVCache = self.__LoadFileData("FuncOpenLV", IPY_FuncOpenLV)
self.ipyFuncOpenLVLen = len(self.ipyFuncOpenLVCache)
self.ipyChinNPCCache = self.__LoadFileData("ChinNPC", IPY_ChinNPC)
@@ -1690,6 +1735,8 @@
def GetQuestionBankByIndex(self, index): return self.ipyQuestionBankCache[index]
def GetFamilyRedPackCount(self): return self.ipyFamilyRedPackLen
def GetFamilyRedPackByIndex(self, index): return self.ipyFamilyRedPackCache[index]
+ def GetActFeastRedPacketCount(self): return self.ipyActFeastRedPacketLen
+ def GetActFeastRedPacketByIndex(self, index): return self.ipyActFeastRedPacketCache[index]
def GetFuncOpenLVCount(self): return self.ipyFuncOpenLVLen
def GetFuncOpenLVByIndex(self, index): return self.ipyFuncOpenLVCache[index]
def GetChinNPCCount(self): return self.ipyChinNPCLen
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 1c222e0..f1c93ec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4715,6 +4715,151 @@
#------------------------------------------------------
+# AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo
+
+class tagGCFeastRedPacketDay(Structure):
+ RedPacketCount = 0 #(BYTE RedPacketCount)
+ RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包ID列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.RedPacketCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RedPacketCount):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.RedPacketIDList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.RedPacketCount = 0
+ self.RedPacketIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 1
+ length += 2 * self.RedPacketCount
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.RedPacketCount)
+ for i in range(self.RedPacketCount):
+ data = CommFunc.WriteWORD(data, self.RedPacketIDList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ RedPacketCount:%d,
+ RedPacketIDList:%s
+ '''\
+ %(
+ self.RedPacketCount,
+ "..."
+ )
+ return DumpString
+
+
+class tagGCFeastRedPacketInfo(Structure):
+ Head = tagHead()
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
+ RedPacketDays = 0 #(BYTE RedPacketDays)
+ RedPacketDayList = list() #(vector<tagGCFeastRedPacketDay> RedPacketDayList)// 每日系统红包信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAC
+ self.Head.SubCmd = 0x11
+ 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.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.RedPacketDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RedPacketDays):
+ temRedPacketDayList = tagGCFeastRedPacketDay()
+ _pos = temRedPacketDayList.ReadData(_lpData, _pos)
+ self.RedPacketDayList.append(temRedPacketDayList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAC
+ self.Head.SubCmd = 0x11
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.LimitLV = 0
+ self.ResetType = 0
+ self.RedPacketDays = 0
+ self.RedPacketDayList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ length += 1
+ for i in range(self.RedPacketDays):
+ length += self.RedPacketDayList[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.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteBYTE(data, self.RedPacketDays)
+ for i in range(self.RedPacketDays):
+ data = CommFunc.WriteString(data, self.RedPacketDayList[i].GetLength(), self.RedPacketDayList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ StartDate:%s,
+ EndtDate:%s,
+ LimitLV:%d,
+ ResetType:%d,
+ RedPacketDays:%d,
+ RedPacketDayList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.StartDate,
+ self.EndtDate,
+ self.LimitLV,
+ self.ResetType,
+ self.RedPacketDays,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo
+
+
+#------------------------------------------------------
# AC 02 通知仙魔之争信息 #tagGCXMZZInfo
class tagGCXMZZInfo(Structure):
--
Gitblit v1.8.0