From ff48a24b8da42998da61b4ff4000e758d8d1b041 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 27 一月 2021 11:18:52 +0800
Subject: [PATCH] 8710 【开发】【主干】【BT2】根据世界等级配置奖励(成长必买改为通知对应不同世界等级的物品信息);

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py               |    9 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py           |  123 ++++++++++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py         |   56 +++++----
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                    |    9 
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                                |  123 ++++++++++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py |   33 +++-
 6 files changed, 281 insertions(+), 72 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 474567b..a1fbe33 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24481,9 +24481,109 @@
 #------------------------------------------------------
 # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo
 
+class  tagMCActGrowupBuyCTGItem(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(tagMCActGrowupBuyCTGItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// AA 31 成长必买活动信息 //tagMCActGrowupBuyInfo:
+                                ItemID:%d,
+                                ItemCount:%d,
+                                IsBind:%d
+                                '''\
+                                %(
+                                self.ItemID,
+                                self.ItemCount,
+                                self.IsBind
+                                )
+        return DumpString
+
+
+class  tagMCActGrowupBuyCTGInfo(Structure):
+    CTGID = 0    #(BYTE CTGID)// 充值表ID
+    GainItemCount = 0    #(BYTE GainItemCount)// 获得物品数
+    GainItemList = list()    #(vector<tagMCActGrowupBuyCTGItem> GainItemList)// 获得物品列表,替换充值表中的 GainItemList 字段信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.CTGID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.GainItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.GainItemCount):
+            temGainItemList = tagMCActGrowupBuyCTGItem()
+            _pos = temGainItemList.ReadData(_lpData, _pos)
+            self.GainItemList.append(temGainItemList)
+        return _pos
+
+    def Clear(self):
+        self.CTGID = 0
+        self.GainItemCount = 0
+        self.GainItemList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        for i in range(self.GainItemCount):
+            length += self.GainItemList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.CTGID)
+        data = CommFunc.WriteBYTE(data, self.GainItemCount)
+        for i in range(self.GainItemCount):
+            data = CommFunc.WriteString(data, self.GainItemList[i].GetLength(), self.GainItemList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                CTGID:%d,
+                                GainItemCount:%d,
+                                GainItemList:%s
+                                '''\
+                                %(
+                                self.CTGID,
+                                self.GainItemCount,
+                                "..."
+                                )
+        return DumpString
+
+
 class  tagMCActGrowupBuyGroup(Structure):
     BuyCount = 0    #(BYTE BuyCount)// 循环购买礼包数
-    BuyCTGIDList = list()    #(vector<DWORD> BuyCTGIDList)// 循环购买礼包充值ID列表
+    BuyCTGIDList = list()    #(vector<tagMCActGrowupBuyCTGInfo> BuyCTGIDList)// 循环购买礼包充值ID信息列表
     PlayerBuyIndex = 0    #(BYTE PlayerBuyIndex)// 玩家当前可购买的礼包充值ID在列表中索引
     data = None
 
@@ -24495,8 +24595,9 @@
         self.Clear()
         self.BuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.BuyCount):
-            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
-            self.BuyCTGIDList.append(value)
+            temBuyCTGIDList = tagMCActGrowupBuyCTGInfo()
+            _pos = temBuyCTGIDList.ReadData(_lpData, _pos)
+            self.BuyCTGIDList.append(temBuyCTGIDList)
         self.PlayerBuyIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         return _pos
 
@@ -24509,7 +24610,8 @@
     def GetLength(self):
         length = 0
         length += 1
-        length += 4 * self.BuyCount
+        for i in range(self.BuyCount):
+            length += self.BuyCTGIDList[i].GetLength()
         length += 1
 
         return length
@@ -24518,7 +24620,7 @@
         data = ''
         data = CommFunc.WriteBYTE(data, self.BuyCount)
         for i in range(self.BuyCount):
-            data = CommFunc.WriteDWORD(data, self.BuyCTGIDList[i])
+            data = CommFunc.WriteString(data, self.BuyCTGIDList[i].GetLength(), self.BuyCTGIDList[i].GetBuffer())
         data = CommFunc.WriteBYTE(data, self.PlayerBuyIndex)
         return data
 
@@ -24542,7 +24644,6 @@
     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
     GroupCount = 0    #(BYTE GroupCount)// 循环购买礼包组数
     GroupList = list()    #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
-    ActWorldLV = 0    #(WORD ActWorldLV)// 活动世界等级
     data = None
 
     def __init__(self):
@@ -24561,7 +24662,6 @@
             temGroupList = tagMCActGrowupBuyGroup()
             _pos = temGroupList.ReadData(_lpData, _pos)
             self.GroupList.append(temGroupList)
-        self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -24573,7 +24673,6 @@
         self.EndtDate = ""
         self.GroupCount = 0
         self.GroupList = list()
-        self.ActWorldLV = 0
         return
 
     def GetLength(self):
@@ -24584,7 +24683,6 @@
         length += 1
         for i in range(self.GroupCount):
             length += self.GroupList[i].GetLength()
-        length += 2
 
         return length
 
@@ -24596,7 +24694,6 @@
         data = CommFunc.WriteBYTE(data, self.GroupCount)
         for i in range(self.GroupCount):
             data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
-        data = CommFunc.WriteWORD(data, self.ActWorldLV)
         return data
 
     def OutputString(self):
@@ -24605,16 +24702,14 @@
                                 StartDate:%s,
                                 EndtDate:%s,
                                 GroupCount:%d,
-                                GroupList:%s,
-                                ActWorldLV:%d
+                                GroupList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
                                 self.StartDate,
                                 self.EndtDate,
                                 self.GroupCount,
-                                "...",
-                                self.ActWorldLV
+                                "..."
                                 )
         return DumpString
 
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 7b0f96d..60cc4ec 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -222,9 +222,11 @@
 OperationActionName_CollectWords2 = "ActCollectWords2" # 集字活动2
 OperationActionName_LuckyTreasure = "ActLuckyTreasure" # 幸运鉴宝活动
 OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
+OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
 OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
 #节日活动类型列表 - 该类型无视开服天,日期到了就开启
-FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket]
+FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
+                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy]
 #所有的运营活动列表,含节日活动
 OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                            OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -234,9 +236,8 @@
                            OperationActionName_WeekParty, OperationActionName_LoginAward, 
                            OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
                            OperationActionName_DailyGiftbag, OperationActionName_RechargePrize, 
-                           OperationActionName_CollectWords, OperationActionName_CollectWords2,
-                           OperationActionName_GrowupBuy
-                           ] + FeastOperationActionNameList
+                           OperationActionName_CollectWords, OperationActionName_CollectWords2] \
+                           + FeastOperationActionNameList
 #需要记录开启活动时的世界等级的运营活动
 NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
                                    OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 474567b..a1fbe33 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24481,9 +24481,109 @@
 #------------------------------------------------------
 # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo
 
+class  tagMCActGrowupBuyCTGItem(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(tagMCActGrowupBuyCTGItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// AA 31 成长必买活动信息 //tagMCActGrowupBuyInfo:
+                                ItemID:%d,
+                                ItemCount:%d,
+                                IsBind:%d
+                                '''\
+                                %(
+                                self.ItemID,
+                                self.ItemCount,
+                                self.IsBind
+                                )
+        return DumpString
+
+
+class  tagMCActGrowupBuyCTGInfo(Structure):
+    CTGID = 0    #(BYTE CTGID)// 充值表ID
+    GainItemCount = 0    #(BYTE GainItemCount)// 获得物品数
+    GainItemList = list()    #(vector<tagMCActGrowupBuyCTGItem> GainItemList)// 获得物品列表,替换充值表中的 GainItemList 字段信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.CTGID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.GainItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.GainItemCount):
+            temGainItemList = tagMCActGrowupBuyCTGItem()
+            _pos = temGainItemList.ReadData(_lpData, _pos)
+            self.GainItemList.append(temGainItemList)
+        return _pos
+
+    def Clear(self):
+        self.CTGID = 0
+        self.GainItemCount = 0
+        self.GainItemList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        for i in range(self.GainItemCount):
+            length += self.GainItemList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.CTGID)
+        data = CommFunc.WriteBYTE(data, self.GainItemCount)
+        for i in range(self.GainItemCount):
+            data = CommFunc.WriteString(data, self.GainItemList[i].GetLength(), self.GainItemList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                CTGID:%d,
+                                GainItemCount:%d,
+                                GainItemList:%s
+                                '''\
+                                %(
+                                self.CTGID,
+                                self.GainItemCount,
+                                "..."
+                                )
+        return DumpString
+
+
 class  tagMCActGrowupBuyGroup(Structure):
     BuyCount = 0    #(BYTE BuyCount)// 循环购买礼包数
-    BuyCTGIDList = list()    #(vector<DWORD> BuyCTGIDList)// 循环购买礼包充值ID列表
+    BuyCTGIDList = list()    #(vector<tagMCActGrowupBuyCTGInfo> BuyCTGIDList)// 循环购买礼包充值ID信息列表
     PlayerBuyIndex = 0    #(BYTE PlayerBuyIndex)// 玩家当前可购买的礼包充值ID在列表中索引
     data = None
 
@@ -24495,8 +24595,9 @@
         self.Clear()
         self.BuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.BuyCount):
-            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
-            self.BuyCTGIDList.append(value)
+            temBuyCTGIDList = tagMCActGrowupBuyCTGInfo()
+            _pos = temBuyCTGIDList.ReadData(_lpData, _pos)
+            self.BuyCTGIDList.append(temBuyCTGIDList)
         self.PlayerBuyIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         return _pos
 
@@ -24509,7 +24610,8 @@
     def GetLength(self):
         length = 0
         length += 1
-        length += 4 * self.BuyCount
+        for i in range(self.BuyCount):
+            length += self.BuyCTGIDList[i].GetLength()
         length += 1
 
         return length
@@ -24518,7 +24620,7 @@
         data = ''
         data = CommFunc.WriteBYTE(data, self.BuyCount)
         for i in range(self.BuyCount):
-            data = CommFunc.WriteDWORD(data, self.BuyCTGIDList[i])
+            data = CommFunc.WriteString(data, self.BuyCTGIDList[i].GetLength(), self.BuyCTGIDList[i].GetBuffer())
         data = CommFunc.WriteBYTE(data, self.PlayerBuyIndex)
         return data
 
@@ -24542,7 +24644,6 @@
     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
     GroupCount = 0    #(BYTE GroupCount)// 循环购买礼包组数
     GroupList = list()    #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
-    ActWorldLV = 0    #(WORD ActWorldLV)// 活动世界等级
     data = None
 
     def __init__(self):
@@ -24561,7 +24662,6 @@
             temGroupList = tagMCActGrowupBuyGroup()
             _pos = temGroupList.ReadData(_lpData, _pos)
             self.GroupList.append(temGroupList)
-        self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -24573,7 +24673,6 @@
         self.EndtDate = ""
         self.GroupCount = 0
         self.GroupList = list()
-        self.ActWorldLV = 0
         return
 
     def GetLength(self):
@@ -24584,7 +24683,6 @@
         length += 1
         for i in range(self.GroupCount):
             length += self.GroupList[i].GetLength()
-        length += 2
 
         return length
 
@@ -24596,7 +24694,6 @@
         data = CommFunc.WriteBYTE(data, self.GroupCount)
         for i in range(self.GroupCount):
             data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
-        data = CommFunc.WriteWORD(data, self.ActWorldLV)
         return data
 
     def OutputString(self):
@@ -24605,16 +24702,14 @@
                                 StartDate:%s,
                                 EndtDate:%s,
                                 GroupCount:%d,
-                                GroupList:%s,
-                                ActWorldLV:%d
+                                GroupList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
                                 self.StartDate,
                                 self.EndtDate,
                                 self.GroupCount,
-                                "...",
-                                self.ActWorldLV
+                                "..."
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
index 0b10484..4f88a54 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
@@ -88,18 +88,17 @@
         
         buyIndex = GameWorld.GetDataByDigitPlace(buyState, i)
         updBuyIndex = 0
-        # 最后一个礼包了,不管有没有买都重置
-        if buyIndex >= len(ctgIDList) - 1:
+        yestodayCtgID = ctgIDList[buyIndex]
+        if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % yestodayCtgID):
             updBuyIndex = 0
