From f5d7e43bb1a29abf17f8d371f66262c4e3de2b01 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 七月 2019 10:31:06 +0800
Subject: [PATCH] 4453 【主干】【2.0.200】仙盟拍品拍卖时长异常

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py |   43 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
index 2c96581..4de6d95 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
@@ -34,6 +34,7 @@
 import PlayerActivity
 import PlayerSuccess
 import PyGameData
+import BossHurtMng
 
 import copy
 import datetime
@@ -151,15 +152,26 @@
             recoverNumList.append(index)
         elif dailyQuestData.GetRelatedType() == 1:#每日活动
             dailyID = dailyQuestData.GetRelatedID()
+            lostOnDay = lostOnDayNum
             curDayTimes, dayTimesLimit = PlayerActivity.GetDailyActionFinishCnt(curPlayer, dailyID)
             if dailyID in [ShareDefine.DailyActionID_Dice, ShareDefine.DailyActionID_IceLode]:#我要太极只分是否参加过,没参加过才能找回,次数算1次
                 dayTimesLimit = 1
                 if curDayTimes:
                     curDayTimes = dayTimesLimit
-                
-            if curDayTimes >= dayTimesLimit and not lostOnDayNum:
+            elif dailyID is ShareDefine.DailyActionID_WorldBOSS:
+                canKillCnt, dayTimesLimit = BossHurtMng.GetCanKillBossCnt(curPlayer, 0)
+                curDayTimes = dayTimesLimit - canKillCnt
+            elif dailyID is ShareDefine.DailyActionID_SealDemon:
+                #找回前先立即刷新一次
+                FBCommon.RegainFBCntProcess(curPlayer)
+                beyondTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainOverTime % ChConfig.Def_FBMapID_SealDemon)
+                recoverInterval = IpyGameDataPY.GetFuncCfg('FBCntRegainInterval')
+                dayTimesLimit = 24*3600/recoverInterval
+                curDayTimes = dayTimesLimit - beyondTimes
+                lostOnDay = 0
+            if curDayTimes >= dayTimesLimit and not lostOnDay:
                 continue
-            addCommonCnt = (dayTimesLimit - curDayTimes) + lostOnDayNum * dayTimesLimit
+            addCommonCnt = (dayTimesLimit - curDayTimes) + lostOnDay * dayTimesLimit
             if addCommonCnt <=0:
                 continue
             curCommonCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverFBCommonCnt % index, 0)
@@ -382,8 +394,26 @@
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBItemAddCnt % index, newItemAddCnt)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBExtraCnt % index, newExtraCnt)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBNoBuyCnt % index, newnoBuyCnt)
-        if max(newCommonCnt, newBuyCnt, newItemAddCnt, newExtraCnt, newnoBuyCnt) == 0 and index != Def_TJGRecoverID:
-            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HaveRecover % index, 1)
+        if index != Def_TJGRecoverID:
+            #1:找回了普通  2:找回了vip  3:2个都有找回  
+            recoverData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HaveRecover % index, 0)
+            updData = recoverData
+            if i < len(cntList) -1:
+                if recoverData == 2:
+                    updData = 3
+                elif recoverData == 0:
+                    updData = 1
+            else:
+                if max(curCommonCnt, curBuyCnt, curItemAddCnt, curExtraCnt) == 0:
+                    if recoverData == 0:
+                        updData = 2
+                    elif recoverData == 1:
+                        updData = 3
+                else:
+                    updData = 3
+                    
+            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HaveRecover % index, updData)
+     
         
     return
 
@@ -400,7 +430,7 @@
     expRate = PlayerControl.GetLimitExpRate(curPlayer, ChConfig.ExpRateLimitType_Recover)
     extraData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainData % index, 0)
     dataEx = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainDataEx % index, 0)
-    
+    realmLV = curPlayer.GetOfficialRank()
     tjgExp = 0 #脱机挂找回经验
     exp = 0
     sp = 0
@@ -478,6 +508,7 @@
         numInfoPack.Index = index
         numInfoPack.RecoverCnt = commonCnt
         numInfoPack.ExtraCnt = vipExtraCnt
+        numInfoPack.HaveRecover = haveRecover
         numInfoPack.ExtraData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainData % index, 0)
         numInfoPack.ExtraData2 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainDataEx % index, 0)
         sendPack.NumInfo.append(numInfoPack)  

--
Gitblit v1.8.0