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(self.Location .. " ---- Location") if self.equipType == 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 and temp_lv > self._lv 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 elseif self.equipType == 2 then 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 and temp_lv > self._lv then local curlvEen = jewelConfig[self.id].Max[1] -- --LogGreen("curlvEen "..curlvEen.." temp_lv "..temp_lv) 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 EquipTreasureData.__get__.oriLv= function (self) -- body return self._lv end return EquipTreasureData