-            GameWorld.DebugLog("    最后一个礼包,重置!")
+            GameWorld.DebugLog("    昨日礼包没买,重置!yestodayCtgID=%s" % yestodayCtgID)
         else:
-            yestodayCtgID = ctgIDList[buyIndex]
-            if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % yestodayCtgID):
-                updBuyIndex = 0
-                GameWorld.DebugLog("    前置礼包没买,重置!yestodayCtgID=%s" % yestodayCtgID)
+            if buyIndex >= len(ctgIDList) - 1:
+                updBuyIndex = len(ctgIDList) - 1
+                GameWorld.DebugLog("    昨日礼包已买,最后一档礼包保持不变! yestodayCtgID=%s,updBuyIndex=%s" % (yestodayCtgID, updBuyIndex))
             else:
                 updBuyIndex = buyIndex + 1
-                GameWorld.DebugLog("    前置礼包已买,更新后续礼包索引! yestodayCtgID=%s,updBuyIndex=%s" % (yestodayCtgID, updBuyIndex))
+                GameWorld.DebugLog("    昨日礼包已买,更新后续礼包索引! yestodayCtgID=%s,updBuyIndex=%s" % (yestodayCtgID, updBuyIndex))
                 
         buyState = GameWorld.ChangeDataByDigitPlace(buyState, i, updBuyIndex)
         GameWorld.DebugLog("    updState=%s" % buyState)
