Skip to content

Commit

Permalink
Only show creator message if they are not in your party or raid, disa…
Browse files Browse the repository at this point in the history
…ble auto destroy grey on TBC
  • Loading branch information
AeroScripts committed May 30, 2021
1 parent 7d2d6a3 commit 44406a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions loot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ events:SetScript("OnEvent", function()
lootTicker = nil
end
GogoLoot:showLootFrame("inventory error " .. message)
elseif "BAG_UPDATE" == evt and GogoLoot_Config.enableAutoGray then
elseif "BAG_UPDATE" == evt and GogoLoot_Config.enableAutoGray and WOW_PROJECT_ID ~= WOW_PROJECT_BURNING_CRUSADE_CLASSIC then

-- auto gray
--debug("BagUpdate!")
Expand Down Expand Up @@ -684,7 +684,9 @@ events:SetScript("OnEvent", function()
GameTooltip:HookScript("OnTooltipSetUnit", function(self)
local name, unit = self:GetUnit()
if name and unit and GogoLoot:IsCreator(name, UnitFactionGroup(unit)) then
GogoLoot:ShowNotification(name)
if (not UnitInRaid(unit)) and (not UnitInParty(unit)) then
GogoLoot:ShowNotification(name)
end
---GameTooltip:AddLine("\124TInterface\\TargetingFrame\\UI-RaidTargetingIcon_1.png:0\124t GogoLoot Creator \124TInterface\\TargetingFrame\\UI-RaidTargetingIcon_1.png:0\124t ")
else
GogoLoot:HideNotification()
Expand Down
13 changes: 7 additions & 6 deletions ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ StaticPopupDialogs["GOGOLOOT_THRESHOLD_ERROR"] = {
preferredIndex = 3
}


GogoLoot.creators = {
[1] = { -- NA
["Horde"] = {
Expand Down Expand Up @@ -544,11 +543,13 @@ function GogoLoot:BuildUI()
dropdown:SetDisabled(false)
widget:AddChild(dropdown)

local autoGray = checkbox(widget, "Automatic Destroy Gray Items on Loot", nil, nil)
autoGray:SetCallback("OnValueChanged", function()
GogoLoot_Config.enableAutoGray = autoGray:GetValue()--print("Callback! " .. tostring(speedyLoot:GetValue()))
end)
autoGray:SetValue(true == GogoLoot_Config.enableAutoGray)
if WOW_PROJECT_ID ~= WOW_PROJECT_BURNING_CRUSADE_CLASSIC then -- the function requires a hardware event in TBC
local autoGray = checkbox(widget, "Automatic Destroy Gray Items on Loot", nil, nil)
autoGray:SetCallback("OnValueChanged", function()
GogoLoot_Config.enableAutoGray = autoGray:GetValue()--print("Callback! " .. tostring(speedyLoot:GetValue()))
end)
autoGray:SetValue(true == GogoLoot_Config.enableAutoGray)
end

local tabs = AceGUI:Create("TabGroup")
tabs:SetLayout("Flow")
Expand Down

0 comments on commit 44406a9

Please sign in to comment.