From acb57c78d332420f59605f94dd0a071c536fe7dd Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 28 十二月 2018 23:54:48 +0800
Subject: [PATCH] 5629 【后端】【1.4】成就老号处理
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 67 +++++++++++++++++++++++++++++++--
1 files changed, 62 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 7476410..de88f3a 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
@@ -199,7 +199,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftHasOpen, 1)
-
+ SyncMysticalShopInfo(curPlayer)
SyncShopItemTodayBuyCount(curPlayer)
SyncSuperGiftInfo(curPlayer)
return
@@ -242,8 +242,14 @@
__ResetShopItemBuyCount(curPlayer, [refreshType])
return
+def ShopItemOnCrossPKSeasonChange(curPlayer):
+ ## 按跨服PK赛季重置
+ refreshType = 8
+ __ResetShopItemBuyCount(curPlayer, [refreshType])
+ return
+
def __ResetShopItemBuyCount(curPlayer, onEventTypeList):
- #重置商店物品购买次数 1:周一0点刷新 2:周一5点刷新 3:每日0点刷新 4:每日5点刷新 5每月0点 6每月5点
+ #重置商店物品购买次数 1:周一0点刷新 2:周一5点刷新 3:每日0点刷新 4:每日5点刷新 5每月0点 6每月5点 7每3天5点 8每赛季
syncIndexList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
for i in xrange(ipyDataMgr.GetStoreCount()):
@@ -280,6 +286,49 @@
syncIndexList.append(shopItem.GetID())
if syncIndexList:
SyncShopItemTodayBuyCount(curPlayer, syncIndexList, True)
+ return
+
+def MysticalShopOpen(curPlayer, befLV, aftLV):
+ ##神秘限购开启
+ ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('Store', {'ShopType':16}, True)
+ if not ipyDataList:
+ return
+ curTime = int(time.time())
+ syncGoodsList = []
+ for ipyData in ipyDataList:
+ limitLV = ipyData.GetLimitLV()
+ if befLV < limitLV and aftLV >= limitLV:
+ goodsID = ipyData.GetID()
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemStartTime % goodsID, curTime)
+ syncGoodsList.append(goodsID)
+ GameWorld.DebugLog('神秘限购商品%s 开卖'%goodsID, curPlayer.GetID())
+ if syncGoodsList:
+ SyncMysticalShopInfo(curPlayer)
+ return
+
+def SyncMysticalShopInfo(curPlayer):
+ ##神秘限购通知
+ packData = ChPyNetSendPack.tagMCMysticalShopTimeInfo()
+ packData.ShopTimeList = []
+ ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('Store', {'ShopType':16}, True)
+ curTime = int(time.time())
+ for ipyData in ipyDataList:
+ goodsID = ipyData.GetID()
+ startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ShopItemStartTime % goodsID)
+ if not startTime:
+ continue
+ if curTime - startTime >= ipyData.GetLimitValue():
+ #超时的重置
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemStartTime % goodsID, 0)
+ else:
+ goodsTime = ChPyNetSendPack.tagMCMysticalShopTime()
+ goodsTime.GoodsID = goodsID
+ goodsTime.StartTime = startTime
+ packData.ShopTimeList.append(goodsTime)
+ if not packData.ShopTimeList:
+ return
+ packData.Count = len(packData.ShopTimeList)
+ NetPackCommon.SendFakePack(curPlayer, packData)
return
## 回购物品
@@ -334,7 +383,10 @@
# @param tick 时间戳
# @return 返回值真, 逻辑运行成功
def BuyItem(curPlayer, tick):
-
+
+ if GameWorld.IsCrossServer():
+ return
+
buyItemList = IPY_GameWorld.IPY_CBuyItemList()
itemIndex = buyItemList.GetBuyItemIndex()
if itemIndex < 0:
@@ -594,8 +646,13 @@
if itemIndex in IpyGameDataPY.GetFuncEvalCfg('CeremonyFireParty', 1, {}).values():
return not PlayerFairyCeremony.IsCanBuyFireworks(curPlayer, itemIndex)
- if itemIndex in dict(IpyGameDataPY.GetFuncEvalCfg('SuperGiftTimeList')):
- return not CheckSuperGiftBuy(curPlayer, itemIndex)
+# if itemIndex in dict(IpyGameDataPY.GetFuncEvalCfg('SuperGiftTimeList')):
+# return not CheckSuperGiftBuy(curPlayer, itemIndex)
+ if shopNPCID == 16:#神秘限购
+ startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ShopItemStartTime % itemIndex)
+ curTime = int(time.time())
+ return not startTime or curTime - startTime >= limitValue
+
#
# limitPlusDict = {shopItem.GetLimitPlusType1():shopItem.GetLimitPlusValue1(),
# shopItem.GetLimitPlusType2():shopItem.GetLimitPlusValue2(),
--
Gitblit v1.8.0