From 4c6786e17ef724a0dfdfeca8cf4a36bc4a7b9898 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 15 二月 2019 15:17:26 +0800
Subject: [PATCH] 6211 【后端】【1.6】合服任务单(合服邮件、重置首充双倍、重置商店购买次数、设置合服命令SetMixServer)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

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 24e6d1c..8b756d8 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
@@ -216,18 +216,29 @@
     elif onEventType == ShareDefine.Def_OnEventTypeEx:
         refreshType = [4]
         openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)
-        if openServerDay % 3 == 0:
-            refreshType = [4,7]
+        isMixServer = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_IsMixServer)
+        if isMixServer:
+            mixServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_MixServerDay)
+            if mixServerDay % 3 == 0:
+                refreshType.append(7)
+        elif openServerDay % 3 == 0:
+            refreshType.append(7)
     else:
         return
-    __ResetShopItemBuyCount(curPlayer, refreshType)
+    ResetShopItemBuyCount(curPlayer, refreshType)
     return
 
 ##商店物品OnWeek
 # @param curPlayer 玩家实例
 # @return 
 def ShopItemOnWeek(curPlayer, onEventType):
-    __ResetShopItemBuyCount(curPlayer, [onEventType])
+    if onEventType == ShareDefine.Def_OnEventType:
+        refreshType = [1]
+    elif onEventType == ShareDefine.Def_OnEventTypeEx:
+        refreshType = [2]
+    else:
+        return
+    ResetShopItemBuyCount(curPlayer, refreshType)
     return
 
 ##商店物品OnMonth
@@ -240,16 +251,17 @@
         refreshType = 6
     else:
         return
-    __ResetShopItemBuyCount(curPlayer, [refreshType])
+    ResetShopItemBuyCount(curPlayer, [refreshType])
     return
 
 def ShopItemOnCrossPKSeasonChange(curPlayer):
     ## 按跨服PK赛季重置
     refreshType = 8
-    __ResetShopItemBuyCount(curPlayer, [refreshType])
+    ResetShopItemBuyCount(curPlayer, [refreshType])
     return
 
-def __ResetShopItemBuyCount(curPlayer, onEventTypeList):
+def ResetShopItemBuyCount(curPlayer, onEventTypeList=[]):
+    #@param onEventTypeList: 需要重置的类型列表,为空时重置所有类型
     #重置商店物品购买次数  1:周一0点刷新    2:周一5点刷新    3:每日0点刷新    4:每日5点刷新    5每月0点    6每月5点   7每3天5点  8每赛季
     syncIndexList = []
     ipyDataMgr = IpyGameDataPY.IPY_Data()
@@ -257,7 +269,7 @@
         shopItem = ipyDataMgr.GetStoreByIndex(i)
         if not shopItem.GetLimitCnt():
             continue
-        if shopItem.GetRefreshType() not in onEventTypeList:
+        if onEventTypeList and shopItem.GetRefreshType() not in onEventTypeList:
             continue
         dayBuyCntKey = ChConfig.Def_PDict_ShopItemDayBuyCnt % shopItem.GetID()
         curDayBuyCnt = curPlayer.NomalDictGetProperty(dayBuyCntKey)

--
Gitblit v1.8.0