HeroHerlp.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Collections.Generic;
  2. using GameLogic.Hero;
  3. namespace Fort23.Mono
  4. {
  5. public static class HeroHerlp
  6. {
  7. public static List<HeroAttributeData> GetHeroChageHeroAttributeData(HeroInfo currentHero, HeroInfo newHero)
  8. {
  9. List<HeroAttributeData> heroAttributeDataList = new List<HeroAttributeData>();
  10. if (currentHero.hp != newHero.hp)
  11. {
  12. HeroAttributeData heroAttributeData = new HeroAttributeData("生命", currentHero.hp.Value.ToString(), "+" +newHero.hp.Value.ToString());
  13. heroAttributeDataList.Add(heroAttributeData);
  14. }
  15. if (currentHero.attack != newHero.attack)
  16. {
  17. HeroAttributeData heroAttributeData = new HeroAttributeData("攻击", currentHero.attack.Value.ToString(), "+" +newHero.attack.Value.ToString());
  18. heroAttributeDataList.Add(heroAttributeData);
  19. }
  20. if (currentHero.defense != newHero.defense)
  21. {
  22. HeroAttributeData heroAttributeData = new HeroAttributeData("防御", currentHero.defense.Value.ToString(), "+" +newHero.defense.Value.ToString());
  23. heroAttributeDataList.Add(heroAttributeData);
  24. }
  25. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  26. {
  27. HeroAttributeData heroAttributeData = new HeroAttributeData("法宝倍率", currentHero.powerUpConfig.MPFactor.ToString(), "+" + currentHero.powerUpConfig.MPFactor.ToString());
  28. heroAttributeDataList.Add(heroAttributeData);
  29. }
  30. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  31. {
  32. HeroAttributeData heroAttributeData = new HeroAttributeData("护盾倍率", currentHero.powerUpConfig.HudunFactor.ToString(), "+" + currentHero.powerUpConfig.HudunFactor.ToString());
  33. heroAttributeDataList.Add(heroAttributeData);
  34. }
  35. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  36. {
  37. HeroAttributeData heroAttributeData = new HeroAttributeData("防御系数K", currentHero.powerUpConfig.defK.ToString(), "+" + currentHero.powerUpConfig.defK.ToString());
  38. heroAttributeDataList.Add(heroAttributeData);
  39. }
  40. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  41. {
  42. HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), "+" + currentHero.powerUpConfig.ShenshiMax.ToString());
  43. heroAttributeDataList.Add(heroAttributeData);
  44. }
  45. return heroAttributeDataList;
  46. }
  47. }
  48. }