From 5d7a27406e85a56b2af644601fd9f290f0a0c8e9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 16 二月 2019 14:25:43 +0800
Subject: [PATCH] 6211 【后端】【1.6】合服任务单(只重置限购类型7的商品购买次数)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 10 +++++++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 4 ++--
2 files changed, 9 insertions(+), 5 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 8b756d8..2573564 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
@@ -260,16 +260,20 @@
ResetShopItemBuyCount(curPlayer, [refreshType])
return
-def ResetShopItemBuyCount(curPlayer, onEventTypeList=[]):
- #@param onEventTypeList: 需要重置的类型列表,为空时重置所有类型
+def ResetShopItemBuyCount(curPlayer, resetTypeList):
+ #@param resetTypeList: 需要重置的类型列表
#重置商店物品购买次数 1:周一0点刷新 2:周一5点刷新 3:每日0点刷新 4:每日5点刷新 5每月0点 6每月5点 7每3天5点 8每赛季
+ if not resetTypeList:
+ # 暂定必须指定类型列表,防止终身限购的误被重置
+ return
+
syncIndexList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
for i in xrange(ipyDataMgr.GetStoreCount()):
shopItem = ipyDataMgr.GetStoreByIndex(i)
if not shopItem.GetLimitCnt():
continue
- if onEventTypeList and shopItem.GetRefreshType() not in onEventTypeList:
+ if shopItem.GetRefreshType() not in resetTypeList:
continue
dayBuyCntKey = ChConfig.Def_PDict_ShopItemDayBuyCnt % shopItem.GetID()
curDayBuyCnt = curPlayer.NomalDictGetProperty(dayBuyCntKey)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 8a0fa4a..cdefe90 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -831,8 +831,8 @@
# 重置首充双倍
PlayerCoin.DoResetCTGCount(curPlayer, "MixServer")
- # 重置商店购买次数
- FunctionNPCCommon.ResetShopItemBuyCount(curPlayer)
+ # 重置商店购买次数,暂定只重置类型 7 的
+ FunctionNPCCommon.ResetShopItemBuyCount(curPlayer, [7])
# 合服邮件,盟主专属邮件在GameServer处理
mailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 1)
--
Gitblit v1.8.0