From b5fcf2bb76bd63d61bf359879863b93c698260a6 Mon Sep 17 00:00:00 2001 From: Repooc Date: Mon, 13 Oct 2014 00:38:50 -0400 Subject: [PATCH] Some character frame changes (NOT DONE, DO NOT REPORT ERRORS TO ME... or die bitches) Signed-off-by: Repooc --- ElvUI_SLE/defaults/profile.lua | 1 + ElvUI_SLE/media/textures/Gradation.tga | Bin 0 -> 65580 bytes .../modules/characterframe/characterframe.lua | 578 ++++++++++++-------- ElvUI_SLE/modules/characterframe/core.lua | 56 +- ElvUI_SLE/options/characterframe_c.lua | 4 +- 5 files changed, 378 insertions(+), 261 deletions(-) create mode 100644 ElvUI_SLE/media/textures/Gradation.tga diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua index 6f8c8c1..7c80869 100644 --- a/ElvUI_SLE/defaults/profile.lua +++ b/ElvUI_SLE/defaults/profile.lua @@ -73,6 +73,7 @@ P['sle'] = { ['characterframeoptions'] = { ['shownormalgradient'] = true, ['showerrorgradient'] = true, + ['gradientColor'] = { .41, .83, 1 }, ['showimage'] = true, ['image'] = { ['dropdown'] = "SPACE", diff --git a/ElvUI_SLE/media/textures/Gradation.tga b/ElvUI_SLE/media/textures/Gradation.tga new file mode 100644 index 0000000000000000000000000000000000000000..422ce5a7f1e65d6a2b003dfa48c486841a501e7d GIT binary patch literal 65580 zcmeFz3Dl0|-thn1JkRqy4;xVk5z5eDp(4Xy9z`Y9D=TFy7FPIcw07G|GW1|qYEfAV zJtUD*Nkk+{lt`2^C6f35IsA|FeXsXg_bp}bXZH-(TA%xO9LITH*L~Y-f6uFojO-cz z`<3mojH-F<{#W#i8Jvnvnm=odebLwE9=>8XU$Bdv z?BFxDvyD&K$`&^B5g)RF^?blO*76?jvWB-=%_>&1g4bEjGM4fxi&@0WEMx&M@gno0 z=ghf0%QMVjHnW(Sk&$f%(|MAqOkpyUcs!bDKE|Uw%!5o|JmVP47)CRSk&NJehBJ(N z85#{S?_w}_ayx?<$gSMMfQ*dn{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ywf~j& znf3pw^U#0r{}og3C;$R65J2}r3ih@uEQsP43rjCx=Mlut##`8ULT8G=BK}apVo1{G z&4SqeXWUQxPq4~}{}DSoK>QEb>Ay$z{IdgW{~hkF{}#5d{5L!PYj|hQ{3o!^4mk23 zz`RDz{QEckdsYX~zu5oUzjT1@pZ34>Py28Ei+#>N{Nv@7%F{xZCNpv5RDlV#t5%CO BI6VLW literal 0 HcmV?d00001 diff --git a/ElvUI_SLE/modules/characterframe/characterframe.lua b/ElvUI_SLE/modules/characterframe/characterframe.lua index efd6b01..199792c 100644 --- a/ElvUI_SLE/modules/characterframe/characterframe.lua +++ b/ElvUI_SLE/modules/characterframe/characterframe.lua @@ -1,10 +1,10 @@ -local E, L, V, P, G = unpack(ElvUI); -local CFO = E:GetModule('CharacterFrameOptions'); +local E, L, V, P, G = unpack(ElvUI) +local CFO = E:GetModule('CharacterFrameOptions') local LSM = LibStub("LibSharedMedia-3.0") -local f = CreateFrame('Frame', 'SLEArmory', PaperDollFrame) +local CA = CreateFrame('Frame', 'CharacterArmory', PaperDollFrame) +local SlotIDList = {} local C = SLArmoryConstants - local backgrounds = { ["SPACE"] = "Space", ["ALLIANCE"] = "Alliance-text", @@ -13,68 +13,195 @@ local backgrounds = { ["CASTLE"] = "Castle", } -local function GemSocket_OnClick(self, button) - self = self:GetParent() - - if CursorHasItem() then - local CursorType, _, ItemLink = GetCursorInfo() - - -- Check cursor item is gem type - if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then - SocketInventoryItem(GetInventorySlotInfo(self.slotName)) - ClickSocketButton(self.socketNumber) - - return +do --<< Button Script >>-- + CA.OnEnter = function(self) + if self.Link or self.Message then + GameTooltip:SetOwner(self, 'ANCHOR_RIGHT') + + self:SetScript('OnUpdate', function() + GameTooltip:ClearLines() + + if self.Link then + GameTooltip:SetHyperlink(self.Link) + end + + if self.Link and self.Message then GameTooltip:AddLine(' ') end -- Line space + + if self.Message then + GameTooltip:AddLine(self.Message, 1, 1, 1) + end + + GameTooltip:Show() + end) end end - - if self.GemItemID then - local itemName, itemLink = GetItemInfo(self.GemItemID) - - if not IsShiftKeyDown() then - SetItemRef(itemLink, itemLink, 'LeftButton') - else - if button == 'RightButton' then + + CA.OnLeave = function(self) + self:SetScript('OnUpdate', nil) + GameTooltip:Hide() + end + + CA.GemSocket_OnEnter = function(self) + GameTooltip:SetOwner(self, 'ANCHOR_RIGHT') + + local Parent = self:GetParent() + + if Parent.GemItemID then + if type(Parent.GemItemID) == 'number' then + if GetItemInfo(Parent.GemItemID) then + GameTooltip:SetHyperlink(select(2, GetItemInfo(Parent.GemItemID))) + else + self:SetScript('OnUpdate', function() + if GetItemInfo(Parent.GemItemID) then + CA.GemSocket_OnEnter(self) + self:SetScript('OnUpdate', nil) + end + end) + return + end + else + GameTooltip:ClearLines() + GameTooltip:AddLine('|cffffffff'..Parent.GemItemID) + end + elseif Parent.GemType then + GameTooltip:ClearLines() + GameTooltip:AddLine('|cffffffff'.._G['EMPTY_SOCKET_'..Parent.GemType]) + end + + GameTooltip:Show() + end + + CA.GemSocket_OnClick = function(self, button) + self = self:GetParent() + + if CursorHasItem() then + local CursorType, _, ItemLink = GetCursorInfo() + + -- Check cursor item is gem type + if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then SocketInventoryItem(GetInventorySlotInfo(self.slotName)) - elseif HandleModifiedItemClick(itemLink) then - elseif BrowseName and BrowseName:IsVisible() then - AuctionFrameBrowse_Reset(BrowseResetButton) - BrowseName:SetText(itemName) - BrowseName:SetFocus() + ClickSocketButton(self.socketNumber) + + return + end + end + + if self.GemItemID then + local itemName, itemLink = GetItemInfo(self.GemItemID) + + if not IsShiftKeyDown() then + SetItemRef(itemLink, itemLink, 'LeftButton') + else + if button == 'RightButton' then + SocketInventoryItem(GetInventorySlotInfo(self.slotName)) + elseif HandleModifiedItemClick(itemLink) then + elseif BrowseName and BrowseName:IsVisible() then + AuctionFrameBrowse_Reset(BrowseResetButton) + BrowseName:SetText(itemName) + BrowseName:SetFocus() + end end end end -end - -local function GemSocket_OnRecieveDrag(self) - self = self:GetParent() - - if CursorHasItem() then - local CursorType, _, ItemLink = GetCursorInfo() - - if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then - SocketInventoryItem(GetInventorySlotInfo(self.slotName)) - ClickSocketButton(self.socketNumber) + + CA.GemSocket_OnRecieveDrag = function(self) + self = self:GetParent() + + if CursorHasItem() then + local CursorType, _, ItemLink = GetCursorInfo() + + if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then + SocketInventoryItem(GetInventorySlotInfo(self.slotName)) + ClickSocketButton(self.socketNumber) + end end end end -local function CreateArmoryFrame(self) +function CA:Setup_CharacterArmory() --<< Core >>-- self:Point('TOPLEFT', CharacterFrameInset, 10, 20) self:Point('BOTTOMRIGHT', CharacterFrameInsetRight, 'BOTTOMLEFT', -10, 5) + --<< Updater >>-- + local args + self:SetScript('OnEvent', function(self, Event, ...) + if Event == 'SOCKET_INFO_SUCCESS' or Event == 'ITEM_UPGRADE_MASTER_UPDATE' or Event == 'TRANSMOGRIFY_UPDATE' or Event == 'PLAYER_ENTERING_WORLD' then + if Event == 'TRANSMOGRIFY_UPDATE' then + print(...) + end + self.GearUpdated = nil + self:SetScript('OnUpdate', self.CharacterArmory_DataSetting) + elseif Event == 'UNIT_INVENTORY_CHANGED' then + args = ... + + if args == 'player' then + self.GearUpdated = nil + self:SetScript('OnUpdate', self.CharacterArmory_DataSetting) + end + elseif Event == 'PLAYER_EQUIPMENT_CHANGED' then + args = ... + + self.GearUpdated = type(self.GearUpdated) == 'table' and self.GearUpdated or {} + self.GearUpdated[#self.GearUpdated + 1] = SlotIDList[args] + self:SetScript('OnUpdate', self.CharacterArmory_DataSetting) + elseif Event == 'COMBAT_LOG_EVENT_UNFILTERED' then + _, Event, _, _, _, _, _, _, args = ... + + if Event == 'ENCHANT_APPLIED' and args == E.myname then + self.GearUpdated = nil + self:SetScript('OnUpdate', self.CharacterArmory_DataSetting) + end + elseif Event == 'UPDATE_INVENTORY_DURABILITY' then + self.DurabilityUpdated = nil + self:SetScript('OnUpdate', self.CharacterArmory_DataSetting) + end + end) + hooksecurefunc('CharacterFrame_Collapse', function() + CharacterFrame:SetWidth(448); + end) + hooksecurefunc('CharacterFrame_Expand', function() + CharacterFrame:SetWidth(650); + end) + hooksecurefunc('PaperDollFrame_SetLevel', function() + CharacterLevelText:SetText('|c'..RAID_CLASS_COLORS[E.myclass].colorStr..CharacterLevelText:GetText()) + + --Maybe Adjust Name, Level, Avg iLvL if bliz skinning is off? + CharacterFrameTitleText:ClearAllPoints() + CharacterFrameTitleText:Point('TOP', self, 'TOP', 0, 0) + CharacterFrameTitleText:SetParent(self) + CharacterLevelText:ClearAllPoints() + CharacterLevelText:SetPoint('TOP', CharacterFrameTitleText, 'BOTTOM', 0, 3) + CharacterLevelText:SetParent(self) + end) + --hooksecurefunc('CharacterFrame_Collapse', function() if Info.CharacterArmory_Activate then CharacterFrame:SetWidth(448) end end) + --hooksecurefunc('CharacterFrame_Expand', function() if Info.CharacterArmory_Activate then CharacterFrame:SetWidth(650) end end) + --hooksecurefunc('PaperDollFrame_SetLevel', function() + --if Info.CharacterArmory_Activate then + --CharacterLevelText:SetText('|c'..RAID_CLASS_COLORS[E.myclass].colorStr..CharacterLevelText:GetText()) + + --Maybe Adjust Name, Level, Avg iLvL if bliz skinning is off? + --CharacterFrameTitleText:ClearAllPoints() + --CharacterFrameTitleText:Point('TOP', self, 0, 15) + --CharacterFrameTitleText:SetParent(self) + --CharacterLevelText:ClearAllPoints() + --CharacterLevelText:SetPoint('TOP', CharacterFrameTitleText, 'BOTTOM', 0, -4) + --CharacterLevelText:SetParent(self) + --end + --end) + --<< Background >>-- self.BG = self:CreateTexture(nil, 'BACKGROUND') --self.BG:SetInside() self.BG:SetPoint("TOPLEFT", self, "TOPLEFT", -7, -20) self.BG:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 7, 2) + CFO:UpdateCharacterBG() --<< Change Model Frame's frameLevel >>-- CharacterModelFrame:SetFrameLevel(self:GetFrameLevel() + 2) --<< Average Item Level >>-- - C.Toolkit.TextSetting(self, nil, { ['Tag'] = 'AverageItemLevel', ['FontSize'] = 12, }, 'TOP', CharacterLevelText, 'BOTTOM', 0, 3) + C.Toolkit.TextSetting(self, nil, { Tag = 'AverageItemLevel', FontSize = 12, }, 'TOP', CharacterLevelText, 'BOTTOM', 0, 3) local function ValueColorUpdate() self.AverageItemLevel:SetText(C.Toolkit.Color_Value(L['Average'])..': '..format('%.2f', select(2, GetAverageItemLevel()))) end @@ -100,28 +227,28 @@ local function CreateArmoryFrame(self) Slot.Gradation:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Gradation') if Slot.Direction == 'LEFT' then - Slot.Gradation:SetTexCoord(0, .5, 0, .5) + Slot.Gradation:SetTexCoord(0, 1, 0, 1) else - Slot.Gradation:SetTexCoord(.5, 1, 0, .5) + Slot.Gradation:SetTexCoord(1, 0, 0, 1) end if slotName ~= 'ShirtSlot' and slotName ~= 'TabardSlot' then -- Item Level - C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'ItemLevel', ['FontSize'] = 10, ['directionH'] = Slot.Direction, }, 'TOP'..Slot.Direction, _G['Character'..slotName], 'TOP'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, -1) + C.Toolkit.TextSetting(Slot, nil, { Tag = 'ItemLevel', FontSize = 10, directionH = Slot.Direction, }, 'TOP'..Slot.Direction, _G['Character'..slotName], 'TOP'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, -1) -- Enchantment Name - C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'ItemEnchant', ['FontSize'] = 8, ['directionH'] = Slot.Direction, }, Slot.Direction, _G['Character'..slotName], Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 2 or -2, 1) + C.Toolkit.TextSetting(Slot, nil, { Tag = 'ItemEnchant', FontSize = 8, directionH = Slot.Direction, }, Slot.Direction, _G['Character'..slotName], Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 2 or -2, 1) Slot.EnchantWarning = CreateFrame('Button', nil, Slot) Slot.EnchantWarning:Size(E.db.sle.characterframeoptions.itemenchant.warningSize) Slot.EnchantWarning.Texture = Slot.EnchantWarning:CreateTexture(nil, 'OVERLAY') Slot.EnchantWarning.Texture:SetInside() Slot.EnchantWarning.Texture:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Warning-Small') Slot.EnchantWarning:Point(Slot.Direction, Slot.ItemEnchant, Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 3 or -3, 0) - Slot.EnchantWarning:SetScript('OnEnter', C.CommonScript.OnEnter) - Slot.EnchantWarning:SetScript('OnLeave', C.CommonScript.OnLeave) + Slot.EnchantWarning:SetScript('OnEnter', self.OnEnter) + Slot.EnchantWarning:SetScript('OnLeave', self.OnLeave) -- Durability - C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'Durability', ['FontSize'] = 10, ['directionH'] = Slot.Direction, }, 'BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, 3) + C.Toolkit.TextSetting(Slot, nil, { Tag = 'Durability', FontSize = 10, directionH = Slot.Direction, }, 'BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, 3) -- Gem Socket for i = 1, MAX_NUM_SOCKETS do @@ -150,10 +277,10 @@ local function CreateArmoryFrame(self) Slot['Socket'..i].Socket:SetInside() Slot['Socket'..i].Socket:SetFrameLevel(Slot['Socket'..i]:GetFrameLevel() + 1) Slot['Socket'..i].Socket:RegisterForClicks('AnyUp') - Slot['Socket'..i].Socket:SetScript('OnEnter', C.CommonScript.OnEnter) - Slot['Socket'..i].Socket:SetScript('OnLeave', C.CommonScript.OnLeave) - Slot['Socket'..i].Socket:SetScript('OnClick', GemSocket_OnClick) - Slot['Socket'..i].Socket:SetScript('OnReceiveDrag', GemSocket_OnRecieveDrag) + Slot['Socket'..i].Socket:SetScript('OnEnter', self.OnEnter) + Slot['Socket'..i].Socket:SetScript('OnLeave', self.OnLeave) + Slot['Socket'..i].Socket:SetScript('OnClick', self.GemSocket_OnClick) + Slot['Socket'..i].Socket:SetScript('OnReceiveDrag', self.GemSocket_OnRecieveDrag) Slot['Socket'..i].Texture = Slot['Socket'..i].Socket:CreateTexture(nil, 'OVERLAY') Slot['Socket'..i].Texture:SetTexCoord(.1, .9, .1, .9) @@ -169,85 +296,109 @@ local function CreateArmoryFrame(self) Slot.SocketWarning.Texture = Slot.SocketWarning:CreateTexture(nil, 'OVERLAY') Slot.SocketWarning.Texture:SetInside() Slot.SocketWarning.Texture:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Warning-Small') - Slot.SocketWarning:SetScript('OnEnter', C.CommonScript.OnEnter) - Slot.SocketWarning:SetScript('OnLeave', C.CommonScript.OnLeave) + Slot.SocketWarning:SetScript('OnEnter', self.OnEnter) + Slot.SocketWarning:SetScript('OnLeave', self.OnLeave) end + SlotIDList[Slot.ID] = slotName self[slotName] = Slot end -- GameTooltip for counting gem sockets and getting enchant effects - self.ScanTTForEnchanting1 = CreateFrame('GameTooltip', 'SLEArmoryScanTT_E1', nil, 'GameTooltipTemplate') - self.ScanTTForEnchanting1:SetOwner(UIParent, 'ANCHOR_NONE') - - -- GameTooltip for checking that texture in tooltip is socket texture - self.ScanTTForEnchanting2 = CreateFrame('GameTooltip', 'SLEArmoryScanTT_E2', nil, 'GameTooltipTemplate') - self.ScanTTForEnchanting2:SetOwner(UIParent, 'ANCHOR_NONE') + self.ScanTT = CreateFrame('GameTooltip', 'SLE_CharacterArmory_ScanTT', nil, 'GameTooltipTemplate') + self.ScanTT:SetOwner(UIParent, 'ANCHOR_NONE') -- For resizing paper doll frame when it toggled. self.ChangeCharacterFrameWidth = CreateFrame('Frame') self.ChangeCharacterFrameWidth:SetScript('OnShow', function() if PaperDollFrame:IsVisible() then - CFO:ArmoryFrame_DataSetting() + self:CharacterArmory_DataSetting() end end) - CreateArmoryFrame = nil + self.Setup_CharacterArmory = nil end -function CFO:ChangeGradiantVisibility() - for _, slotName in pairs(C.GearList) do - if E.db.sle.characterframeoptions.shownormalgradient ~= false then - f[slotName].Gradation:Show() - else - f[slotName].Gradation:Hide() - end +local needUpdate +function CA:CharacterArmory_DataSetting() + if not self:IsVisible() then return end + + needUpdate = nil + + if not self.DurabilityUpdated then + needUpdate = self:Update_Durability() or needUpdate + end + + if self.GearUpdated ~= true then + needUpdate = self:Update_Gear() or needUpdate + end + + if not needUpdate then + self:SetScript('OnUpdate', nil) end end -function CFO:ResizeErrorIcon() +function CA:Update_Durability() + local Slot, r, g, b, CurrentDurability, MaxDurability + for _, slotName in pairs(C.GearList) do - if slotName ~= 'ShirtSlot' and slotName ~= 'TabardSlot' then - f[slotName].SocketWarning:Size(E.db.sle.characterframeoptions.itemgem.warningSize) - f[slotName].EnchantWarning:Size(E.db.sle.characterframeoptions.itemenchant.warningSize) - for i = 1, MAX_NUM_SOCKETS do - f[slotName]['Socket'..i]:Size(E.db.sle.characterframeoptions.itemgem.socketSize) + Slot = self[slotName] + CurrentDurability, MaxDurability = GetInventoryItemDurability(Slot.ID) + + if CurrentDurability and MaxDurability then + if E.db.sle.characterframeoptions.itemdurability.show ~= false then + r, g, b = E:ColorGradient((CurrentDurability / MaxDurability), 1, 0, 0, 1, 1, 0, 0, 1, 0) + Slot.Durability:SetFormattedText("%s%.0f%%|r", E:RGBToHex(r, g, b), (CurrentDurability / MaxDurability) * 100) + Slot.Socket1:Point('BOTTOM'..Slot.Direction, Slot.Durability, 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, -2) end + elseif Slot.Durability then + Slot.Durability:SetText('') + Slot.Socket1:Point('BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 3) end end + + self.DurabilityUpdated = true end -function CFO:ArmoryFrame_DataSetting() - if not f:IsVisible() then return end +function CA:ClearTooltip(tooltip) + local tooltipName = tooltip:GetName() - local BGdrop = E.db.sle.characterframeoptions.image.dropdown + tooltip:ClearLines() + for i = 1, 10 do + _G[tooltipName..'Texture'..i]:SetTexture(nil) + _G[tooltipName..'Texture'..i]:ClearAllPoints() + _G[tooltipName..'Texture'..i]:Point('TOPLEFT', tooltip) + end +end +function CA:Update_Gear() + --if not CA:IsVisible() then return end + print("yep") -- Get Player Profession local Prof1, Prof2 = GetProfessions() local Prof1_Level, Prof2_Level = 0, 0 - CFO.PlayerProfession = {} + self.PlayerProfession = {} if Prof1 then Prof1, _, Prof1_Level = GetProfessionInfo(Prof1) end if Prof2 then Prof2, _, Prof2_Level = GetProfessionInfo(Prof2) end - if Prof1 and C.ProfessionList[Prof1] then CFO.PlayerProfession[(C.ProfessionList[Prof1].Key)] = Prof1_Level end - if Prof2 and C.ProfessionList[Prof2] then CFO.PlayerProfession[(C.ProfessionList[Prof2].Key)] = Prof2_Level end + if Prof1 and C.ProfessionList[Prof1] then self.PlayerProfession[(C.ProfessionList[Prof1].Key)] = Prof1_Level end + if Prof2 and C.ProfessionList[Prof2] then self.PlayerProfession[(C.ProfessionList[Prof2].Key)] = Prof2_Level end - local ErrorDetected + local ErrorDetected, needUpdate, needUpdateList local r, g, b - local Slot, ItemLink, ItemRarity, BasicItemLevel, TrueItemLevel, ItemUpgradeID, ItemTexture, IsEnchanted, UsableEffect, CurrentLineText, GemID, GemTotal_1, GemTotal_2, GemCount, CurrentDurability, MaxDurability - local arg1, itemID, enchantID, _, _, _, _, arg2, arg3, arg4, arg5, arg6 + local Slot, ItemLink, ItemData, ItemRarity, BasicItemLevel, TrueItemLevel, ItemUpgradeID, ItemTexture, IsEnchanted, UsableEffect, CurrentLineText, GemID, GemCount_Default, GemCount_Enable, GemCount_Now, GemCount - for _, slotName in pairs(C.GearList) do + for _, slotName in pairs(self.GearUpdated or C.GearList) do if not (slotName == 'ShirtSlot' or slotName == 'TabardSlot') then - Slot = f[slotName] - Slot:EnableMouse(true) + Slot = self[slotName] + ItemLink = GetInventoryItemLink('player', Slot.ID) + --Slot:EnableMouse(true) do --<< Clear Setting >>-- - ErrorDetected, TrueItemLevel, IsEnchanted, UsableEffect, ItemRarity, ItemUpgradeID, ItemTexture = nil, nil, nil, nil, nil, nil, nil + needUpdate, ErrorDetected, TrueItemLevel, IsEnchanted, UsableEffect, ItemUpgradeID, ItemTexture = nil, nil, nil, nil, nil, nil, nil Slot.ItemLevel:SetText(nil) Slot.ItemEnchant:SetText(nil) - Slot.Durability:SetText('') for i = 1, MAX_NUM_SOCKETS do Slot['Socket'..i].Texture:SetTexture(nil) Slot['Socket'..i].Socket.Link = nil @@ -256,56 +407,56 @@ function CFO:ArmoryFrame_DataSetting() Slot['Socket'..i]:Hide() end - Slot.Socket1:Point('BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 0) + --Slot.Socket1:Point('BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 0) Slot.EnchantWarning:Hide() Slot.EnchantWarning.Message = nil Slot.SocketWarning:Point(Slot.Direction, Slot.Socket1) Slot.SocketWarning:Hide() Slot.SocketWarning.Link = nil Slot.SocketWarning.Message = nil - - f.ScanTTForEnchanting1:ClearLines() - f.ScanTTForEnchanting2:ClearLines() - for i = 1, 10 do - _G['SLEArmoryScanTT_E1Texture'..i]:SetTexture(nil) - _G['SLEArmoryScanTT_E2Texture'..i]:SetTexture(nil) - end end - ItemLink = GetInventoryItemLink('player', Slot.ID) - if ItemLink then do --<< Gem Parts >>-- - arg1, itemID, enchantID, _, _, _, _, arg2, arg3, arg4, arg5, arg6 = strsplit(':', ItemLink) + ItemData = { strsplit(':', ItemLink) } + ItemData[4], ItemData[5], ItemData[6], ItemData[7] = 0, 0, 0, 0 - f.ScanTTForEnchanting1:SetInventoryItem('player', Slot.ID) - f.ScanTTForEnchanting2:SetHyperlink(format('%s:%s:%d:0:0:0:0:%s:%s:%s:%s:%s', arg1, itemID, enchantID, arg2, arg3, arg4, arg5, arg6)) + for i = 1, #ItemData do + ItemData.FixedLink = (ItemData.FixedLink and ItemData.FixedLink..':' or '')..ItemData[i] + end + + self:ClearTooltip(self.ScanTT) + self.ScanTT:SetHyperlink(ItemData.FixedLink) - GemTotal_1, GemTotal_2, GemCount = 0, 0, 0 + GemCount_Default, GemCount_Now, GemCount = 0, 0, 0 -- First, Counting default gem sockets for i = 1, MAX_NUM_SOCKETS do - ItemTexture = _G['SLEArmoryScanTT_E2Texture'..i]:GetTexture() + ItemTexture = _G['SLE_CharacterArmory_ScanTTTexture'..i]:GetTexture() if ItemTexture and ItemTexture:find('Interface\\ItemSocketingFrame\\') then - GemTotal_1 = GemTotal_1 + 1 - Slot['Socket'..GemTotal_1].GemType = strupper(gsub(ItemTexture, 'Interface\\ItemSocketingFrame\\UI--EmptySocket--', '')) + GemCount_Default = GemCount_Default + 1 + Slot['Socket'..GemCount_Default].GemType = strupper(gsub(ItemTexture, 'Interface\\ItemSocketingFrame\\UI--EmptySocket--', '')) end end -- Second, Check if slot's item enable to adding a socket + GemCount_Enable = GemCount_Default if (slotName == 'WaistSlot' and UnitLevel('player') >= 70) or -- buckle - ((slotName == 'WristSlot' or slotName == 'HandsSlot') and CFO.PlayerProfession.BlackSmithing and CFO.PlayerProfession.BlackSmithing >= 550) then -- BlackSmith + ((slotName == 'WristSlot' or slotName == 'HandsSlot') and self.PlayerProfession.BlackSmithing and self.PlayerProfession.BlackSmithing >= 550) then -- BlackSmith - GemTotal_1 = GemTotal_1 + 1 - Slot['Socket'..GemTotal_1].GemType = 'PRISMATIC' + GemCount_Enable = GemCount_Enable + 1 + Slot['Socket'..GemCount_Enable].GemType = 'PRISMATIC' end + self:ClearTooltip(self.ScanTT) + self.ScanTT:SetInventoryItem('player', Slot.ID) + -- Apply current item's gem setting for i = 1, MAX_NUM_SOCKETS do - ItemTexture = _G['SLEArmoryScanTT_E1Texture'..i]:GetTexture() + ItemTexture = _G['SLE_CharacterArmory_ScanTTTexture'..i]:GetTexture() GemID = select(i, GetInventoryItemGems(Slot.ID)) - + if Slot['Socket'..i].GemType and C.GemColor[Slot['Socket'..i].GemType] then r, g, b = unpack(C.GemColor[Slot['Socket'..i].GemType]) Slot['Socket'..i].Socket:SetBackdropColor(r, g, b, .5) @@ -315,7 +466,7 @@ function CFO:ArmoryFrame_DataSetting() Slot['Socket'..i].Socket:SetBackdropBorderColor(1, 1, 1) end - if ItemTexture then + if ItemTexture or GemID then if E.db.sle.characterframeoptions.itemgem.show then Slot['Socket'..i]:Show() Slot.SocketWarning:Point(Slot.Direction, Slot['Socket'..i], (Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 0) @@ -323,27 +474,38 @@ function CFO:ArmoryFrame_DataSetting() Slot['Socket'..i]:Hide() Slot.SocketWarning:Point(Slot.Direction, Slot['Socket1'], (Slot.Direction == 'LEFT' and 'LEFT' or 'RIGHT'), 0, 0) end - GemTotal_2 = GemTotal_2 + 1 + + GemCount_Now = GemCount_Now + 1 if GemID then GemCount = GemCount + 1 - Slot['Socket'..i].Texture:SetTexture(ItemTexture) Slot['Socket'..i].GemItemID = GemID - Slot['Socket'..i].Socket.Link = select(2, GetItemInfo(GemID)) + + _, Slot['Socket'..i].Socket.Link, _, _, _, _, _, _, _, ItemTexture = GetItemInfo(GemID) + + if ItemTexture then + Slot['Socket'..i].Texture:SetTexture(ItemTexture) + else + needUpdate = true + end end end end + + --print(slotName..' : ', GemCount_Default, GemCount_Enable, GemCount_Now, GemCount) + if GemCount_Now < GemCount_Default then -- ItemInfo not loaded + needUpdate = true + end end _, _, ItemRarity, BasicItemLevel, _, _, _, _, _, ItemTexture = GetItemInfo(ItemLink) - --print(ItemRarity, ItemLink) - if ItemRarity == nil then return end r, g, b = GetItemQualityColor(ItemRarity) ItemUpgradeID = ItemLink:match(':(%d+)\124h%[') - for i = 1, f.ScanTTForEnchanting1:NumLines() do - CurrentLineText = _G['SLEArmoryScanTT_E1TextLeft'..i]:GetText() + --<< Enchant Parts >>-- + for i = 1, self.ScanTT:NumLines() do + CurrentLineText = _G['SLE_CharacterArmory_ScanTTTextLeft'..i]:GetText() if CurrentLineText:find(C.ItemLevelKey_Alt) then TrueItemLevel = tonumber(CurrentLineText:match(C.ItemLevelKey_Alt)) @@ -390,9 +552,9 @@ function CFO:ArmoryFrame_DataSetting() if ItemUpgradeID == '0' then ItemUpgradeID = nil else - if not C.ItemUpgrade[ItemUpgradeID] then - print('New Upgrade ID |cffceff00['..ItemUpgradeID..']|r : |cffceff00'..(TrueItemLevel - BasicItemLevel)) - end + --if not C.ItemUpgrade[ItemUpgradeID] then + --print('New Upgrade ID |cffceff00['..ItemUpgradeID..']|r : |cffceff00'..(TrueItemLevel - BasicItemLevel)) + --end ItemUpgradeID = TrueItemLevel - BasicItemLevel end @@ -403,19 +565,7 @@ function CFO:ArmoryFrame_DataSetting() end end - --<< Durability Parts >>-- - CurrentDurability, MaxDurability = GetInventoryItemDurability(Slot.ID) - if CurrentDurability and MaxDurability then - if E.db.sle.characterframeoptions.itemdurability.show ~= false then - --Slot.Durability:Show() - r, g, b = E:ColorGradient((CurrentDurability / MaxDurability), 1, 0, 0, 1, 1, 0, 0, 1, 0) - Slot.Durability:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemdurability.font), E.db.sle.characterframeoptions.itemdurability.fontSize, E.db.sle.characterframeoptions.itemdurability.fontOutline) - Slot.Durability:SetFormattedText("%s%.0f%%|r", E:RGBToHex(r, g, b), (CurrentDurability / MaxDurability) * 100) - Slot.Socket1:Point('BOTTOM'..Slot.Direction, Slot.Durability, 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, -3) - end - end - - -- Check Error + --[[ Check Error if (not IsEnchanted and C.EnchantableSlots[slotName]) or ((slotName == 'Finger0Slot' or slotName == 'Finger1Slot') and CFO.PlayerProfession.Enchanting and CFO.PlayerProfession.Enchanting >= 550 and not IsEnchanted) then ErrorDetected = true if E.db.sle.characterframeoptions.itemenchant.showwarning ~= false then @@ -507,40 +657,69 @@ function CFO:ArmoryFrame_DataSetting() end end) end - end + end]] end -- Change Gradation - if ErrorDetected and E.db.sle.characterframeoptions.showerrorgradient ~= false then - if Slot.Direction == 'LEFT' then - Slot.Gradation:SetTexCoord(0, .5, .5, 1) - else - Slot.Gradation:SetTexCoord(.5, 1, .5, 1) - end + if ErrorDetected and E.db.sle.characterframeoptions.showerrorgradient then + Slot.Gradation:SetVertexColor(1, 0, 0) else - if Slot.Direction == 'LEFT' then - Slot.Gradation:SetTexCoord(0, .5, 0, .5) - else - Slot.Gradation:SetTexCoord(.5, 1, 0, .5) - end + Slot.Gradation:SetVertexColor(unpack(E.db.sle.characterframeoptions.gradientColor)) + end + + if needUpdate then + needUpdateList = needUpdateList or {} + needUpdateList[#needUpdateList + 1] = slotName end end end - + + self.AverageItemLevel:SetText(C.Toolkit.Color_Value(STAT_AVERAGE_ITEM_LEVEL)..': '..format('%.2f', select(2, GetAverageItemLevel()))) + + if needUpdateList then + self.GearUpdated = needUpdateList + return true + end + + self.GearUpdated = true +end + +function CFO:UpdateCharacterBG() + local BGdrop = E.db.sle.characterframeoptions.image.dropdown if E.db.sle.characterframeoptions.showimage ~= false then if BGdrop ~= "CUSTOM" then - f.BG:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\'..backgrounds[BGdrop]) + CA.BG:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\'..backgrounds[BGdrop]) else - f.BG:SetTexture(E.db.sle.characterframeoptions.image.custom) + CA.BG:SetTexture(E.db.sle.characterframeoptions.image.custom) end else - f.BG:SetTexture(nil); + CA.BG:SetTexture(nil); end - - f.AverageItemLevel:SetText(C.Toolkit.Color_Value(L['Average'])..': '..format('%.2f', select(2, GetAverageItemLevel()))) end -function CFO:StartArmoryFrame() +function CFO:ChangeGradiantVisibility() + for _, slotName in pairs(C.GearList) do + if E.db.sle.characterframeoptions.shownormalgradient ~= false then + CA[slotName].Gradation:Show() + else + CA[slotName].Gradation:Hide() + end + end +end + +function CFO:ResizeErrorIcon() + for _, slotName in pairs(C.GearList) do + if slotName ~= 'ShirtSlot' and slotName ~= 'TabardSlot' then + CA[slotName].SocketWarning:Size(E.db.sle.characterframeoptions.itemgem.warningSize) + CA[slotName].EnchantWarning:Size(E.db.sle.characterframeoptions.itemenchant.warningSize) + for i = 1, MAX_NUM_SOCKETS do + CA[slotName]['Socket'..i]:Size(E.db.sle.characterframeoptions.itemgem.socketSize) + end + end + end +end + +function CA:StartArmoryFrame() -- Setting frame CharacterFrame:SetHeight(444) CharacterFrameInsetRight:SetPoint('TOPLEFT', CharacterFrameInset, 'TOPRIGHT', 110, 0) @@ -564,24 +743,35 @@ function CFO:StartArmoryFrame() CharacterModelFrameControlFrame:ClearAllPoints() CharacterModelFrameControlFrame:SetPoint('BOTTOM', CharacterModelFrame, 'BOTTOM', -1.5, 1) - if CreateArmoryFrame then - CreateArmoryFrame(SLEArmory) + if CA.Setup_CharacterArmory then + CA:Setup_CharacterArmory() + else + CA:Show() end - CFO:ArmoryFrame_DataSetting() + CA:CharacterArmory_DataSetting() - -- Run ArmoryMode - CFO:RegisterEvent('SOCKET_INFO_SUCCESS', 'ArmoryFrame_DataSetting') + -- Run SLE CharacterArmoryMode + --[[CFO:RegisterEvent('SOCKET_INFO_SUCCESS', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('PLAYER_EQUIPMENT_CHANGED', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('PLAYER_ENTERING_WORLD', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('UNIT_INVENTORY_CHANGED', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('EQUIPMENT_SWAP_FINISHED', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('UPDATE_INVENTORY_DURABILITY', 'ArmoryFrame_DataSetting') CFO:RegisterEvent('ITEM_UPGRADE_MASTER_UPDATE', 'ArmoryFrame_DataSetting') + ]] + CA:RegisterEvent('SOCKET_INFO_SUCCESS') + CA:RegisterEvent('PLAYER_EQUIPMENT_CHANGED') + CA:RegisterEvent('UNIT_INVENTORY_CHANGED') + CA:RegisterEvent('ITEM_UPGRADE_MASTER_UPDATE') + CA:RegisterEvent('TRANSMOGRIFY_UPDATE') + CA:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED') + CA:RegisterEvent('UPDATE_INVENTORY_DURABILITY') + CA:RegisterEvent('PLAYER_ENTERING_WORLD') -- For frame resizing - f.ChangeCharacterFrameWidth:SetParent(PaperDollFrame) + CA.ChangeCharacterFrameWidth:SetParent(PaperDollFrame) if PaperDollFrame:IsVisible() then - f.ChangeCharacterFrameWidth:Show() + CA.ChangeCharacterFrameWidth:Show() CharacterFrame:SetWidth(CharacterFrameInsetRight:IsShown() and 650 or 448) end end @@ -589,69 +779,7 @@ end function CFO:Initialize() if not E.private.sle.characterframeoptions.enable then return end - --[[if IsInGuild() then - f.ngt2 = CreateFrame("CheckButton", "nil", CharacterFrame, "SpellBookSkillLineTabTemplate") - f.ngt2:Show() - f.ngt2.tooltip = GUILD - f.ngt2:SetPoint("TOPLEFT", CharacterFrame, "TOPLEFT", 8, -10) - f.ngt2:StripTextures() - f.ngt2:CreateBackdrop() - --f.ngt2:SetSize(46, 46) - if GetGuildTabardFileNames() then - print("hihi") - f.ngt2:SetNormalTexture("Interface\\SpellBook\\GuildSpellbooktabBG") - f.ngt2:GetNormalTexture():SetTexCoord(.1, .9, .1, .9) - f.ngt2.TabardEmblem:Show() - f.ngt2.TabardIconFrame:Show() - SetLargeGuildTabardTextures("player", f.ngt2.TabardEmblem, f.ngt2:GetNormalTexture(), f.ngt2.TabardIconFrame) - - --local emblemSize, columns, offset, emblemTexture - --emblemTexture = f.ngt2.TabardEmblem - --if (emblemTexture) then - -- emblemSize = 64 / 1024; - -- columns = 16 - -- offset = 0; - -- emblemTexture:SetTexture("Interface\\GuildFrame\\GuildEmblemsLG_01"); - --end - --SetGuildTabardTextures(emblemSize, columns, offset, "player", emblemTexture, f.ngt2:GetNormalTexture(), f.ngt2.TabardIconFrame) - else - f.ngt2:SetNormalTexture("Interface\\GuildFrame\\GuildLogo-NoLogo") - end - end]] - hooksecurefunc('CharacterFrame_Collapse', function() - CharacterFrame:SetWidth(448); - end) - hooksecurefunc('CharacterFrame_Expand', function() - CharacterFrame:SetWidth(650); - end) - - hooksecurefunc('PaperDollFrame_SetLevel', function() - --[[local primaryTalentTree = GetSpecialization() - local classDisplayName, class = UnitClass("player") - local classColorString = RAID_CLASS_COLORS[class].colorStr - local PLAYER_LEVEL = "|c%s%s %s %s %s|r" - local PLAYER_LEVEL_NO_SPEC = "|c%s%s %s %s|r" - if (primaryTalentTree) then - local _, specName = GetSpecializationInfo(primaryTalentTree); - end - - if (specName and specName ~= "") then - CharacterLevelText:SetFormattedText(PLAYER_LEVEL, classColorString, LEVEL, UnitLevel("player"), specName, classDisplayName); - else - CharacterLevelText:SetFormattedText(PLAYER_LEVEL_NO_SPEC, classColorString, LEVEL, UnitLevel("player"), classDisplayName); - end]] - - CharacterLevelText:SetText('|c'..RAID_CLASS_COLORS[E.myclass].colorStr..CharacterLevelText:GetText()) - - --Maybe Adjust Name, Level, Avg iLvL if bliz skinning is off? - CharacterFrameTitleText:ClearAllPoints() - CharacterFrameTitleText:Point('TOP', f, 'TOP', 0, 0) - CharacterFrameTitleText:SetParent(f) - CharacterLevelText:ClearAllPoints() - CharacterLevelText:SetPoint('TOP', CharacterFrameTitleText, 'BOTTOM', 0, 3) - CharacterLevelText:SetParent(f) - end) - CFO:StartArmoryFrame() + CA:StartArmoryFrame() end \ No newline at end of file diff --git a/ElvUI_SLE/modules/characterframe/core.lua b/ElvUI_SLE/modules/characterframe/core.lua index ea98c40..305706e 100644 --- a/ElvUI_SLE/modules/characterframe/core.lua +++ b/ElvUI_SLE/modules/characterframe/core.lua @@ -7,31 +7,27 @@ SLArmoryConstants = { ['EnchantKey'] = ENCHANTED_TOOLTIP_LINE:gsub('%%s', '(.+)'), ['ItemSetBonusKey'] = ITEM_SET_BONUS:gsub('%%s', '(.+)'), ['TransmogrifiedKey'] = TRANSMOGRIFIED:gsub('%%s', '(.+)'), - ['GearList'] = { 'HeadSlot', 'HandsSlot', 'NeckSlot', 'WaistSlot', 'ShoulderSlot', 'LegsSlot', 'BackSlot', 'FeetSlot', 'ChestSlot', 'Finger0Slot', 'ShirtSlot', 'Finger1Slot', 'TabardSlot', 'Trinket0Slot', 'WristSlot', 'Trinket1Slot', 'SecondaryHandSlot', 'MainHandSlot' }, - ['EnchantableSlots'] = { ['NeckSlot'] = true, ['BackSlot'] = true, ['Finger0Slot'] = true, ['Finger1Slot'] = true, ['MainHandSlot'] = true, ['SecondaryHandSlot'] = true }, - ['UpgradeColor'] = { [16] = '|cffff9614', [12] = '|cfff88ef4', [8] = '|cff2eb7e4', [4] = '|cffceff00' }, - ['GemColor'] = { ['RED'] = { 1, .2, .2, }, ['YELLOW'] = { .97, .82, .29, }, ['BLUE'] = { .47, .67, 1, } }, - ['EmptySocketString'] = { [EMPTY_SOCKET_BLUE] = true, [EMPTY_SOCKET_COGWHEEL] = true, [EMPTY_SOCKET_HYDRAULIC] = true, [EMPTY_SOCKET_META] = true, [EMPTY_SOCKET_NO_COLOR] = true, [EMPTY_SOCKET_PRISMATIC] = true, [EMPTY_SOCKET_RED] = true, [EMPTY_SOCKET_YELLOW] = true }, - + --171 per Darth can we trust him? lol ['ItemUpgrade'] = { ['0'] = 0, ['1'] = 8, + ['171'] = 0, ['373'] = 4, ['374'] = 8, ['375'] = 4, ['376'] = 4, ['377'] = 4, ['379'] = 4, ['380'] = 4, ['445'] = 0, ['446'] = 4, ['447'] = 8, ['451'] = 0, ['452'] = 8, ['453'] = 0, ['454'] = 4, ['455'] = 8, ['456'] = 0, ['457'] = 8, ['458'] = 0, ['459'] = 4, ['460'] = 8, ['461'] = 12, @@ -40,28 +36,25 @@ SLArmoryConstants = { ['491'] = 0, ['492'] = 4, ['493'] = 8, ['494'] = 0, ['495'] = 4, ['496'] = 8, ['497'] = 12, ['498'] = 16, ['504'] = 12, ['505'] = 16, ['506'] = 20, ['507'] = 24, }, - ['ItemBindString'] = { -- Usually transmogrify string is located upper than bind string so we need to check this string for adding a transmogrify string in tooltip. - [ITEM_BIND_ON_EQUIP] = true, - [ITEM_BIND_ON_PICKUP] = true, - [ITEM_BIND_TO_ACCOUNT] = true, - [ITEM_BIND_TO_BNETACCOUNT] = true - }, - + [ITEM_BIND_ON_EQUIP] = true, + [ITEM_BIND_ON_PICKUP] = true, + [ITEM_BIND_TO_ACCOUNT] = true, + [ITEM_BIND_TO_BNETACCOUNT] = true + }, ['CanTransmogrifySlot'] = { - ['HeadSlot'] = true, - ['ShoulderSlot'] = true, - ['BackSlot'] = true, - ['ChestSlot'] = true, - ['WristSlot'] = true, - ['HandsSlot'] = true, - ['WaistSlot'] = true, - ['LegsSlot'] = true, - ['FeetSlot'] = true, - ['MainHandSlot'] = true, - ['SecondaryHandSlot'] = true - }, - + ['HeadSlot'] = true, + ['ShoulderSlot'] = true, + ['BackSlot'] = true, + ['ChestSlot'] = true, + ['WristSlot'] = true, + ['HandsSlot'] = true, + ['WaistSlot'] = true, + ['LegsSlot'] = true, + ['FeetSlot'] = true, + ['MainHandSlot'] = true, + ['SecondaryHandSlot'] = true + }, ['ItemEnchant_Profession_Inscription'] = { ['NeedLevel'] = 600, ['4912'] = true, -- ?? ?? ???? Secret Ox Horn Inscription @@ -69,7 +62,6 @@ SLArmoryConstants = { ['4914'] = true, -- ?? ??? ?? ???? Secret Tiger Claw Inscription ['4915'] = true, -- ?? ??? ??? ???? Secret Tiger Fang Inscription }, - ['ItemEnchant_Profession_LeatherWorking'] = { ['NeedLevel'] = 575, ['4875'] = true, -- ?? ?? - ? Fur Lining - Strength @@ -77,16 +69,13 @@ SLArmoryConstants = { ['4878'] = true, -- ?? ?? - ?? Fur Lining - Stamina ['4879'] = true, -- ?? ?? - ??? Fur Lining - Agility }, - ['ItemEnchant_Profession_Tailoring'] = { ['NeedLevel'] = 550, ['4892'] = true, -- ??? ?? Lightweave Embroidery ['4893'] = true, -- ??? ?? Darkglow Embroidery ['4894'] = true, -- ?? ?? Swordguard Embroidery }, - ['ProfessionList'] = {}, - ['CommonScript'] = { ['OnEnter'] = function(self) if self.Link or self.Message then @@ -167,7 +156,6 @@ SLArmoryConstants = { end end, }, - ['Toolkit'] = { ['Color_Value'] = function(InputText) return E:RGBToHex(E.media.rgbvaluecolor[1], E.media.rgbvaluecolor[2], E.media.rgbvaluecolor[3])..(InputText and InputText..'|r' or '') @@ -195,12 +183,12 @@ SLArmoryConstants = { self = self.text end - + self:FontTemplate(Style.Font and LibStub('LibSharedMedia-3.0'):Fetch('font', Style.Font), Style.FontSize, Style.FontOutline) self:SetJustifyH(Style.directionH or 'CENTER') self:SetJustifyV(Style.directionV or 'MIDDLE') self:SetText(Text) - + if ... then self:Point(...) else @@ -261,6 +249,7 @@ for ProfessionSkillID, Key in pairs({ [102161] = 'Mining', [102216] = 'Skinning' }) + do local ProfessionName, _, ProfessionTexture = GetSpellInfo(ProfessionSkillID) @@ -330,7 +319,6 @@ _, L['Spec_Warlock_Affliction'] = GetSpecializationInfoByID(265) _, L['Spec_Warlock_Demonology'] = GetSpecializationInfoByID(266) _, L['Spec_Warlock_Destruction'] = GetSpecializationInfoByID(267) - SLArmoryConstants['ClassRole'] = { ['WARRIOR'] = { [L['Spec_Warrior_Arms']] = { --무기 diff --git a/ElvUI_SLE/options/characterframe_c.lua b/ElvUI_SLE/options/characterframe_c.lua index cb5290a..3908910 100644 --- a/ElvUI_SLE/options/characterframe_c.lua +++ b/ElvUI_SLE/options/characterframe_c.lua @@ -64,7 +64,7 @@ local function configTable() type = 'toggle', name = L["Show Background Image"], get = function(info) return E.db.sle.characterframeoptions.showimage end, - set = function(info, value) E.db.sle.characterframeoptions.showimage = value; CFO:ArmoryFrame_DataSetting(); end, + set = function(info, value) E.db.sle.characterframeoptions.showimage = value; CFO:UpdateCharacterBG(); end, }, dropdown = { type = 'select', @@ -81,7 +81,7 @@ local function configTable() }, get = function() return E.db.sle.characterframeoptions.image.dropdown end, set = function(_, value) - E.db.sle.characterframeoptions.image.dropdown = value; CFO:ArmoryFrame_DataSetting(); + E.db.sle.characterframeoptions.image.dropdown = value; CFO:UpdateCharacterBG(); end, }, -- 1.7.9.5