HeroHerlp.cs 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System.Collections.Generic;
  2. using Fort23.Core;
  3. using GameLogic.Hero;
  4. namespace Fort23.Mono
  5. {
  6. public static class HeroHerlp
  7. {
  8. public static List<HeroAttributeData> GetHeroChageHeroAttributeData(HeroInfo currentHero, HeroInfo newHero)
  9. {
  10. List<HeroAttributeData> heroAttributeDataList = new List<HeroAttributeData>();
  11. if (currentHero.powerUpConfig.ShenshiMax != newHero.powerUpConfig.ShenshiMax)
  12. {
  13. HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), "" + newHero.powerUpConfig.ShenshiMax.ToString());
  14. heroAttributeDataList.Add(heroAttributeData);
  15. }
  16. if (currentHero.hp != newHero.hp)
  17. {
  18. HeroAttributeData heroAttributeData = new HeroAttributeData("生命", currentHero.hp.Value.ToString(), "" + newHero.hp.Value.ToString());
  19. heroAttributeDataList.Add(heroAttributeData);
  20. }
  21. if (currentHero.attack != newHero.attack)
  22. {
  23. HeroAttributeData heroAttributeData = new HeroAttributeData("攻击", currentHero.attack.Value.ToString(), "" + newHero.attack.Value.ToString());
  24. heroAttributeDataList.Add(heroAttributeData);
  25. }
  26. if (currentHero.defense != newHero.defense)
  27. {
  28. HeroAttributeData heroAttributeData = new HeroAttributeData("防御", currentHero.defense.Value.ToString(), "" + newHero.defense.Value.ToString());
  29. heroAttributeDataList.Add(heroAttributeData);
  30. }
  31. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  32. {
  33. HeroAttributeData heroAttributeData = new HeroAttributeData("法宝倍率", currentHero.powerUpConfig.MPFactor.ToString(), "" + currentHero.powerUpConfig.MPFactor.ToString());
  34. heroAttributeDataList.Add(heroAttributeData);
  35. }
  36. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  37. {
  38. HeroAttributeData heroAttributeData = new HeroAttributeData("护盾倍率", currentHero.powerUpConfig.HudunFactor.ToString(), "" + currentHero.powerUpConfig.HudunFactor.ToString());
  39. heroAttributeDataList.Add(heroAttributeData);
  40. }
  41. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  42. {
  43. HeroAttributeData heroAttributeData = new HeroAttributeData("防御系数K", currentHero.powerUpConfig.defK.ToString(), "" + currentHero.powerUpConfig.defK.ToString());
  44. heroAttributeDataList.Add(heroAttributeData);
  45. }
  46. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  47. {
  48. HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), "" + currentHero.powerUpConfig.ShenshiMax.ToString());
  49. heroAttributeDataList.Add(heroAttributeData);
  50. }
  51. return heroAttributeDataList;
  52. }
  53. public static int GetHeroExp()
  54. {
  55. int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
  56. int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
  57. return allexp;
  58. }
  59. }
  60. }