HeroHerlp.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 List<HeroAttributeData> GetHeroChageHeroAttributeData1(HeroInfo currentHero, HeroInfo newHero)
  54. {
  55. List<HeroAttributeData> heroAttributeDataList = new List<HeroAttributeData>();
  56. if (currentHero.powerUpConfig.ShenshiMax != newHero.powerUpConfig.ShenshiMax)
  57. {
  58. HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), newHero.powerUpConfig.ShenshiMax - currentHero.powerUpConfig.ShenshiMax + "");
  59. heroAttributeDataList.Add(heroAttributeData);
  60. }
  61. if (currentHero.hp != newHero.hp)
  62. {
  63. HeroAttributeData heroAttributeData = new HeroAttributeData("生命", currentHero.hp.Value.ToString(), newHero.hp.Value - currentHero.hp.Value + "");
  64. heroAttributeDataList.Add(heroAttributeData);
  65. }
  66. if (currentHero.attack != newHero.attack)
  67. {
  68. HeroAttributeData heroAttributeData = new HeroAttributeData("攻击", currentHero.attack.Value.ToString(), newHero.attack.Value - currentHero.attack.Value + "");
  69. heroAttributeDataList.Add(heroAttributeData);
  70. }
  71. if (currentHero.defense != newHero.defense)
  72. {
  73. HeroAttributeData heroAttributeData = new HeroAttributeData("防御", currentHero.defense.Value.ToString(), newHero.defense.Value - currentHero.defense.Value + "");
  74. heroAttributeDataList.Add(heroAttributeData);
  75. }
  76. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  77. {
  78. HeroAttributeData heroAttributeData = new HeroAttributeData("法宝倍率", currentHero.powerUpConfig.MPFactor.ToString(), currentHero.powerUpConfig.MPFactor - currentHero.powerUpConfig.MPFactor + "");
  79. heroAttributeDataList.Add(heroAttributeData);
  80. }
  81. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  82. {
  83. HeroAttributeData heroAttributeData = new HeroAttributeData("护盾倍率", currentHero.powerUpConfig.HudunFactor.ToString(), currentHero.powerUpConfig.HudunFactor - currentHero.powerUpConfig.HudunFactor + "");
  84. heroAttributeDataList.Add(heroAttributeData);
  85. }
  86. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  87. {
  88. HeroAttributeData heroAttributeData = new HeroAttributeData("防御系数K", currentHero.powerUpConfig.defK.ToString(), currentHero.powerUpConfig.defK - currentHero.powerUpConfig.defK + "");
  89. heroAttributeDataList.Add(heroAttributeData);
  90. }
  91. if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
  92. {
  93. HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), currentHero.powerUpConfig.ShenshiMax - currentHero.powerUpConfig.ShenshiMax + "");
  94. heroAttributeDataList.Add(heroAttributeData);
  95. }
  96. return heroAttributeDataList;
  97. }
  98. public static int GetHeroExp()
  99. {
  100. int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
  101. int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
  102. return allexp;
  103. }
  104. }
  105. }