From 68dd06e06c1a4a155884c31403da1155be6f10e8 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 18 四月 2019 17:11:31 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
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 d7bee14..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,10 +110,11 @@
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 = springSaleIpyData.GetStartDate()
- packInfo.EndtDate = springSaleIpyData.GetEndDate()
+ packInfo.StartDate = GameWorld.GetOperationActionDateStr(springSaleIpyData.GetStartDate(), openServerDay)
+ packInfo.EndtDate = GameWorld.GetOperationActionDateStr(springSaleIpyData.GetEndDate(), openServerDay)
packInfo.AdvanceMinutes = springSaleIpyData.GetAdvanceMinutes()
packInfo.ActivityTime = []
for i, startTime in enumerate(startTimeList):
@@ -144,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)
--
Gitblit v1.8.0