AttrConfigProxy.lua 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. local RemoteProxy = requireProxy( "remote/RemoteProxy" )
  2. local AttrConfigProxy = class( "AttrConfigProxy", RemoteProxy )
  3. AttrConfigProxy.NAME = global.ProxyTable.AttrConfigProxy
  4. function AttrConfigProxy:ctor()
  5. AttrConfigProxy.super.ctor( self )
  6. self.ItemsConfig = requireConfig("ItemsConfig")
  7. self._attribute = {}
  8. self._attTypes = {} --属性类型 表中的属性id
  9. end
  10. function AttrConfigProxy:LoadConfig()
  11. self._attribute = requireGameConfig("cfg_att_score")
  12. local index = 1
  13. -- 兼容scolor
  14. for _, v in pairs(self._attribute) do
  15. v.color = v.color or v.scolor
  16. self._attTypes[index] = v.Idx
  17. index = index + 1
  18. end
  19. -- 服务开关 修改属性为万分比
  20. local bFixMagicMiss = CHECK_SERVER_OPTION("NewMagicMissType")
  21. if bFixMagicMiss then
  22. self._attribute[15].type = 2
  23. end
  24. local bFixOther = CHECK_SERVER_OPTION("UseYSNewCalType")
  25. if bFixOther then
  26. for i = 21, 31 do
  27. self._attribute[i].type = 2
  28. end
  29. self._attribute[43].type = 2
  30. self._attribute[72].type = 2
  31. end
  32. end
  33. function AttrConfigProxy:GetAttTypes()
  34. return self._attTypes or {}
  35. end
  36. function AttrConfigProxy:GetAttConfigByAttId( attId )
  37. return self._attribute[attId]
  38. end
  39. function AttrConfigProxy:GetAttConfig()
  40. return self._attribute
  41. end
  42. function AttrConfigProxy:GetItemsConfigEquipMapByStdMode()
  43. local EquipMapByStdMode = self.ItemsConfig.EquipMapByStdMode
  44. return EquipMapByStdMode
  45. end
  46. function AttrConfigProxy:GetItemsConfigDuraMapByShap()
  47. local DuraMapByShap = self.ItemsConfig.DuraMapByShap
  48. return DuraMapByShap
  49. end
  50. function AttrConfigProxy:GetItemsConfigQuickUsable()
  51. local QuickUseStdMode = self.ItemsConfig.QuickUseStdMode
  52. return QuickUseStdMode
  53. end
  54. function AttrConfigProxy:GetItemsExtraShowLasting()
  55. local ItemsShowLasting = self.ItemsConfig.ItemsShowLasting
  56. return ItemsShowLasting
  57. end
  58. function AttrConfigProxy:onRegister()
  59. AttrConfigProxy.super.onRegister( self )
  60. end
  61. return AttrConfigProxy