Skip to content

Commit

Permalink
Merge pull request #295 from krullgor/3.4.1
Browse files Browse the repository at this point in the history
update for wow 3.4.1
  • Loading branch information
Hoizame authored Jan 17, 2023
2 parents 6edf6ec + c95c8b4 commit 6bd3647
Show file tree
Hide file tree
Showing 44 changed files with 914 additions and 788 deletions.
2 changes: 1 addition & 1 deletion AtlasLootClassic/Addons/Favourites_GUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ local function Slot_CreateSlotButton(parFrame, slotID, modelFrame)
frame:RegisterForClicks("AnyDown")

-- secButtonTexture <texture>
frame.icon = frame:CreateTexture(nil, frame)
frame.icon = frame:CreateTexture(nil, "ARTWORK")
frame.icon:SetAllPoints(frame)

-- secButtonOverlay <texture>
Expand Down
2 changes: 1 addition & 1 deletion AtlasLootClassic/AtlasLootClassic.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 30400
## Interface: 30401
## Author: Lag
## Version: @project-version@
## SavedVariables: AtlasLootClassicDB
Expand Down
2 changes: 1 addition & 1 deletion AtlasLootClassic/AtlasLootClassic_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 30400
## Interface: 30401
## Author: Lag
## Version: @project-version@
## SavedVariables: AtlasLootClassicDB
Expand Down
48 changes: 27 additions & 21 deletions AtlasLootClassic/Button/Button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
mountID = 123,
}
]]

-- Functions
local _G = getfenv(0)

-- Libraries
local assert, type, tonumber, tostring = assert, type, tonumber, tostring
local next, pairs = next, pairs
local str_sub, str_format, str_len, str_match = string.sub, string.format, string.len, string.match

local UnitFactionGroup = UnitFactionGroup
local CreateFrame = CreateFrame
local CreateColor = CreateColor

local ALName, ALPrivate = ...

local AtlasLoot = _G.AtlasLoot
Expand All @@ -23,14 +36,6 @@ local AL = AtlasLoot.Locales
local GetAlTooltip = AtlasLoot.Tooltip.GetTooltip
local DEFAULT_BACKGROUND_COLOR = {0.82, 0.82, 0.82, 0.4}

-- lua
local assert, type, tonumber, tostring = assert, type, tonumber, tostring
local next, pairs = next, pairs
local str_sub, str_format, str_len, str_match = string.sub, string.format, string.len, string.match

-- WoW
local CreateFrame = CreateFrame

-- UnitFactionGroup("player") "Alliance", "Horde", "Neutral" or nil.
-- :SetAtlas()
local WOW_HEAD_LINK, WOW_HEAD_LINK_LOC
Expand Down Expand Up @@ -235,12 +240,13 @@ function Button:Create()
button.background:Hide()

-- highlight Background
button.highlightBg = button:CreateTexture(buttonName.."_highlightBg")
button.highlightBg:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
button.highlightBg:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -(button:GetWidth()/2), 0)
button.highlightBg:SetColorTexture(1,0,0)
button.highlightBg:SetGradientAlpha("HORIZONTAL", 1, 1, 1, 0.45, 1, 1, 1, 0)
button.highlightBg:Hide()
local highlightBg = button:CreateTexture(buttonName.."_highlightBg")
highlightBg:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
highlightBg:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -(button:GetWidth()/2), 0)
highlightBg:SetColorTexture(1,0,0)
highlightBg:SetGradient("HORIZONTAL", CreateColor(1, 1, 1, 0.45), CreateColor(1, 1, 1, 0))
highlightBg:Hide()
button.highlightBg = highlightBg

-- Icon <texture>
button.icon = button:CreateTexture(buttonName.."_icon")
Expand Down Expand Up @@ -347,20 +353,20 @@ function Button:Create()
button.secButton:RegisterForClicks("AnyDown")

-- secButtonTexture <texture>
button.secButton.icon = button.secButton:CreateTexture(buttonName.."_secButtonIcon", button.secButton)
button.secButton.icon = button.secButton:CreateTexture(buttonName.."_secButtonIcon")
button.secButton.icon:SetDrawLayer("ARTWORK", 0)
button.secButton.icon:SetAllPoints(button.secButton)
button.secButton.icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")

--[[
button.secButton.qualityBorder = button.secButton:CreateTexture(buttonName.."_secButtonQualityBorder")
button.secButton.qualityBorder = button.secButton:CreateTexture(buttonName.."_secButtonQualityBorder", "ARTWORK")
button.secButton.qualityBorder:SetAllPoints(button.secButton)
button.secButton.qualityBorder:SetTexture("Interface\\Common\\WhiteIconFrame")
button.secButton.qualityBorder:Hide()
]]--

