| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using ET; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using FairyGUI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using static UnityEngine.UI.CanvasScaler; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -10,8 +11,10 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private static int _heartbeatCDEnd = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public static void StartUpdate() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _heartbeatCDEnd = ServerDataManager.currentTimeSecs + INTERVAL_HEARTBEAT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int currentTimeSecs = (int)(Game.TimeInfo.ServerNow() / 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _heartbeatCDEnd = currentTimeSecs + INTERVAL_HEARTBEAT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             StopUpdate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //每秒检测 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Timers.inst.Add(1, 0, OnUpdate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -22,27 +25,26 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private static void OnUpdate(object param) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(!RoleDataManager.powerTimeLock &&!RoleDataManager.CheckPowerFull()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int currentTimeSecs = (int)(Game.TimeInfo.ServerNow() / 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!RoleDataManager.powerTimeServerLock &&!RoleDataManager.CheckPowerFull()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 int powerTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                int passTime = ServerDataManager.currentTimeSecs - powerTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                int passTime = currentTimeSecs - powerTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(passTime >= GameConst.INTERVAL_TIME_SECONDS_POWER) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    RoleDataManager.powerTimeLock = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    RoleDataManager.powerTimeServerLock = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     NumericHelper.RequestAddAttributePoint(GameGlobal.zoneScene, NumericType.Power).Coroutine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int currentTimeSecs = ServerDataManager.currentTimeSecs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(currentTimeSecs >= _heartbeatCDEnd)  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //GameProxy.ReqUpdateTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _heartbeatCDEnd = currentTimeSecs + INTERVAL_HEARTBEAT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int day = ServerDataManager.CurrentDay; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int recommendDay = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(recommendDay >= 0 && recommendDay != day)  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int dailyResetSecs = GameGlobal.myNumericComponent.GetAsInt(NumericType.DailyResetSecs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (TimeHelper.ServerNowSecs >= dailyResetSecs) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                StoryDataManager.ResetDailyData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                RoleSproxy.ResetDailyData().Coroutine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |