Skip to content

Commit

Permalink
GroupLoot: Ignore legendaries
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-morfar committed Jan 5, 2024
1 parent 232be29 commit ed2bd28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Classes/Utils/GroupLoot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GroupLoot.IgnoreList = {
function GroupLoot:OnInitialize()
self.Log = addon.Require "Utils.Log":New "GroupLoot"
addon:RegisterEvent("START_LOOT_ROLL", self.OnStartLootRoll, self)
self.OnLootRoll:subscribe(function (_, rollID)
self.OnLootRoll:subscribe(function(_, rollID)
pcall(self.HideGroupLootFrameWithRollID, self, rollID) -- REVIEW: pcall because I haven't actually tested it in game.
end)
-- addon:RegisterEvent("LOOT_HISTORY_ROLL_CHANGED", self.OnLootHistoryRollChanged, self)
Expand All @@ -34,8 +34,12 @@ function GroupLoot:OnStartLootRoll(_, rollID)
self.Log:d("START_LOOT_ROLL", rollID)
if not addon.enabled then return self.Log:d("Addon disabled, ignoring group loot") end
local link = GetLootRollItemLink(rollID)
local _, _, _, _, _, canNeed, _, _, _, _, _, _, canTransmog = GetLootRollItemInfo(rollID)
local _, _, _, quality, _, canNeed, _, _, _, _, _, _, canTransmog = GetLootRollItemInfo(rollID)
if not link then return end -- Sanity check
if quality and quality >= Enum.ItemQuality.Legendary then
self.Log:d("Ignoring legendary quality:", quality)
return
end
local id = ItemUtils:GetItemIDFromLink(link)
if self.IgnoreList[id] then
self.Log:d(link, "is ignored, bailing.")
Expand All @@ -49,7 +53,7 @@ function GroupLoot:OnStartLootRoll(_, rollID)
local roll
if canNeed then
roll = 1
-- Blizzard says transmog is more important than greed..
-- Blizzard says transmog is more important than greed..
elseif canTransmog then
roll = 4
else
Expand Down Expand Up @@ -124,4 +128,4 @@ function GroupLoot:HideGroupLootFrameWithRollID(rollID)
self.Log:D("Hide group loot frame with rollID", i, rollID)
end
end
end
end
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Holy Paladins and Mistweavers no longer autopass on Belor'relos, the Suncaller.

RCLootCouncil will no longer group loot legendary items automatically.

# 3.10.3

## Changes
Expand Down

0 comments on commit ed2bd28

Please sign in to comment.