-- secButtonMini <texture>
button.secButton.mini = button.secButton:CreateTexture(buttonName.."_secButtonMini")
button.secButton.mini = button.secButton:CreateTexture(buttonName.."_secButtonMini", "ARTWORK")
button.secButton.mini:SetDrawLayer(button.secButton.icon:GetDrawLayer(), 1)
button.secButton.mini:SetPoint("TOPRIGHT", button.secButton.icon, "TOPRIGHT", 0, 0)
button.secButton.mini:SetHeight(13)
Expand Down Expand Up @@ -417,7 +423,7 @@ function Button:Create()
button.secButton.favourite:Hide()

-- factionIcon
button.factionIcon = button:CreateTexture(buttonName.."_factionIcon", button)
button.factionIcon = button:CreateTexture(buttonName.."_factionIcon", "ARTWORK")
button.factionIcon:SetPoint("RIGHT", button.secButton, "LEFT", -2, 0)
button.factionIcon:SetHeight(28)
button.factionIcon:SetWidth(28)
Expand Down Expand Up @@ -458,20 +464,20 @@ function Button:CreateSecOnly(frame)
button.secButton:RegisterForClicks("AnyDown")

-- secButtonTexture <texture>
button.secButton.icon = button.secButton:CreateTexture(buttonName.."_secButtonIcon", button.secButton)
button.secButton.icon = button.secButton:CreateTexture(buttonName.."_secButtonIcon", "ARTWORK")
button.secButton.icon:SetDrawLayer("ARTWORK", 0)
button.secButton.icon:SetAllPoints(button.secButton)
button.secButton.icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")

--[[
button.secButton.qualityBorder = button.secButton:CreateTexture(buttonName.."_secButtonQualityBorder")
button.secButton.qualityBorder = button.secButton:CreateTexture(buttonName.."_secButtonQualityBorder", "ARTWORK")
button.secButton.qualityBorder:SetAllPoints(button.secButton)
button.secButton.qualityBorder:SetTexture("Interface\\Common\\WhiteIconFrame")
button.secButton.qualityBorder:Hide()
]]--

-- secButtonMini <texture>
button.secButton.mini = button.secButton:CreateTexture(buttonName.."_secButtonMini")
button.secButton.mini = button.secButton:CreateTexture(buttonName.."_secButtonMini", "ARTWORK")
button.secButton.mini:SetDrawLayer(button.secButton.icon:GetDrawLayer(), 1)
button.secButton.mini:SetPoint("TOPRIGHT", button.secButton.icon, "TOPRIGHT", 0, 0)
button.secButton.mini:SetHeight(13)
Expand Down
2 changes: 1 addition & 1 deletion AtlasLootClassic/Button/Faction_type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function Faction.ShowToolTipFrame(button)
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
frame:SetBackdropColor(0,0,0,1)

frame.icon = frame:CreateTexture(name.."-icon", frame)
frame.icon = frame:CreateTexture(name.."-icon", "ARTWORK")
frame.icon:SetPoint("TOPLEFT", frame, "TOPLEFT", 5, -5)
frame.icon:SetHeight(15)
frame.icon:SetWidth(15)
Expand Down
8 changes: 4 additions & 4 deletions AtlasLootClassic/Core/TooltipScan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function OnTooltipSetQuest(self)
self.questID = nil
self.arg1 = nil
self.curQuery = nil
self:SetScript("OnTooltipSetQuest", nil)
--self:SetScript("OnTooltipSetQuest", nil)
self:Hide()
-- give the query a little bit time and it works perfect for more than 1 query :)
C_Timer_After(0.05, SetNextQuery)
Expand All @@ -81,7 +81,7 @@ function TooltipScan.GetQuestName(questID, onGetFunc, arg1, preSetQuery)
if not questID then return end
if queryCache.quest[questID] then
onGetFunc( queryCache.quest[questID], arg1 )
AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", nil)
--AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", nil)
AtlasLootQueryTooltip.onGetFunc = nil
AtlasLootQueryTooltip.questID = nil
AtlasLootQueryTooltip.arg1 = nil
Expand All @@ -102,7 +102,7 @@ function TooltipScan.GetQuestName(questID, onGetFunc, arg1, preSetQuery)
AtlasLootQueryTooltip.questID = questID
AtlasLootQueryTooltip.arg1 = arg1
AtlasLootQueryTooltip.curQuery = preSetQuery
AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", OnTooltipSetQuest)
--AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", OnTooltipSetQuest)
AtlasLootQueryTooltip:Show()
AtlasLootQueryTooltip:SetHyperlink("quest:"..questID)
return preSetQuery
Expand All @@ -114,7 +114,7 @@ function TooltipScan.Remove(listEntry)
AtlasLootQueryTooltip.questID = nil
AtlasLootQueryTooltip.arg1 = nil
AtlasLootQueryTooltip.curQuery = nil
AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", nil)
--AtlasLootQueryTooltip:SetScript("OnTooltipSetQuest", nil)
AtlasLootQueryTooltip:Hide()
SetNextQuery()
else
Expand Down
Loading

0 comments on commit 6bd3647

Please sign in to comment.