EquipOrItemTipsInfo.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ---@class EquipOrItemTipsInfo @注释
  2. EquipOrItemTipsInfo = class()
  3. local this = EquipOrItemTipsInfo
  4. function this:ctor()
  5. end
  6. function this:Init()
  7. self:Reset()
  8. self:InitData()
  9. self:RegistMessages()
  10. end
  11. function this:InitData()
  12. end
  13. function this:RegistMessages()
  14. end
  15. function this:Reset()
  16. end
  17. ---是否可点击按钮(功能开启等级是否开放)
  18. function this:IsCanOnClickButton(btnType,id)
  19. local systemID = id
  20. if btnType[1] == "4" then--强化
  21. systemID = 10401
  22. elseif btnType[1] == "5" then--上架
  23. systemID = 201
  24. elseif btnType[1] == "13" then--分解
  25. systemID = 10404
  26. elseif btnType[1] == "14" then--穿戴坐骑装备
  27. systemID = 106
  28. elseif btnType[1] == "15" then--萤石镶嵌
  29. systemID = 10403
  30. elseif btnType[1] == "99" then
  31. systemID = tonumber(btnType[3])
  32. end
  33. if not systemID then
  34. return true
  35. else
  36. if systemID == "" then
  37. return true
  38. end
  39. ---@type cfg_system_switch_column
  40. local systemCfg = SL:GetConfig("cfg_system_switch",systemID)
  41. local isMeet = SL:GetMetaValue(EMetaVarGetKey.IS_OPEN_SYSTEMFUNCTION,systemCfg.systemName)
  42. if not isMeet then
  43. SL:TipMessage( SL:GetConfig('cfg_string',449).text,1, NoticeType.NoticeMid )--"等级不足",
  44. end
  45. return isMeet
  46. end
  47. end