|
@@ -1777,12 +1777,24 @@ public class HttpManager : Regist
|
|
|
coinPerson += ability.NewCoinPerson;
|
|
|
}
|
|
|
}
|
|
|
- float offlineTime = (float) CurrentDateTime.Subtract(Manager.LastQuitTime).TotalSeconds;
|
|
|
+ double offlineTime = (float)CurrentDateTime.Subtract(Manager.LastQuitTime).TotalSeconds;
|
|
|
+ offlineTime *= 100;
|
|
|
offlineTime -= Time.time - Manager.GameBeginTime;
|
|
|
- double offlineIncom = offlineTime*person*coinPerson;
|
|
|
+ if (offlineTime < Manager.OfflineMinTime)
|
|
|
+ {
|
|
|
+ offlineTime = 0;
|
|
|
+ }
|
|
|
+ if (offlineTime > Manager.OfflineMaxTime)
|
|
|
+ {
|
|
|
+ offlineTime = (long)Manager.OfflineMaxTime;
|
|
|
+
|
|
|
+ ResourceManager.SetText(CanvasLabel.Ba_Lab2, Language.GetStr(LanguageLabel.UI__Ba_Lab2));
|
|
|
+ ResourceManager.SetActive(CanvasLabel.Ba_Lab2, true);
|
|
|
+ }
|
|
|
+ double offlineIncom = offlineTime * person * coinPerson;
|
|
|
if (offlineIncom > 0)
|
|
|
{
|
|
|
- offlineIncom = (long) Manager.AdjustOfflineIncome(offlineIncom);
|
|
|
+ offlineIncom = (long)Manager.AdjustOfflineIncome(offlineIncom);
|
|
|
|
|
|
Manager.AddCoin(offlineIncom, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Income);
|
|
|
|