From ee0976feabc604ac91bdc86fc368941cf85d97b7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 12 二月 2019 11:39:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py    |   28 +++++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostRebate.py          |   32 ++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py                      |    4 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py                    |   18 +++---
 PySysDB/PySysDBPY.h                                                                                     |    8 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashGiftbag.py        |   23 +++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py          |   18 +++--
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                           |    4 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                         |    4 +
 10 files changed, 98 insertions(+), 43 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index bb29224..17088d8 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -824,7 +824,7 @@
 	WORD		AdvanceMinutes;	//前端提前X分钟展示活动
 	WORD		LVLimit;	//限制等级
 	BYTE		IsDayReset;	//是否每天重置
-	list		ShopTypeList;	//商店类型列表
+	dict		ShopTypeList;	//商店类型列表
 	char		MailKey;		//活动更新时发送邮件key
 	list		MailItemPrize;		//活动更新时发送邮件奖励物品
 };
@@ -1220,7 +1220,7 @@
 	WORD		AdvanceMinutes;	//前端提前X分钟展示活动
 	WORD		LVLimit;	//限制等级
 	BYTE		IsDayReset;	//是否每天重置
-	list		GiftbagTypeList;	//礼包类型列表
+	dict		GiftbagTypeList;	//礼包类型列表
 	char		MailKey;		//活动更新时发送邮件key
 	list		MailItemPrize;		//活动更新时发送邮件奖励物品
 };
@@ -1266,7 +1266,7 @@
 	DWORD		_TemplateID;	//模板ID
 	DWORD		NeedCostGold;	//需要消费仙玉数
 	BYTE		AwardIndex;		//返利奖励索引0~31,同个模板中不重复
-	list		AwardItemList;	//返利物品信息列表 [(物品ID,个数,是否绑定),...]
+	dict		AwardItemList;	//返利物品信息列表 {世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
 	char		NotifyKey;		//全服广播key,默认两个参数(玩家名, 档位额度)
 };
 
@@ -1290,7 +1290,7 @@
 	BYTE		_ID;	//活动条目ID
 	DWORD		TotalTimes;	//可完成的总次数,0表示不限次数
 	WORD		SingleTimes;	//单次领奖需要的次数
-	list		Reward;	//奖励物品ID1
+	dict		Reward;	//奖励物品ID1
 };
 
 //多倍修行点活动时间表
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 28ca7e5..7328533 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -250,7 +250,9 @@
 #需要记录开启活动时的世界等级的运营活动
 NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
                                    OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
-                                   OperationActionName_BossReborn, ]
+                                   OperationActionName_BossReborn, OperationActionName_TotalRecharge,
+                                   OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
+                                   OperationActionName_SpringSale,]
 
 #活动信息字典key定义
 ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 3fd16fa..ac64b2c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3685,12 +3685,14 @@
 Def_PDict_CostRebateTemplateID = "CostRebateTemplateID"  # 玩家身上的消费返利模板ID
 Def_PDict_CostRebateGold = "CostRebateGold"  # 消费返利总累计消费仙玉
 Def_PDict_CostRebateAwardRecord = "CostRebateAwardRecord"  # 消费返利领奖记录
+Def_PDict_CostRebateWorldLV = "CostRebateWorldLV" #消费返利活动开启时世界等级
 
 #累计充值活动
 Def_PDict_TotalRechargeID = "TotalRechargeID"  # 玩家身上的累计充值活动ID,唯一标识,取活动开始日期time值
 Def_PDict_TotalRechargeTemplateID = "TotalRechargeTemplateID"  # 玩家身上的累计充值模板ID
 Def_PDict_TotalRechargeGold = "TotalRechargeGold"  # 消费返利总累计充值X元
 Def_PDict_TotalRechargeAwardRecord = "TotalRechargeAwardRecord"  # 累计充值领奖记录
+Def_PDict_TotalRechargeWorldLV = "TotalRechargeWorldLV" #累计充值活动开启时世界等级
 
 #限时特惠活动
 Def_PDict_SpringSaleID = "SpringSaleID"  # 玩家身上的限时特惠活动ID,唯一标识,取活动开始日期time
@@ -3706,7 +3708,7 @@
 Def_PDict_BossRebornTemplateID = "BossRebornTemplateID"  # 玩家身上的BOSS复活模板ID
 Def_PDict_BRActionCurTimes = "BRActionCurTimes_%s" #当前完成次数 参数BOSS复活活动ID
 Def_PDict_BRActionGotTimes = "BRActionGotTimes_%s" #当前已领次数 参数BOSS复活活动ID
-Def_PDict_BRActionWorldLV = "BRActionWorldLV_%s" #BOSS复活活动开启时世界等级
+Def_PDict_BRActionWorldLV = "BRActionWorldLV" #BOSS复活活动开启时世界等级
 
 #仙界盛典
 Def_PDict_FairyCeremonyID = "FairyCeremonyID"  # 玩家身上的仙界盛典活动ID,唯一标识,取活动开始日期time值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 2e88be0..24e6d1c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -408,7 +408,7 @@
         if not state:
             GameWorld.DebugLog("限时特惠非活动中!state=%s" % (state), curPlayer.GetPlayerID())
             return
-        shopTypeList = PlayerSpringSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+        shopTypeList = PlayerSpringSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
         if not shopTypeList:
             return
         actShopType = shopTypeList[-1] if state > len(shopTypeList) else shopTypeList[state - 1]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 933fd8c..046d524 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -691,7 +691,7 @@
                         ("WORD", "AdvanceMinutes", 0),
                         ("WORD", "LVLimit", 0),
                         ("BYTE", "IsDayReset", 0),
-                        ("list", "ShopTypeList", 0),
+                        ("dict", "ShopTypeList", 0),
                         ("char", "MailKey", 0),
                         ("list", "MailItemPrize", 0),
                         ),
@@ -982,7 +982,7 @@
                         ("WORD", "AdvanceMinutes", 0),
                         ("WORD", "LVLimit", 0),
                         ("BYTE", "IsDayReset", 0),
-                        ("list", "GiftbagTypeList", 0),
+                        ("dict", "GiftbagTypeList", 0),
                         ("char", "MailKey", 0),
                         ("list", "MailItemPrize", 0),
                         ),
@@ -1016,7 +1016,7 @@
                         ("DWORD", "TemplateID", 1),
                         ("DWORD", "NeedCostGold", 0),
                         ("BYTE", "AwardIndex", 0),
-                        ("list", "AwardItemList", 0),
+                        ("dict", "AwardItemList", 0),
                         ("char", "NotifyKey", 0),
                         ),
 
@@ -1034,7 +1034,7 @@
                         ("BYTE", "ID", 1),
                         ("DWORD", "TotalTimes", 0),
                         ("WORD", "SingleTimes", 0),
-                        ("list", "Reward", 0),
+                        ("dict", "Reward", 0),
                         ),
 
                 "ActRealmPoint":(
@@ -2718,7 +2718,7 @@
         self.AdvanceMinutes = 0
         self.LVLimit = 0
         self.IsDayReset = 0
-        self.ShopTypeList = []
+        self.ShopTypeList = {}
         self.MailKey = ""
         self.MailItemPrize = []
         return
@@ -3334,7 +3334,7 @@
         self.AdvanceMinutes = 0
         self.LVLimit = 0
         self.IsDayReset = 0
-        self.GiftbagTypeList = []
+        self.GiftbagTypeList = {}
         self.MailKey = ""
         self.MailItemPrize = []
         return
@@ -3411,14 +3411,14 @@
         self.TemplateID = 0
         self.NeedCostGold = 0
         self.AwardIndex = 0
-        self.AwardItemList = []
+        self.AwardItemList = {}
         self.NotifyKey = ""
         return
         
     def GetTemplateID(self): return self.TemplateID # 模板ID
     def GetNeedCostGold(self): return self.NeedCostGold # 需要消费仙玉数
     def GetAwardIndex(self): return self.AwardIndex # 返利奖励索引0~31,同个模板中不重复
-    def GetAwardItemList(self): return self.AwardItemList # 返利物品信息列表 [(物品ID,个数,是否绑定),...]
+    def GetAwardItemList(self): return self.AwardItemList # 返利物品信息列表 {世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
     def GetNotifyKey(self): return self.NotifyKey # 全服广播key,默认两个参数(玩家名, 档位额度)
 
 # BOSS复活活动时间表
@@ -3448,7 +3448,7 @@
         self.ID = 0
         self.TotalTimes = 0
         self.SingleTimes = 0
-        self.Reward = []
+        self.Reward = {}
         return
         
     def GetTemplateID(self): return self.TemplateID # 模板ID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
index 2e31217..dedd5c9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
@@ -73,7 +73,8 @@
     if TotalRechargeID == playerTotalRechargeID:
         #GameWorld.DebugLog("累计充值活动ID不变,不处理!", curPlayer.GetPlayerID())
         return
-    
+    actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeWorldLV)
     templateID = GetTemplateID(actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID, 0), actTotalRechargeInfo.get(ShareDefine.ActKey_DayIndex, 0))
     playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeTemplateID)
     
