Verified Commit 66a42fa3 authored by Repooc's avatar Repooc
Browse files

Remove Corruption

parent 055da266
......@@ -18,7 +18,6 @@ local _CompList = {
"TradeSkillMaster",
"WorldQuestTracker",
"oRA3",
"CorruptionTooltips", --Cause full tooltip on the eye
}
--Populate compatibility checks table
for i = 1, #_CompList do
......
......@@ -53,25 +53,6 @@ P["sle"] = {
["xOffset"] = 0,
["yOffset"] = 0,
},
["corruption"] = {
["position"] = "SLE",
["xOffset"] = 0,
["yOffset"] = 0,
["font"] = "PT Sans Narrow",
["fontSize"] = 15,
["fontStyle"] = "OUTLINE",
["valueColor"] = false,
["style"] = "TOTAL",
},
["corruptionText"] = {
["xOffset"] = 0,
["yOffset"] = 0,
["font"] = "PT Sans Narrow",
["fontSize"] = 12,
["fontStyle"] = "OUTLINE",
["style"] = "AMOUNT/SPELL",
["icon"] = false,
},
["background"] = {
["selectedBG"] = "Space",
["customTexture"] = "",
......@@ -112,15 +93,6 @@ P["sle"] = {
["glowNumber"] = 4,
["glowOffset"] = 1,
},
["corruptionText"] = {
["xOffset"] = 0,
["yOffset"] = 0,
["font"] = "PT Sans Narrow",
["fontSize"] = 12,
["fontStyle"] = "OUTLINE",
["style"] = "AMOUNT/SPELL",
["icon"] = false,
},
["background"] = {
["selectedBG"] = "Space",
["customTexture"] = "",
......
......@@ -123,7 +123,6 @@ L["Commands"] = true
L["Converts specified keywords to links that automatically invite message's author to group."] = true
L["Coordinates"] = true
L["Coords Location"] = true
L["Corruption / Resist"] = true
L["Create a button for applying selected enchant on the scroll."] = true
L["Create a button in character frame to allow temp blocking of auto set swap."] = true
L["Create a button in your bag frame to switch to deconstruction mode allowing you to easily disenchant/mill/prospect and pick locks."] = true
......
......@@ -123,7 +123,6 @@ L["Commands"] = "Commandes"
L["Converts specified keywords to links that automatically invite message's author to group."] = "Convertit des mots clés spécifiques en liens qui autorisent les invitations automatiques."
L["Coordinates"] = "Coordonnées"
L["Coords Location"] = true
L["Corruption / Resist"] = "Corruption / Résist"
L["Create a button for applying selected enchant on the scroll."] = "Créez un bouton pour appliquer l'enchantement sélectionné sur le parchemin."
L["Create a button in character frame to allow temp blocking of auto set swap."] = "Crée un bouton dans la fenêtre du personnage qui vous permet de désactiver le changement d'équipement."
L["Create a button in your bag frame to switch to deconstruction mode allowing you to easily disenchant/mill/prospect and pick locks."] = "Créez un bouton dans le cadre de votre sac pour passer en mode déconstruction, ce qui vous permet de désenchanter/broyer/prospecter et de crocheter facilement les serrures."
......
......@@ -123,7 +123,6 @@ L["Commands"] = "Befehle"
L["Converts specified keywords to links that automatically invite message's author to group."] = "Wandelt spezifische Schlüsselwörter in Links um, die dass automatische Einladen erlaubt."
L["Coordinates"] = "Koordinaten"
L["Coords Location"] = true
L["Corruption / Resist"] = true
L["Create a button for applying selected enchant on the scroll."] = true
L["Create a button in character frame to allow temp blocking of auto set swap."] = "Erzeugt einen Knopf im Charakterfenster der erlaubt das Autowechseln vom Ausrüstungsset zu deaktivieren."
L["Create a button in your bag frame to switch to deconstruction mode allowing you to easily disenchant/mill/prospect and pick locks."] = true
......
......@@ -123,7 +123,6 @@ L["Commands"] = "명령어"
L["Converts specified keywords to links that automatically invite message's author to group."] = true
L["Coordinates"] = "좌표"
L["Coords Location"] = true
L["Corruption / Resist"] = true
L["Create a button for applying selected enchant on the scroll."] = true
L["Create a button in character frame to allow temp blocking of auto set swap."] = true
L["Create a button in your bag frame to switch to deconstruction mode allowing you to easily disenchant/mill/prospect and pick locks."] = "가방 프레임에 버튼을 만들어서 뽀각 모드로 전환할 수 있게 합니다. 뽀각 모드는 마력추출/제분/보석추출/자물쇠 따기를 손쉽게 합니다."
......
......@@ -123,7 +123,6 @@ L["Commands"] = "Команды"
L["Converts specified keywords to links that automatically invite message's author to group."] = "Превращает указаные слова в ссылки, клик по которым пригласит автора сообщения в группу."
L["Coordinates"] = "Координаты"
L["Coords Location"] = "Позиция координат"
L["Corruption / Resist"] = "Порча / Резист"
L["Create a button for applying selected enchant on the scroll."] = "Создать кнопку для применнеия чар к свитку."
L["Create a button in character frame to allow temp blocking of auto set swap."] = "Создать в окне персонажа кнопку, позволяющую временно отключить автоматическую смену комплектов."
L["Create a button in your bag frame to switch to deconstruction mode allowing you to easily disenchant/mill/prospect and pick locks."] = "Создает в сумках кнопку для переключения в режим распыления, позворяющий распылять/просеивать/перетирать, а также вскрывать замки."
......
......@@ -43,73 +43,10 @@ Armory.Constants.CanTransmogrify = {
["MainHandSlot"] = true,
["SecondaryHandSlot"] = true
}
Armory.Constants.EnchantableSlots = {
["Finger0Slot"] = true, ["Finger1Slot"] = true, ["MainHandSlot"] = true, ["SecondaryHandSlot"] = true,
}
Armory.Constants.Corruption = {
["DefaultX"] = 5, ["DefaultY"] = -8,
}
--First value is not really needed. I left it for reference rerasons
Armory.Constants.CorruptionSpells = {
["6483"] = {"Avoidant", "I", 315607},
["6484"] = {"Avoidant", "II", 315608},
["6485"] = {"Avoidant", "III", 315609},
["6474"] = {"Expedient", "I", 315544},
["6475"] = {"Expedient", "II", 315545},
["6476"] = {"Expedient", "III", 315546},
["6471"] = {"Masterful", "I", 315529},
["6472"] = {"Masterful", "II", 315530},
["6473"] = {"Masterful", "III", 315531},
["6480"] = {"Severe", "I", 315554},
["6481"] = {"Severe", "II", 315557},
["6482"] = {"Severe", "III", 315558},
["6477"] = {"Versatile", "I", 315549},
["6478"] = {"Versatile", "II", 315552},
["6479"] = {"Versatile", "III", 315553},
["6493"] = {"Siphoner", "I", 315590},
["6494"] = {"Siphoner", "II", 315591},
["6495"] = {"Siphoner", "III", 315592},
["6437"] = {"Strikethrough", "I", 315277},
["6438"] = {"Strikethrough", "II", 315281},
["6439"] = {"Strikethrough", "III", 315282},
["6555"] = {"Racing Pulse", "I", 318266},
["6559"] = {"Racing Pulse", "II", 318492},
["6560"] = {"Racing Pulse", "III", 318496},
["6556"] = {"Deadly Momentum", "I", 318268},
["6561"] = {"Deadly Momentum", "II", 318493},
["6562"] = {"Deadly Momentum", "III", 318497},
["6558"] = {"Surging Vitality", "I", 318270},
["6565"] = {"Surging Vitality", "II", 318495},
["6566"] = {"Surging Vitality", "III", 318499},
["6557"] = {"Honed Mind", "I", 318269},
["6563"] = {"Honed Mind", "II", 318494},
["6564"] = {"Honed Mind", "III", 318498},
["6549"] = {"Echoing Void", "I", 318280},
["6550"] = {"Echoing Void", "II", 318485},
["6551"] = {"Echoing Void", "III", 318486},
["6552"] = {"Infinite Stars", "I", 318274},
["6553"] = {"Infinite Stars", "II", 318487},
["6554"] = {"Infinite Stars", "III", 318488},
["6547"] = {"Ineffable Truth", "I", 318303},
["6548"] = {"Ineffable Truth", "II", 318484},
["6537"] = {"Twilight Devastation", "I", 318276},
["6538"] = {"Twilight Devastation", "II", 318477},
["6539"] = {"Twilight Devastation", "III", 318478},
["6543"] = {"Twisted Appendage", "I", 318481},
["6544"] = {"Twisted Appendage", "II", 318482},
["6545"] = {"Twisted Appendage", "III", 318483},
["6540"] = {"Void Ritual", "I", 318286},
["6541"] = {"Void Ritual", "II", 318479},
["6542"] = {"Void Ritual", "III", 318480},
["6573"] = {"Gushing Wound", "", 318272},
["6546"] = {"Glimpse of Clarity", "", 318239},
["6571"] = {"Searing Flames", "", 318293},
["6572"] = {"Obsidian Skin", "", 316651},
["6567"] = {"Devour Vitality", "", 318294},
["6568"] = {"Whispered Truths", "", 316780},
["6570"] = {"Flash of Insight", "", 318299},
["6569"] = {"Lash of the Void", "", 317290},
}
Armory.Constants.AzeriteTraitAvailableColor = {0.95, 0.95, 0.32, 1}
Armory.Constants.Character_Defaults_Cached = false
......@@ -126,7 +63,6 @@ Armory.Constants.Stats = {
ScrollStepMultiplier = 5,
}
--Remembering default positions of stuff
function Armory:BuildFrameDefaultsCache(which)
for i, SlotName in pairs(Armory.Constants.GearList) do
......@@ -177,57 +113,6 @@ function Armory:GetTransmogInfo(Slot, which, unit)
end
end
function Armory:GetCorruptionInfo(Slot, which, unit)
if not Slot.itemLink then return nil end
if not which or not unit then return nil end
local window = strlower(which)
if IsCorruptedItem(Slot.itemLink) or Slot.ID == 15 then
local TooltipText
Armory:ClearTooltip(Armory.ScanTT)
Armory.ScanTT:SetInventoryItem(unit, Slot.ID)
for i = 1, Armory.ScanTT:NumLines() do
TooltipText = _G["SLE_Armory_ScanTTTextLeft"..i]:GetText()
if TooltipText:match(ITEM_MOD_CORRUPTION_RESISTANCE) then
TooltipText = gsub(TooltipText, TooltipText:match(ITEM_MOD_CORRUPTION_RESISTANCE), "")
return "res", TooltipText, nil
elseif TooltipText:match(ITEM_MOD_CORRUPTION) then
TooltipText = gsub(TooltipText, TooltipText:match(ITEM_MOD_CORRUPTION), "")
--Iteration to get corruption spell from bunus ID. Got the script from suspctz
local itemSplit = SLE:GetItemSplit(Slot.itemLink)
local bonuses = {}
local corruptionSpell = ""
for index= 1, itemSplit[13] do
bonuses[#bonuses + 1] = itemSplit[13 + index]
end
if #bonuses > 0 then
local Spells = Armory.Constants.CorruptionSpells
for i, bonus_id in pairs(bonuses) do
bonus_id = tostring(bonus_id)
if Spells[bonus_id] ~= nil then
local name, rank, icon = GetSpellInfo(Spells[bonus_id][3])
if Spells[bonus_id][2] ~= "" then rank = Spells[bonus_id][2] else rank = "" end
if E.db.sle.armory[window].corruptionText.icon then
corruptionSpell = "|T"..icon..":0|t "..name.." "..rank
else
corruptionSpell = name.." "..rank
end
end
end
end
return "cor", TooltipText, corruptionSpell
end
end
end
return false, 0, nil
end
--Updates the frame
function Armory:UpdatePageInfo(frame, which, guid, event)
if not (frame and which) then return end
......@@ -236,7 +121,6 @@ function Armory:UpdatePageInfo(frame, which, guid, event)
local unit = (which == 'Character' and 'player') or frame.unit
if which == "Character" then
CA:Update_Durability()
CA:Update_SlotCorruption()
end
for i, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G[which..SlotName]
......@@ -263,26 +147,6 @@ function Armory:UpdatePageInfo(frame, which, guid, event)
LCG.AutoCastGlow_Stop(Slot,"_TransmogGlow")
end
end
if Slot.CorText then --Setting corruption text if it actually exists for the slot
Slot.CorText:SetText("")
if E.db.sle.armory[window].corruptionText.style ~= "Hide" and E.db.sle.armory.character.enable then
local isCorruption, CorValue, CorSpell = Armory:GetCorruptionInfo(Slot, which, unit)
if isCorruption then
if isCorruption == "cor" then
if E.db.sle.armory[window].corruptionText.style == "AMOUNT/SPELL" then
CorValue = CorValue..CorSpell
elseif E.db.sle.armory[window].corruptionText.style == "SPELL" then
CorValue = CorSpell or ""
end
CorValue = "|cff956DD1"..CorValue.."|r" --Color purple
else
if E.db.sle.armory[window].corruptionText.style == "SPELL" then CorValue = "" end
CorValue = "|cffFFD100"..CorValue.."|r" --Color yellow
end
Slot.CorText:SetText(CorValue)
end
end
end
end
end
......@@ -380,19 +244,16 @@ function Armory:UpdateSharedStringsFonts(which)
local Slot = _G[which..SlotName]
if not Slot then return end
if Slot.iLvlText then
local fontIlvl, sizeIlvl, outlineIlvl, fontEnch, sizeEnch, outlineEnch, fontCor, sizeCor, outlineCor
local fontIlvl, sizeIlvl, outlineIlvl, fontEnch, sizeEnch, outlineEnch
if E.db.sle.armory[window].enable then
fontIlvl, sizeIlvl, outlineIlvl = E.db.sle.armory[window].ilvl.font, E.db.sle.armory[window].ilvl.fontSize, E.db.sle.armory[window].ilvl.fontStyle
fontEnch, sizeEnch, outlineEnch = E.db.sle.armory[window].enchant.font, E.db.sle.armory[window].enchant.fontSize, E.db.sle.armory[window].enchant.fontStyle
fontCor, sizeCor, outlineCor = E.db.sle.armory[window].corruptionText.font, E.db.sle.armory[window].corruptionText.fontSize, E.db.sle.armory[window].corruptionText.fontStyle
else
fontIlvl, sizeIlvl, outlineIlvl = E.db.general.itemLevel.itemLevelFont, E.db.general.itemLevel.itemLevelFontSize or 12, E.db.general.itemLevel.itemLevelFontOutline or "OUTLINE"
fontEnch, sizeEnch, outlineEnch = E.db.general.itemLevel.itemLevelFont, E.db.general.itemLevel.itemLevelFontSize or 12, E.db.general.itemLevel.itemLevelFontOutline or "OUTLINE"
fontCor, sizeCor, outlineCor = E.db.general.itemLevel.itemLevelFont, E.db.general.itemLevel.itemLevelFontSize or 12, E.db.general.itemLevel.itemLevelFontOutline or "OUTLINE"
end
Slot.iLvlText:FontTemplate(E.LSM:Fetch('font', fontIlvl), sizeIlvl, outlineIlvl)
Slot.enchantText:FontTemplate(E.LSM:Fetch('font', fontEnch), sizeEnch, outlineEnch)
if Slot.CorText then Slot.CorText:FontTemplate(E.LSM:Fetch('font', fontCor), sizeCor, outlineCor) end
end
end
end
......@@ -519,7 +380,6 @@ end
function Armory:UpdateCharacterInfo()
if E.db.sle.armory.character.enable then M:UpdatePageInfo(_G["CharacterFrame"], "Character") end
if not E.db.general.itemLevel.displayCharacterInfo then M:ClearPageInfo(_G["CharacterFrame"], "Character") end
-- CA:UpdateCorruptionLevel()
end
function Armory:ToggleItemLevelInfo(setupCharacterPage)
......@@ -536,18 +396,6 @@ function Armory:CheckOptions(which)
return true
end
function Armory:HandleCorruption()
if SLE._Compatibility["DejaCharacterStats"] then return end
local CorruptionIcon = _G["CharacterFrame"].SLE_Corruption
CorruptionIcon:ClearAllPoints()
CorruptionIcon:SetParent(_G["SLE_Armory_Scroll"])
if E.db.sle.armory.character.corruption.position == "SLE" and (E.db.sle.armory.character.enable or E.db.sle.armory.stats.enable) then
CorruptionIcon:SetPoint("LEFT", _G["CharacterFrame"], "TOPRIGHT", -34, -54)
else
CorruptionIcon:SetPoint("RIGHT", _G["CharacterStatsPane"].ItemLevelFrame, "RIGHT", Armory.Constants.Corruption.DefaultX, Armory.Constants.Corruption.DefaultY)
end
end
function Armory:Initialize()
if not Armory:CheckOptions() then return end
......@@ -569,7 +417,6 @@ function Armory:Initialize()
SA:LoadAndSetup()
Armory:UpdateCharacterInfo()
end
if _G["CharacterFrame"].SLE_Corruption then _G["CharacterFrame"].SLE_Corruption:SetFrameLevel(_G["CharacterStatsPane"].ItemLevelFrame:GetFrameLevel() + 5) end --This fixes wrong mouseover for blizz position of the eye
if Armory:CheckOptions("Inspect") then
IA = SLE:GetModule("Armory_Inspect")
......
......@@ -137,10 +137,6 @@ function CA:BuildLayout()
Slot.TransmogInfo:Hide()
end
--<<Corruption>>--
Slot["CorText"] = Slot:CreateFontString(nil, "OVERLAY")
Slot["CorText"]:FontTemplate(E.LSM:Fetch('font', E.db.sle.armory.character.corruptionText.font), E.db.sle.armory.character.corruptionText.fontSize, E.db.sle.armory.character.corruptionText.fontStyle)
end
--<<<Hooking some shit!>>>--
......@@ -169,43 +165,6 @@ function CA:BuildLayout()
_G["CharacterLevelText"]:SetParent(_G["CharacterFrame"])
end
end)
if SLE._Compatibility["DejaCharacterStats"] then return end
--<<Corruption>>--
_G["CharacterFrame"].SLE_Corruption = CreateFrame("Frame", "SLE_CharacterCorruptionButton", _G["CharacterFrame"])
_G["CharacterFrame"].SLE_Corruption.ThrottleRating = false
_G["CharacterFrame"].SLE_Corruption:SetSize(48, 80)
_G["CharacterFrame"].SLE_Corruption:SetPoint("RIGHT", _G["CharacterStatsPane"].ItemLevelFrame, "RIGHT", Armory.Constants.Corruption.DefaultX, Armory.Constants.Corruption.DefaultY) --Default for blizz corruption
_G["CharacterFrame"].SLE_Corruption:SetScript("OnEnter", CharacterFrameCorruption_OnEnter)
_G["CharacterFrame"].SLE_Corruption:SetScript("OnLeave", CharacterFrameCorruption_OnLeave)
_G["CharacterFrame"].SLE_Corruption:SetScript("OnEvent", function(self, event, ...)
CharacterFrameCorruption_OnEvent(self, event)
CA:UpdateCorruptionLevel()
end)
if SLE._Compatibility["CorruptionTooltips"] then
local CT = LibStub("AceAddon-3.0"):GetAddon("CorruptionTooltips")
local Summary = CT:GetModule("Summary")
Summary:SecureHookScript(_G["CharacterFrame"].SLE_Corruption, "OnEnter", "SummaryEnter")
Summary:SecureHookScript(_G["CharacterFrame"].SLE_Corruption, "OnLeave", "SummaryLeave")
end
--deal with the events
_G["CharacterFrame"].SLE_Corruption:RegisterEvent("COMBAT_RATING_UPDATE");
_G["CharacterFrame"].SLE_Corruption:RegisterEvent("PLAYER_ENTERING_WORLD");
-- _G["CharacterFrame"].SLE_Corruption:RegisterEvent("SPELL_TEXT_UPDATE");
_G["CharacterStatsPane"].ItemLevelFrame.Corruption:UnregisterEvent("COMBAT_RATING_UPDATE");
_G["CharacterStatsPane"].ItemLevelFrame.Corruption:UnregisterEvent("PLAYER_ENTERING_WORLD");
_G["CharacterStatsPane"].ItemLevelFrame.Corruption:UnregisterEvent("SPELL_TEXT_UPDATE");
_G["CharacterStatsPane"].ItemLevelFrame.Corruption:SetScript("OnEvent", nil)
_G["CharacterStatsPane"].ItemLevelFrame.Corruption:Hide()
_G["CharacterFrame"].SLE_Corruption.Eye = _G["CharacterFrame"].SLE_Corruption:CreateTexture(nil, "OVERLAY")
_G["CharacterFrame"].SLE_Corruption.Eye:SetInside()
_G["CharacterFrame"].SLE_Corruption.Eye:SetAtlas("Nzoth-charactersheet-icon")
_G["CharacterFrame"].SLE_Corruption.Level = _G["CharacterFrame"].SLE_Corruption:CreateFontString(nil, "OVERLAY")
_G["CharacterFrame"].SLE_Corruption.Level:SetPoint("CENTER", _G["CharacterFrame"].SLE_Corruption, "CENTER", 1 + E.db.sle.armory.character.corruption.xOffset, 8 + E.db.sle.armory.character.corruption.yOffset)
end
function CA:Calculate_Durability(which, Slot)
......@@ -259,17 +218,6 @@ function CA:Update_Enchant()
end
end
function CA:Update_SlotCorruption()
for i, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G["Character"..SlotName]
if Slot.CorText then
Slot.CorText:ClearAllPoints()
Slot.CorText:Point("TOP"..Slot.Direction, Slot, "TOP"..(Slot.Direction == "LEFT" and "RIGHT" or "LEFT"), Slot.Direction == "LEFT" and 25+E.db.sle.armory.character.corruptionText.xOffset or -25-E.db.sle.armory.character.corruptionText.xOffset, -1+E.db.sle.armory.character.corruptionText.yOffset)
end
end
end
function CA:Update_Gems()
for i, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G["Character"..SlotName]
......@@ -303,33 +251,6 @@ function CA:ElvOverlayToggle() --Toggle dat Overlay
end
end
function CA:UpdateCorruptionText()
if SLE._Compatibility["DejaCharacterStats"] then return end
if not _G["CharacterFrame"].SLE_Corruption then return end
local fontIlvl, sizeIlvl, outlineIlvl = E.db.sle.armory.character.corruption.font, E.db.sle.armory.character.corruption.fontSize, E.db.sle.armory.character.corruption.fontStyle
_G["CharacterFrame"].SLE_Corruption.Level:FontTemplate(E.LSM:Fetch('font', fontIlvl), sizeIlvl, outlineIlvl)
_G["CharacterFrame"].SLE_Corruption.Level:SetPoint("CENTER", _G["CharacterFrame"].SLE_Corruption, "CENTER", 1 + E.db.sle.armory.character.corruption.xOffset, 8 + E.db.sle.armory.character.corruption.yOffset)
CA.CorruptionFontSet = true
end
function CA:UpdateCorruptionLevel()
if SLE._Compatibility["DejaCharacterStats"] then return end --Shouldn't be required, just in case
if not CA.CorruptionFontSet then return end
local corruption = GetCorruption();
local corruptionResistance = GetCorruptionResistance();
local totalCorruption = math.max(corruption - corruptionResistance, 0);
local isColor = E.db.sle.armory.character.corruption.valueColor
if E.db.sle.armory.character.corruption.style == "TOTAL" then
local CorColor = isColor and (totalCorruption > 0 and "ff0000" or "00ff00") or "ffffff"
_G["CharacterFrame"].SLE_Corruption.Level:SetText("|cff"..CorColor..totalCorruption.."|r")
elseif E.db.sle.armory.character.corruption.style == "COR-RES" then
_G["CharacterFrame"].SLE_Corruption.Level:SetText("|cff"..(isColor and "ff0000" or "ffffff")..corruption.."|r / |cff"..(isColor and "00ff00" or "ffffff")..corruptionResistance.."|r")
elseif E.db.sle.armory.character.corruption.style == "Hide" then
_G["CharacterFrame"].SLE_Corruption.Level:SetText("")
end
end
--Fuck blizzard and theur moon logic
function CA:FixFuckingBlizzardLogic()
local milestones = C_AzeriteEssence.GetMilestones();
......@@ -384,7 +305,6 @@ function CA:Enable()
CA:Update_ItemLevel()
CA:Update_Enchant()
CA:Update_Gems()
CA:Update_SlotCorruption()
CA:Update_Durability()
if E.db.general.itemLevel.displayCharacterInfo then M:UpdatePageInfo(_G["CharacterFrame"], "Character") end
......@@ -413,7 +333,7 @@ function CA:Disable()
_G["CharacterModelFrame"].backdrop:Show()
CA:Update_Durability() --Required for elements update
for i, SlotName in pairs(Armory.Constants.GearList) do
for _, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G["Character"..SlotName]
if Armory.Constants.Character_Defaults[SlotName] then
for element, points in pairs(Armory.Constants.Character_Defaults[SlotName]) do
......@@ -438,10 +358,8 @@ function CA:ToggleArmory()
CA:Disable()
end
M:UpdateInspectPageFonts("Character")
CA:UpdateCorruptionText()
Armory:HandleCorruption()
for i, SlotName in pairs(Armory.Constants.AzeriteSlot) do PaperDollItemSlotButton_Update(_G["Character"..SlotName]) end
for _, SlotName in pairs(Armory.Constants.AzeriteSlot) do PaperDollItemSlotButton_Update(_G["Character"..SlotName]) end
end
function CA:LoadAndSetup()
......
......@@ -97,10 +97,6 @@ function IA:BuildLayout()
Slot.TransmogInfo:Hide()
end
--<<Corruption>>--
Slot["CorText"] = Slot:CreateFontString(nil, "OVERLAY")
Slot["CorText"]:FontTemplate(E.LSM:Fetch('font', E.db.sle.armory.inspect.corruptionText.font), E.db.sle.armory.inspect.corruptionText.fontSize, E.db.sle.armory.inspect.corruptionText.fontStyle)
end
do --<<Check Transmog>>--
......@@ -174,18 +170,6 @@ function IA:Update_Enchant()
end
end
function IA:Update_SlotCorruption()
for i, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G["Inspect"..SlotName]
if not Slot then return end
if Slot.CorText then
Slot.CorText:ClearAllPoints()
Slot.CorText:Point("TOP"..Slot.Direction, Slot, "TOP"..(Slot.Direction == "LEFT" and "RIGHT" or "LEFT"), Slot.Direction == "LEFT" and 25+E.db.sle.armory.inspect.corruptionText.xOffset or -25-E.db.sle.armory.inspect.corruptionText.xOffset, -1+E.db.sle.armory.inspect.corruptionText.yOffset)
end
end
end
function IA:Update_Gems()
for i, SlotName in pairs(Armory.Constants.GearList) do
local Slot = _G["Inspect"..SlotName]
......@@ -248,7 +232,6 @@ function IA:Enable()
IA:Update_ItemLevel()
IA:Update_Enchant()
IA:Update_Gems()
IA:Update_SlotCorruption()
if E.db.general.itemLevel.displayInspectInfo then M:UpdateInspectInfo() end
end
......
......@@ -322,7 +322,6 @@ function SA:ToggleArmory()
if not E.db.general.itemLevel.displayCharacterInfo then
_G["CharacterFrame"].ItemLevelText:SetText('')
end
Armory:HandleCorruption()
end
--Replacing broken Blizz function and adding some decimals
......
......@@ -56,78 +56,6 @@ local function configTable()
get = function() return E.db.sle.armory.stats.enable end,
set = function(_, value) E.db.sle.armory.stats.enable = value; SLE:GetModule("Armory_Stats"):ToggleArmory(); end
},
corruption = {
type = 'group',
name = GetSpellInfo(172),
order = 13,
get = function(info) return E.db.sle.armory.character[(info[#info - 1])][(info[#info])] end,
set = function(info, value) E.db.sle.armory.character[(info[#info - 1])][(info[#info])] = value; SLE:GetModule("Armory_Character"):UpdateCorruptionText(); SLE:GetModule("Armory_Character"):UpdateCorruptionLevel() end,
disabled = function() return not (E.db.sle.armory.character.enable or E.db.sle.armory.stats.enable or SLE._Compatibility["DejaCharacterStats"]) end,
args = {
position = {
type = 'select',
name = L["Position"],
order = 1,
set = function(info, value) E.db.sle.armory.character[(info[#info - 1])][(info[#info])] = value; Armory:HandleCorruption() end,
values = {
["SLE"] = "S&L",
["BLIZZARD"] = "Blizzard",
},
},
valueColor = {
type = 'toggle',
name = L["Value Color"],
order = 2,
},
style = {
type = 'select',
name = L["Text Format"],
order = 3,
values = {
["TOTAL"] = TOTAL,
["COR-RES"] = L["Corruption / Resist"],
["Hide"] = HIDE,
},
},
spacer1 = ACH:Spacer(4),
xOffset = {
type = 'range',
name = L["X-Offset"],
order = 10,
min = -10, max = 70, step = 1,
},
yOffset = {
type = 'range',
name = L["Y-Offset"],
order = 11,
min = -40, max = 40, step = 1,
},
spacer2 = ACH:Spacer(15),
font = {
type = 'select', dialogControl = 'LSM30_Font',
name = L["Font"],
order = 20,
values = function() return AceGUIWidgetLSMlists and AceGUIWidgetLSMlists.font or {} end,
},
fontSize = {
type = 'range',
name = L["Font Size"],
order = 21,
min = 6, max = 32, step = 1,
},
fontStyle = {
type = 'select',
name = L["Font Outline"],
order = 22,
values = {
NONE = NONE,
OUTLINE = 'OUTLINE',
MONOCHROMEOUTLINE = 'MONOCROMEOUTLINE',