From ffb2b5d1c7246523bb51e75d067c14d7bb8bbdc5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 25 一月 2019 16:37:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/1.5.200.develop'

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |   19 ++++++++++++++-----
 1 files changed, 14 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 b14d26d..37d46ab 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
@@ -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()):
@@ -377,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:
@@ -472,10 +481,10 @@
     jobItemList = ipyData.GetJobItem()
     totalItemList = []
     if itemID:
-        jobItemID = __GetShopJobItem(job, itemID, jobItemList)
+        jobItemID = GetShopJobItem(job, itemID, jobItemList)
         totalItemList.append([jobItemID, itemCount * clientBuyCount, isBind])
     for itemIDEx, itemCountEx, isBindEx in itemListEx:
-        jobItemID = __GetShopJobItem(job, itemIDEx, jobItemList)
+        jobItemID = GetShopJobItem(job, itemIDEx, jobItemList)
         totalItemList.append([jobItemID, itemCountEx * clientBuyCount, isBindEx])
     #允许价钱配置0,用来免费购买
     if not totalItemList:
@@ -594,7 +603,7 @@
         PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_Fireworks, clientBuyCount)
     return
 
-def __GetShopJobItem(job, itemID, jobItemList):
+def GetShopJobItem(job, itemID, jobItemList):
     ## 获取商城物品对应的职业物品, 职业从1开始
     for jobItemIDList in jobItemList:
         if type(jobItemIDList) not in [list, tuple]:

--
Gitblit v1.8.0