@@ -81,10 +82,11 @@
                        % (TotalRechargeID, playerTotalRechargeID, state, templateID, playerTemplateID), playerID)
     
     # 未领取的奖励邮件发放
-    __SendTotalRechargeMail(curPlayer, playerTemplateID)
+    __SendTotalRechargeMail(curPlayer, playerTemplateID, playerWorldLV)
     
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID, TotalRechargeID)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID, templateID)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeWorldLV, actWorldLV)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold, 0)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord, 0)
     
@@ -92,7 +94,7 @@
     Sync_TotalRechargeInfo(curPlayer)
     return True
 
-def __SendTotalRechargeMail(curPlayer, playerTemplateID):
+def __SendTotalRechargeMail(curPlayer, playerTemplateID, playerWorldLV):
     # 未领取的奖励邮件发放
     
     if not playerTemplateID:
@@ -120,7 +122,7 @@
             continue
         awardRecord |= pow(2, awardIndex) 
         
-        awardItemList = ipyData.GetAwardItem().get(str(job), [])
+        awardItemList = __GetItemList(ipyData.GetAwardItem(), job, playerWorldLV)
         batchPlayerIDList.append([playerID])
         batchAddItemList.append(awardItemList)
         batchParamList.append([needGold])
@@ -130,6 +132,21 @@
         PlayerControl.SendMailBatch("TotalRechargeMail", batchPlayerIDList, batchAddItemList, batchParamList)
         
     return
+
+def __GetItemList(itemDict, job, worldLV):
+    #{世界等级范围:[(物品ID,个数,是否绑定), ...]},若物品ID要区分职业则配{世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
+    itemList = []
+    itemInfoList = GameWorld.GetDictValueByRangeKey(itemDict, worldLV, [])
+    for itemInfo in itemInfoList:
+        if type(itemInfo[0]) == dict:
+            itemID = itemInfo[0].get(job)
+            if not itemID:
+                GameWorld.ErrLog('累计充值奖励未配置该职业itemDict=%s,job=%s'%(itemDict, job))
+                continue
+        else:
+            itemID = itemInfo[0]
+        itemList.append([itemID, itemInfo[1], itemInfo[2]])
+    return itemList
 
 def AddTotalRechargeGold(curPlayer, addGold):
     if addGold <= 0:
@@ -194,7 +211,8 @@
         return
     
     needGold = awardIpyData.GetNeedGold()
-    awardItemList = awardIpyData.GetAwardItem().get(str(curPlayer.GetJob()), [])
+    actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    awardItemList = __GetItemList(ipyData.GetAwardItem(), curPlayer.GetJob(), actWorldLV)
     
     curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold)
     if curRechargeGold < needGold:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostRebate.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostRebate.py
index b5ee561..d0c111d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostRebate.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostRebate.py
@@ -73,7 +73,8 @@
     if costRebateID == playerCostRebateID:
         #GameWorld.DebugLog("消费返利活动ID不变,不处理!", curPlayer.GetPlayerID())
         return
-    
+    actWorldLV = actCostRebateInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateWorldLV)
     templateID = GetTemplateID(actCostRebateInfo.get(ShareDefine.ActKey_CfgID, 0), actCostRebateInfo.get(ShareDefine.ActKey_DayIndex, 0))
     playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateTemplateID)
     
@@ -81,10 +82,11 @@
                        % (costRebateID, playerCostRebateID, state, templateID, playerTemplateID), playerID)
     
     # 未领取的奖励邮件发放
-    __SendCostRebateMail(curPlayer, playerTemplateID)
+    __SendCostRebateMail(curPlayer, playerTemplateID, playerWorldLV)
     
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateID, costRebateID)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateTemplateID, templateID)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateWorldLV, actWorldLV)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateGold, 0)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateAwardRecord, 0)
     
@@ -92,7 +94,7 @@
     Sync_CostRebateInfo(curPlayer)
     return True
 
-def __SendCostRebateMail(curPlayer, playerTemplateID):
+def __SendCostRebateMail(curPlayer, playerTemplateID, playerWorldLV):
     # 未领取的奖励邮件发放
     
     if not playerTemplateID:
