lzx 3 giorni fa
parent
commit
ef1760cd5f
1 ha cambiato i file con 12 aggiunte e 1 eliminazioni
  1. 12 1
      Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

+ 12 - 1
Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

@@ -90,7 +90,18 @@ namespace Fort23.Mono
 
 
                 if (EventSystemManager.Instance.IsEventCompleted(10003) && PlayerGuideManager.Instance.GuideIsCanDo(6))
                 if (EventSystemManager.Instance.IsEventCompleted(10003) && PlayerGuideManager.Instance.GuideIsCanDo(6))
                 {
                 {
-                    await PlayerGuideManager.Instance.SetGuid(6);
+                    int currentMiao =
+                        (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) /
+                              1000);
+
+                    float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+                    if (PlayerManager.Instance.myHero.heroData.exp + allexp >=
+                        PlayerManager.Instance.myHero.powerUpConfig.levelUpExp)
+                    {
+                        await PlayerGuideManager.Instance.SetGuid(6);
+                    }
+
+                  
                 }
                 }
             }
             }
         }
         }