require("misc.GSetClass") local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig) local EquipTreasureData = GSetClass("EquipTreasureData") EquipTreasureData.onCreate = function(self,_singleData) self._lv = _singleData.lv end --等级 EquipTreasureData.__get__.lv = function(self) -- print(this._lv, " - 属性访问器:get lv") if self.Location == 1 then -- body local temp_lv = HarmonyManager.GetSingleAdditions(HarmonyAddType.HunSoulPrint) local isMing = HarmonyManager.IsInfo(self.upHeroDid) -- LogPink("self.upHeroDid "..self.upHeroDid.." "..tostring(isMing)) if temp_lv > 0 and isMing then local curlvEen = jewelConfig[self.id].Max[1] local endLv = temp_lv > curlvEen and curlvEen or temp_lv -- LogPink(" curlvEen "..endLv) return endLv else -- LogPink(" curlvEen "..self._lv) return self._lv end else local temp_lv = HarmonyManager.GetSingleAdditions(HarmonyAddType.LingSoulPrint) local isMing = HarmonyManager.IsInfo(self.upHeroDid) -- LogPink("self.upHeroDid "..self.upHeroDid.." "..tostring(isMing)) if temp_lv > 0 and isMing then local curlvEen = jewelConfig[self.id].Max[1] local endLv = temp_lv > curlvEen and curlvEen or temp_lv -- LogPink(" curlvEen "..endLv) return endLv else -- LogPink(" curlvEen "..self._lv) return self._lv end end end EquipTreasureData.__set__.lv = function(self, value) -- print(this._lv, " - 属性访问器:set lv", value) self._lv = value end return EquipTreasureData