DragonEggData.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. using FL.Network;
  2. using System;
  3. using System.Collections.Generic;
  4. using XGame.Framework.Data;
  5. namespace FL.Data
  6. {
  7. public class DragonEggData : DataSingleton<DragonEggData>, IDisposable
  8. {
  9. private List<int> _treasureChestIdList = new List<int> { 3001, 3002, 3003, 3004, 3005};// 龙蛋(品质)宝箱对应的道具id列表
  10. /// <summary>
  11. /// 宝藏id(积分进度条)
  12. /// </summary>
  13. public int DragonTreasureId { set; get; }
  14. /// <summary>
  15. /// 当前宝藏进度积分
  16. /// </summary>
  17. public int DragonTreasureSocre { set; get; }
  18. /// <summary>
  19. /// 领取龙蛋积分宝箱掉落道具列表
  20. /// </summary>
  21. public List<KindItem> DragonTreasureRewardItems;
  22. /// <summary>
  23. /// 龙蛋宝箱等级
  24. /// </summary>
  25. public int Level
  26. {
  27. set; get;
  28. }
  29. /// <summary>
  30. /// 龙蛋宝箱升级经验
  31. /// </summary>
  32. public long Exp { set; get; }
  33. /// <summary>
  34. /// 龙蛋升级结束时间
  35. /// </summary>
  36. public long UpLvTime { set; get; }
  37. /// <summary>
  38. /// 减少时间按钮的冷却时间(使用免费观看广告获取宝箱升级减少时间)
  39. /// </summary>
  40. public long WatchADCdTime { set; get; }
  41. /// <summary>
  42. /// 今日观看广告的次数
  43. /// </summary>
  44. public int WatchADCount { set; get; }
  45. /// <summary>
  46. /// 是否已解锁装备分解功能
  47. /// </summary>
  48. public bool IsUnLockDecompose
  49. {
  50. set; get;
  51. }
  52. /// <summary>
  53. /// 开龙蛋宝箱掉落的物品数据
  54. /// </summary>
  55. public List<Network.KindItem> DropItems { set; get; }
  56. // 测试今日不再显示出售高战力装备提示
  57. public bool CheckDayTipsKey
  58. {
  59. set; get;
  60. }
  61. /// <summary>
  62. /// 查找索引
  63. /// </summary>
  64. /// <param name="_treasureChestId"></param>
  65. /// <returns></returns>
  66. public int GetTreasureChestIndex(int _treasureChestId)
  67. {
  68. return _treasureChestIdList.FindIndex(x => x == _treasureChestId);
  69. }
  70. /// <summary>
  71. /// 获取龙蛋品质宝箱数量
  72. /// </summary>
  73. /// <param name="quality"></param>
  74. /// <returns></returns>
  75. public int GetTreasureChestId(int index)
  76. {
  77. return _treasureChestIdList[index];
  78. }
  79. void IDisposable.Dispose()
  80. {
  81. if (_treasureChestIdList != null)
  82. {
  83. _treasureChestIdList.Clear();
  84. }
  85. if (DragonTreasureRewardItems != null)
  86. {
  87. DragonTreasureRewardItems.Clear();
  88. DragonTreasureRewardItems = null;
  89. }
  90. }
  91. }
  92. }