HuanlingshiVo.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Newtonsoft.Json.Linq;
  5. public class HuanlingshiVo
  6. {
  7. public HuanlingshiVo(int id)
  8. {
  9. this.id = id;
  10. }
  11. /// <summary>
  12. /// 唤灵师id
  13. /// </summary>
  14. public int id { get; set; }
  15. /// <summary>
  16. /// 唤灵师等级
  17. /// </summary>
  18. public int huanglingshiLv
  19. {
  20. get
  21. {
  22. Dictionary<string, GameHeroVo> collectHeroDic = UserProxy.Instance.player.collectHero.collectHeroDic;
  23. if (collectHeroDic.ContainsKey(this.id.ToString()))
  24. {
  25. return collectHeroDic[this.id.ToString()].level;
  26. }
  27. return 0;
  28. }
  29. }
  30. /// <summary>
  31. /// 唤灵师的星级
  32. /// </summary>
  33. public int starLv
  34. {
  35. get
  36. {
  37. Dictionary<string, GameHeroVo> collectHeroDic = UserProxy.Instance.player.collectHero.collectHeroDic;
  38. if (collectHeroDic.ContainsKey(this.id.ToString()))
  39. {
  40. return collectHeroDic[this.id.ToString()].curStar;
  41. }
  42. return 0;
  43. }
  44. }
  45. /// <summary>
  46. /// 当前星级限制的等级
  47. /// </summary>
  48. public int starLimitLv
  49. {
  50. get
  51. {
  52. //sm_heroextra_level_tupo mo = sm_heroextra_level_tupo.GetMoById(this.id,this.starLv);
  53. //if (mo == null)
  54. //{
  55. // return 0;
  56. //}
  57. //return mo.starlimitLv;
  58. return 0;
  59. }
  60. }
  61. /// <summary>
  62. /// 是不是升级按钮 true:是
  63. /// </summary>
  64. public bool isUpgrade
  65. {
  66. get
  67. {
  68. //if (this.huanglingshiLv < this.starLimitLv)
  69. //{
  70. // return true;
  71. //}
  72. //if (UserProxy.Instance.player.baseInfo.level < sm_heroextra_level_tupo.GetMoById(this.id,this.starLv).userlvLimit)
  73. //{
  74. // return true;
  75. //}
  76. return false;
  77. }
  78. }
  79. }