@@ -105,7 +107,7 @@
     ipyDataList = IpyGameDataPY.GetIpyGameDataList("CostRebateTemplate", playerTemplateID)
     if not ipyDataList:
         return
-    
+    job = curPlayer.GetJob()
     playerID = curPlayer.GetPlayerID()
     batchPlayerIDList, batchAddItemList, batchParamList = [], [], []
     awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateAwardRecord)
@@ -120,7 +122,7 @@
             continue
         awardRecord |= pow(2, awardIndex) 
         
-        awardItemList = ipyData.GetAwardItemList()
+        awardItemList = __GetItemList(ipyData.GetAwardItemList(), job, playerWorldLV)
         batchPlayerIDList.append([playerID])
         batchAddItemList.append(awardItemList)
         batchParamList.append([needCostGold])
@@ -130,6 +132,23 @@
         PlayerControl.SendMailBatch("ConsumptionRebateMail", batchPlayerIDList, batchAddItemList, batchParamList)
         
     return
+
+
+def __GetItemList(itemDict, job, worldLV):
+    #{世界等级范围:[(物品ID,个数,是否绑定), ...]},若物品ID要区分职业则配{世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
+    itemList = []
+    itemInfoList = GameWorld.GetDictValueByRangeKey(itemDict, worldLV, [])
+    for itemInfo in itemInfoList:
+        if type(itemInfo[0]) == dict:
+            itemID = itemInfo[0].get(job)
+            if not itemID:
+                GameWorld.ErrLog('累计充值奖励未配置该职业itemDict=%s,job=%s'%(itemDict, job))
+                continue
+        else:
+            itemID = itemInfo[0]
+        itemList.append([itemID, itemInfo[1], itemInfo[2]])
+    return itemList
+
 
 def AddCostRebateGold(curPlayer, costType, costGold, infoDict):
     if costGold <= 0:
@@ -196,7 +215,8 @@
         return
     
     needCostGold = awardIpyData.GetNeedCostGold()
-    awardItemList = awardIpyData.GetAwardItemList()
+    actWorldLV = actCostRebateInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    awardItemList = __GetItemList(awardIpyData.GetAwardItemList(), curPlayer.GetJob(), actWorldLV)
     
     curCostGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateGold)
     if curCostGold < needCostGold:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashGiftbag.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashGiftbag.py
index bca97e7..0545836 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashGiftbag.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashGiftbag.py
@@ -30,13 +30,13 @@
 import ChConfig
 
 
-def GetGiftbagTypeList(cfgID, dayIndex):
+def GetGiftbagTypeList(cfgID, dayIndex, woldLV):
     if cfgID == None or dayIndex == None:
         return []
     ipyData = IpyGameDataPY.GetIpyGameData("ActFlashGiftbag", cfgID)
     if not ipyData:
         return []
-    giftbagTypeList = ipyData.GetGiftbagTypeList()
+    giftbagTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetGiftbagTypeList(), woldLV, [])
     todayGiftbag = giftbagTypeList[-1] if dayIndex >= len(giftbagTypeList) else giftbagTypeList[dayIndex]
     return todayGiftbag
 
@@ -65,7 +65,7 @@
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
     
     playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashGiftbagID) # 玩家身上的活动ID
-    giftbagTypeList = [] if not cfgID else GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+    giftbagTypeList = [] if not cfgID else GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
     isReset = False
     if actID != playerActID:
         isReset = True
@@ -123,7 +123,7 @@
         DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag state is 0!", addDRDict)
         return
     
-    giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+    giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
     if not giftbagTypeList:
         DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag GiftbagTypeList is null!", addDRDict)
         return
@@ -143,7 +143,7 @@
         return
     
     giftbagID = giftbagIpyData.GetGiftbagID()
-    giftItemList = giftbagIpyData.GetGiftItemList()
+    giftItemList = __GetJobItemList(giftbagIpyData.GetGiftItemList(), curPlayer.GetJob()) 
     addDRDict.update({"giftbagID":giftbagID, "giftItemList":giftItemList})
     buyCountLimit = giftbagIpyData.GetBuyCountLimit()
     buyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashGiftbagBuyCount % giftbagID)
@@ -176,6 +176,15 @@
     SyncFlashGiftbagBuyCount(curPlayer, [giftbagID])
     PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GiftBag, actGiftbagType, False)
     return True
+
+def __GetJobItemList(itemList, job):
+    jobItemList = []
+    for itemID, itemCnt, isBind in itemList:
+        if type(itemID) == int:
+            jobItemList.append([itemID, itemCnt, isBind])
+        elif job in itemID:
+            jobItemList.append([itemID[job], itemCnt, isBind])
+    return jobItemList
 
 def SyncFlashGiftbagBuyCount(curPlayer, syncIDList=[], giftbagTypeList=[]):
     ## 通知限时礼包玩家活动信息
@@ -221,7 +230,7 @@
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
     if not cfgID:
         return
-    giftbagTypeList = GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+    giftbagTypeList = GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
     
     if not giftbagTypeList:
         return
@@ -274,7 +283,7 @@
             giftBag.RMB = 0 if not orderIpyData else int(orderIpyData.GetPayRMBNum())
             giftBag.RMBOriginal = giftIpyData.GetOriginalRMB()
             giftBag.ItemInfo = []
-            for itemID, itemCount, isBind in giftIpyData.GetGiftItemList():
+            for itemID, itemCount, isBind in __GetJobItemList(orderIpyData.GetGiftItemList(), curPlayer.GetJob()):
                 item = ChPyNetSendPack.tagMCFlashGiftbagItem()
                 item.ItemID = itemID
                 item.ItemCount = itemCount
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py
index 374e2d7..811a4f3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py
@@ -25,13 +25,13 @@
 import GameWorld
 import ChConfig
 
-def GetShopTypeList(cfgID, dayIndex):
+def GetShopTypeList(cfgID, dayIndex, woldLV):
     if cfgID == None or dayIndex == None:
         return []
     ipyData = IpyGameDataPY.GetIpyGameData("ActSpringSale", cfgID)
     if not ipyData:
         return []
-    shopTypeList = ipyData.GetShopTypeList()
+    shopTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetShopTypeList(), woldLV, [])
     todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
     return todayShopType
 
@@ -58,12 +58,12 @@
     actID = actInfo.get(ShareDefine.ActKey_ID, 0)
     state = actInfo.get(ShareDefine.ActKey_State, 0)
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
-    
+    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
     playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SpringSaleID) # 玩家身上的活动ID
     isReset = False
     if actID != playerActID:
         isReset = True
-        shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+        shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), woldLV)
         FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleID, actID)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleMailState, 0)
@@ -97,7 +97,7 @@
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
     if not cfgID:
         return
-    shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+    shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
     if not shopTypeList:
         return
     
@@ -110,7 +110,7 @@
     if len(startTimeList) != len(endTimeList):
         GameWorld.ErrLog("限时特惠开关时间时分配置错误!cfgID=%s" % cfgID)
         return
-    
+    job = curPlayer.GetJob()
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
     packInfo = ChPyNetSendPack.tagMCSpringSaleInfo()
     packInfo.StartDate = GameWorld.GetOperationActionDateStr(springSaleIpyData.GetStartDate(), openServerDay)
@@ -145,12 +145,14 @@
             giftBag.ItemInfo = []
             itemList = [[itemIpyData.GetItemID(), itemIpyData.GetItemCnt(), itemIpyData.GetIsBind()]]
             itemList += itemIpyData.GetItemListEx()
+            jobItemList = itemIpyData.GetJobItem()
             for itemID, itemCount, isBind in itemList:
                 item = ChPyNetSendPack.tagMCSpringSaleItem()
-                item.ItemID = itemID
+                jobItemID = FunctionNPCCommon.GetShopJobItem(job, itemID, jobItemList)
+                item.ItemID = jobItemID
                 item.ItemCount = itemCount
                 item.IsBind = isBind
-                item.IsMainItem = int(itemID == itemIpyData.GetMainItemID())
+                item.IsMainItem = int(itemID == FunctionNPCCommon.GetShopJobItem(job, itemIpyData.GetMainItemID(), jobItemList))
                 giftBag.ItemInfo.append(item)
             giftBag.GiftItemCount = len(giftBag.ItemInfo)
             shop.GiftbagInfo.append(giftBag)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 28ca7e5..7328533 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -250,7 +250,9 @@
 #需要记录开启活动时的世界等级的运营活动
 NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, 
                                    OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
-                                   OperationActionName_BossReborn, ]
+                                   OperationActionName_BossReborn, OperationActionName_TotalRecharge,
+                                   OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
+                                   OperationActionName_SpringSale,]
 
 #活动信息字典key定义
 ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值

--
Gitblit v1.8.0