From d6bf998381c0aed3ed46940493fc6b39c05f5a28 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 18 四月 2019 17:10:36 +0800
Subject: [PATCH] 6457 缥缈事件通知修改

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 711919b..83afe91 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -44,6 +44,7 @@
 import ShareDefine
 import PlayerFlashGiftbag
 import PlayerFairyCeremony
+import PlayerNewFairyCeremony
 import PlayerGoldGift
 import PlayerActTotalRecharge
 import OpenServerCampaign
@@ -60,11 +61,11 @@
 def GetCoinRate(): return IpyGameDataPY.GetFuncCfg("PayRMB")
 
 def OnLogin(curPlayer):
-    DoResetCTGCount(curPlayer) 
-    Sync_CoinToGoldCountInfo(curPlayer)
+    if not DoResetCTGCountByTime(curPlayer):
+        Sync_CoinToGoldCountInfo(curPlayer)
     return
 
-def DoResetCTGCount(curPlayer):
+def DoResetCTGCountByTime(curPlayer):
     # 重置充值次数
     ctgResetTimeYMD = IpyGameDataPY.GetFuncCfg("CTG", 1)
     if not ctgResetTimeYMD:
@@ -73,7 +74,7 @@
         GameWorld.ErrLog("充值重置时间配置必须是数值格式,不能包含符号!")
         return
     curTime = int(time.time())
-    playerID = curPlayer.GetPlayerID()
+    #playerID = curPlayer.GetPlayerID()
     resetTime = GameWorld.ChangeTimeStrToNum(str(ctgResetTimeYMD), "%Y%m%d")
     if curTime < resetTime:
         #GameWorld.DebugLog("还未到达充值充值次数时间!curTime=%s < resetTime=%s" % (curTime, resetTime), playerID)
@@ -84,6 +85,13 @@
         return
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGCountResetTime, resetTime)
     
+    DoResetCTGCount(curPlayer, ctgResetTimeYMD)
+    return True
+
+def DoResetCTGCount(curPlayer, resetEvent):
+    # 重置充值次数
+    
+    playerID = curPlayer.GetPlayerID()
     ipyDataMgr = IpyGameDataPY.IPY_Data()
     for i in xrange(ipyDataMgr.GetCTGCount()):
         ipyData = ipyDataMgr.GetCTGByIndex(i)
@@ -94,11 +102,12 @@
             continue
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)
-        drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "ResetTimeYMD":ctgResetTimeYMD,
+        drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "ResetEvent":resetEvent,
                   "totalBuyCount":totalBuyCount, "todayBuyCount":todayBuyCount, "recordID":recordID}
         DataRecordPack.SendEventPack("ResetCTGCount", drDict, curPlayer)
-        GameWorld.Log("重置充值次数: ResetTimeYMD=%s,recordID=%s,totalBuyCount=%s,todayBuyCount=%s" 
-                      % (ctgResetTimeYMD, recordID, totalBuyCount, todayBuyCount), playerID)
+        GameWorld.Log("重置充值次数: resetEvent=%s,recordID=%s,totalBuyCount=%s,todayBuyCount=%s" 
+                      % (resetEvent, recordID, totalBuyCount, todayBuyCount), playerID)
+    Sync_CoinToGoldCountInfo(curPlayer)
     return
 
 
@@ -166,6 +175,9 @@
     orderInfo = chargeInfo.GetOrderInfo() # 商品编号
     orderID = chargeInfo.GetOrderID() #订单号,兑换成功后清除
     isAddBourseMoney = chargeInfo.GetIsAddBourseMoney()
+    if orderID:
+        curPlayer.SendDBFinishRecharge(orderID)
+        
     appID = chargeInfo.GetAppID()
     if not appID:
         appID = GameWorld.GetPlayerPlatform(curPlayer)
@@ -206,7 +218,7 @@
     
     #充值成功主动查询一次,无充值数量就不会继续查询
     if orderID:
-        curPlayer.SendDBFinishRecharge(orderID)
+        #curPlayer.SendDBFinishRecharge(orderID)
         # 充值成功回报客户端,SDK等会用到
         Sync_CoinToGoldReport(curPlayer, orderID, orderCoin)
         
@@ -262,7 +274,7 @@
             PlayerControl.SendMailByKey("", [curPlayer.GetPlayerID()], giveItemList)
         else:
             for itemID, itemCount, isBind in giveItemList:
-                ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem], 
+                ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem], 
                                              event=[ChConfig.ItemGive_CTG, True, addDRDict])
         if notifyMark:
             mainItemID = giveItemList[0][0]
@@ -286,6 +298,7 @@
     #---充值成功后逻辑---
     #仙界盛典-充值大礼
     PlayerFairyCeremony.OnFCRecharge(curPlayer)
+    PlayerNewFairyCeremony.OnFCRecharge(curPlayer)
     PlayerGoldGift.DayChargeRedPackAward(curPlayer)
     #累积充值X元
     PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin/100)

--
Gitblit v1.8.0