@@ -155,6 +154,7 @@
     if not ctgIDGroupList:
         return
     
+    import PlayerCoin
     buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
     
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
@@ -164,11 +164,24 @@
     actPack.GroupList = []
     for i, ctgIDList in enumerate(ctgIDGroupList):
         groupInfo = ChPyNetSendPack.tagMCActGrowupBuyGroup()
-        groupInfo.BuyCTGIDList = ctgIDList
+        groupInfo.BuyCTGIDList = []
+        for ctgID in ctgIDList:
+            ctgIpyData = IpyGameDataPY.GetIpyGameData("CTG", ctgID)
+            ctgGiveItemList = PlayerCoin.GetCTGGiveItemList(ctgIpyData)
+            ctgInfo = ChPyNetSendPack.tagMCActGrowupBuyCTGInfo()
+            ctgInfo.CTGID = ctgID
+            ctgInfo.GainItemList = []
+            for itemID, itemCount, isAuctionItem in ctgGiveItemList:
+                ctgItem = ChPyNetSendPack.tagMCActGrowupBuyCTGItem()
+                ctgItem.ItemID = itemID
+                ctgItem.ItemCount = itemCount
+                ctgItem.IsBind = isAuctionItem
+                ctgInfo.GainItemList.append(ctgItem)
+            ctgInfo.GainItemCount = len(ctgInfo.GainItemList)
+            groupInfo.BuyCTGIDList.append(ctgInfo)
         groupInfo.BuyCount = len(groupInfo.BuyCTGIDList)
         groupInfo.PlayerBuyIndex = GameWorld.GetDataByDigitPlace(buyState, i)
         actPack.GroupList.append(groupInfo)
     actPack.GroupCount = len(actPack.GroupList)
-    actPack.ActWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
     NetPackCommon.SendFakePack(curPlayer, actPack)
     return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 1104ce6..8680623 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -333,32 +333,7 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, todayBuyCount + 1)
     addDRDict.update({"todayBuyCountUpd":(todayBuyCount + 1)})
     
-    gainItemList = ipyData.GetGainItemList()
-    actWorldLVGainItemInfo = ipyData.GetActWorldLVGainItemInfo()
-    giveItemList = []
-    # 活动世界等级对应物品信息,如果有对应活动支持 且 该配置有配,则默认走该配置,否则使用常规的默认物品配置
-    payTypeActNameDict = {PayType_GrowupBuy:ShareDefine.OperationActionName_GrowupBuy,
-                          
-                          # ... 有新增的活动需要支持,则在此新增配置上即可,后面取物品的逻辑都是一样的
-                          }
-    if actWorldLVGainItemInfo and ipyData.GetPayType() in payTypeActNameDict:
-        actName = payTypeActNameDict[ipyData.GetPayType()]
-        actInfo = PyGameData.g_operationActionDict.get(actName, {})
-        if not actInfo or not actInfo.get(ShareDefine.ActKey_State):
-            DataRecordPack.DR_CTGError(curPlayer, "Can not find act info actName=%s" % actName, addDRDict)
-            return
-        actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
-        actWorldLVList = [int(strWorldLV) for strWorldLV in actWorldLVGainItemInfo.keys()]
-        actWorldLVList.sort() # 使用 int 的值排,否则可能引起排序错误
-        for worldLV in actWorldLVList:
-            if actWorldLV <= worldLV:
-                giveItemList = actWorldLVGainItemInfo[str(worldLV)]
-                break
-        if not giveItemList:
-            giveItemList = actWorldLVGainItemInfo[str(actWorldLVList[-1])] # 没有匹配到的话默认取最后一个等级配置
-    else:
-        giveItemList = gainItemList
-        
+    giveItemList = GetCTGGiveItemList(ipyData)
     addGold = ipyData.GetGainGold() # 获得仙玉数
     gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送仙玉数,首次充值赠送仙玉时,此仙玉不给
     firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉
@@ -371,6 +346,35 @@
     Sync_CoinToGoldCountInfo(curPlayer, [recordID])
     return addGold, prizeGold, giveItemList, ipyData
 
+def GetCTGGiveItemList(ipyData):
+    ## 获取充值ID对应给物品列表
+    if not ipyData:
+        return []
+    
+    gainItemList = ipyData.GetGainItemList()
+    actWorldLVGainItemInfo = ipyData.GetActWorldLVGainItemInfo()
+    giveItemList = []
+    # 活动世界等级对应物品信息,如果有对应活动支持 且 该配置有配,则默认走该配置,否则使用常规的默认物品配置
+    payTypeActNameDict = {PayType_GrowupBuy:ShareDefine.OperationActionName_GrowupBuy,
+                          
+                          # ... 有新增的活动需要支持,则在此新增配置上即可,后面取物品的逻辑都是一样的
+                          }
+    if actWorldLVGainItemInfo and ipyData.GetPayType() in payTypeActNameDict:
+        actName = payTypeActNameDict[ipyData.GetPayType()]
+        actInfo = PyGameData.g_operationActionDict.get(actName, {}) # 注:相关状态在前置逻辑已经判断过,这里不再判断
+        actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+        actWorldLVList = [int(strWorldLV) for strWorldLV in actWorldLVGainItemInfo.keys()]
+        actWorldLVList.sort() # 使用 int 的值排,否则可能引起排序错误
+        for worldLV in actWorldLVList:
+            if actWorldLV <= worldLV:
+                giveItemList = actWorldLVGainItemInfo[str(worldLV)]
+                break
+        if not giveItemList:
+            giveItemList = actWorldLVGainItemInfo[str(actWorldLVList[-1])] # 没有匹配到的话默认取最后一个等级配置
+    else:
+        giveItemList = gainItemList
+    return giveItemList
+
 def DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData=None, coinExp=0):
     notifyMark = ctgIpyData.GetNotifyMark() if ctgIpyData else ""
     goldBefore = curPlayer.GetGold()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 7b0f96d..60cc4ec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -222,9 +222,11 @@
 OperationActionName_CollectWords2 = "ActCollectWords2" # 集字活动2
 OperationActionName_LuckyTreasure = "ActLuckyTreasure" # 幸运鉴宝活动
 OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
+OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
 OperationActionName_GrowupBuy = "ActGrowupBuy" # 成长必买活动
 #节日活动类型列表 - 该类型无视开服天,日期到了就开启
-FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket]
+FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
+                                OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy]
 #所有的运营活动列表,含节日活动
 OperationActionNameList = [OperationActionName_ExpRate, OperationActionName_CostRebate, 
                            OperationActionName_BossReborn,OperationActionName_SpringSale, 
@@ -234,9 +236,8 @@
                            OperationActionName_WeekParty, OperationActionName_LoginAward, 
                            OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
                            OperationActionName_DailyGiftbag, OperationActionName_RechargePrize, 
-                           OperationActionName_CollectWords, OperationActionName_CollectWords2,
-                           OperationActionName_GrowupBuy
-                           ] + FeastOperationActionNameList
+                           OperationActionName_CollectWords, OperationActionName_CollectWords2] \
+                           + FeastOperationActionNameList
 #需要记录开启活动时的世界等级的运营活动
 NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
                                    OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,

--
Gitblit v1.8.0