From 70808a8f66c0ad61fc504203e81c29118e10441d Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 21 十一月 2018 17:23:36 +0800
Subject: [PATCH] 4909 【后端】【1.2】【1.3】绝版称号、绝世坐骑、逆天灵宠开启条件变更

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 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 960bc9a..7476410 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
@@ -192,6 +192,14 @@
 
 ## 登录
 def ShopItemOnLogin(curPlayer):
+    if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_SuperGift):
+        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_SuperGift, 1)
+        isGet = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftFirstRecord)
+        if isGet:#首充奖励已领取则代表超值礼包已开启过,
+            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftHasOpen, 1)
+            
+    
+    
     SyncShopItemTodayBuyCount(curPlayer)
     SyncSuperGiftInfo(curPlayer)
     return
@@ -638,6 +646,10 @@
             #活动结束 重置
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftStartTime, 0)
     else:
+        if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SuperGiftHasOpen):
+            #老号已开启过超值礼包则不再开启
+            return
+        
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftStartTime, curTime)
         addItemList = IpyGameDataPY.GetFuncEvalCfg('SuperGiftTimeList', 2)
         PlayerControl.SendMailByKey('SellMail2', [curPlayer.GetID()], addItemList)

--
Gitblit v1.8.0