From 48b04bf3b900bb42d22e4b6784e90827c969fa05 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 17 九月 2018 11:54:54 +0800
Subject: [PATCH] 1902 bug 点拒绝加好友,变成加为好友
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 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 02507ad..3526621 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py
@@ -25,6 +25,15 @@
import GameWorld
import ChConfig
+def GetShopTypeList(cfgID, dayIndex):
+ if cfgID == None or dayIndex == None:
+ return []
+ ipyData = IpyGameDataPY.GetIpyGameData("ActSpringSale", cfgID)
+ if not ipyData:
+ return []
+ shopTypeList = ipyData.GetShopTypeList()
+ todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
+ return todayShopType
def OnPlayerLogin(curPlayer):
isReset = __CheckPlayerSpringSaleAction(curPlayer)
@@ -53,9 +62,6 @@
actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_SpringSale, {})
actID = actInfo.get(ShareDefine.ActKey_ID, 0)
state = actInfo.get(ShareDefine.ActKey_State, 0)
- shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, [])
- #if not state or not shopTypeList:
- # return
playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SpringSaleID) # 玩家身上的活动ID
@@ -64,6 +70,7 @@
GameWorld.DebugLog("限时特惠活动ID不变,不处理!", curPlayer.GetPlayerID())
return
+ shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleID, actID)
FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
@@ -82,7 +89,7 @@
return
cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
- shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, 0)
+ shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
if not cfgID or not shopTypeList:
return
--
Gitblit v1.8.0