|
|
@@ -154,10 +154,10 @@ namespace Fort23.Mono
|
|
|
//失败
|
|
|
else
|
|
|
{
|
|
|
- RemoveHeroItem(list[1]);
|
|
|
+ int xw =RemoveHeroItem(list[1]);
|
|
|
AudioManager.Instance.PlayAudio("ui_tuposhibai.wav");
|
|
|
HeroBreakthroughFailPanel heroBreakthroughFailPanel =
|
|
|
- await HeroBreakthroughFailPanel.OpenPanel(2, list[1]);
|
|
|
+ await HeroBreakthroughFailPanel.OpenPanel(2, xw);
|
|
|
await heroBreakthroughFailPanel.UIClosed();
|
|
|
heroInformationPanel.RecoverDujie();
|
|
|
UIManager.Instance.HideUIUIPanel(this);
|
|
|
@@ -186,10 +186,11 @@ namespace Fort23.Mono
|
|
|
if (ramdomValue >= PlayerManager.Instance.myHero.hp.Value)
|
|
|
{
|
|
|
AudioManager.Instance.PlayAudio("ui_tuposhibai.wav");
|
|
|
- RemoveHeroItem(100);
|
|
|
+ var list = GetBl();
|
|
|
+ int xw = RemoveHeroItem(list[1]);
|
|
|
|
|
|
HeroBreakthroughFailPanel heroBreakthroughFailPanel =
|
|
|
- await HeroBreakthroughFailPanel.OpenPanel(3, 100);
|
|
|
+ await HeroBreakthroughFailPanel.OpenPanel(3, xw);
|
|
|
await heroBreakthroughFailPanel.UIClosed();
|
|
|
heroInformationPanel.RecoverDujie();
|
|
|
UIManager.Instance.HideUIUIPanel(this);
|
|
|
@@ -239,19 +240,22 @@ namespace Fort23.Mono
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- private void RemoveHeroItem(int failBl)
|
|
|
+ private int RemoveHeroItem(int failBl)
|
|
|
{
|
|
|
+ float allexp = HeroHerlp.GetHeroExp();
|
|
|
+ PlayerManager.Instance.myHero.heroData.exp += allexp;
|
|
|
//扣除失败后的经验
|
|
|
float failbl = failBl == 0
|
|
|
? PlayerManager.Instance.myHero.powerUpConfig.FailureExpReduce
|
|
|
: (float)(PlayerManager.Instance.myHero.powerUpConfig.FailureExpReduce * failBl * 0.01f);
|
|
|
- int failXw = (int)(PlayerManager.Instance.myHero.powerUpConfig.levelUpExp * failbl * 0.01f);
|
|
|
- float allexp = HeroHerlp.GetHeroExp();
|
|
|
- PlayerManager.Instance.myHero.heroData.exp += allexp;
|
|
|
+ int failXw = (int)(PlayerManager.Instance.myHero.heroData.exp * failbl * 0.01f);
|
|
|
+
|
|
|
+
|
|
|
PlayerManager.Instance.myHero.heroData.exp -= failXw;
|
|
|
PlayerManager.Instance.myHero.heroData.upTime = TimeHelper.ClientNow();
|
|
|
// PlayerManager.Instance.myHero.heroData.isCombat = false;
|
|
|
AccountFileInfo.Instance.SavePlayerData();
|
|
|
+ return failXw;
|
|
|
}
|
|
|
|
|
|
// private async CTask UpHero(int type,HeroInfo nextHeroInfo)
|