Skip to content

Commit

Permalink
Merge branch 'release/3.10.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-morfar committed Jan 7, 2024
2 parents 9fd5be0 + 18b98d6 commit db578ce
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 22 deletions.
16 changes: 16 additions & 0 deletions .specs/Integration/Core/GetTypeCodeForItem.spec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- require "busted.runner" ()
dofile(".specs/AddonLoader.lua").LoadToc "RCLootCouncil.toc"

describe("#Core #GetTypeCodeForItem", function()
it("should treat robes and chests as the same", function()
local addon = RCLootCouncil
addon:OnInitialize()
local db = addon:Getdb()

assert.are.equal("default", addon:GetTypeCodeForItem(168341)) -- robe
assert.are.equal("default", addon:GetTypeCodeForItem(158355)) -- chest
db.enabledButtons["INVTYPE_CHEST"] = true
assert.are.equal("INVTYPE_CHEST", addon:GetTypeCodeForItem(168341)) -- robe
assert.are.equal("INVTYPE_CHEST", addon:GetTypeCodeForItem(158355)) -- chest
end)
end)
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
10 changes: 8 additions & 2 deletions Core/Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ addon.INVTYPE_Slots = {
-- To add a new a button group, simply add it to the options menu (easily done by adding an entry to OPT_MORE_BUTTONS_VALUES), and add a function here to determine if that group should be used for the item.
-- Each function receives the following parameters:
-- item, db (addon:Getdb()), itemID, itemEquipLoc,itemClassID, itemSubClassID
---@type (fun(item: Item, db: RCLootCouncil.db, itemID: integer, itemEquipLoc: string, itemClassID: Enum.ItemClass): string|nil) []
addon.RESPONSE_CODE_GENERATORS = {
-- Chest/Robe
function(_, db, _, equipLoc)
return db.enabledButtons.INVTYPE_CHEST and
(addon.INVTYPE_Slots[equipLoc] == addon.INVTYPE_Slots.INVTYPE_CHEST)
and "INVTYPE_CHEST" or nil
end,
-- Pets
function(_, db, _, _, itemClassID, itemSubClassID)
return db.enabledButtons.PETS and itemClassID == Enum.ItemClass.Miscellaneous and itemSubClassID
Expand All @@ -103,8 +110,7 @@ addon.RESPONSE_CODE_GENERATORS = {
-- end,

-- Armor tokens
function(_, db, itemID)
local _, _, _, _, _, itemClassID, itemSubClassID = GetItemInfoInstant(itemID)
function(_, db, itemID, _, itemClassID, itemSubClassID)
if db.enabledButtons["TOKEN"] and (RCTokenTable[itemID] or
-- context token is armor token in DF
itemClassID == Enum.ItemClass.Reagent and itemSubClassID == Enum.ItemReagentSubclass.ContextToken)
Expand Down
4 changes: 2 additions & 2 deletions RCLootCouncil.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Author: Potdisc
## Interface: 100200
## Notes: Interface for running a Loot Council v3.10.3
## Notes: Interface for running a Loot Council v3.10.4
## Title: RCLootCouncil
## Version: 3.10.3
## Version: 3.10.4
## SavedVariables: RCLootCouncilDB, RCLootCouncilLootDB
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, lib-st, LibWindow-1.1, LibDialog-1.0
## X-Curse-Project-ID: 39928
Expand Down
2 changes: 1 addition & 1 deletion Utils/TrinketData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ _G.RCTrinketSpecs = {
[207167] = "73F7777777777", -- Ashes of the Embersoul, All Classes
[208614] = "5134773647743", -- Augury of the Primal Flame,
[207165] = "0365002007700", -- Bandolier of Twisted Blades, Agility
[207172] = "5010771040000", -- Belor'relos, the Suncaller, Damage, Intellect
[207172] = "5012771040010", -- Belor'relos, the Suncaller, Damage, Intellect
[207171] = "2082004030010", -- Blossom of Amirdrassil, Healer
[207169] = "0000000700067", -- Branch of the Tormented Ancient, Strength
[207166] = "0124002607443", -- Cataclysmic Signet Brand, Damage, Melee
Expand Down
30 changes: 17 additions & 13 deletions __tests/SpecFlagInspector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local flagsToDecode = {
-- "010773050000",
-- "4294967295",

"092776070010",
"5010771040000",
-- tostring(0xffffffffff)
}

Expand Down Expand Up @@ -102,15 +102,19 @@ end

Main()

-- Set WARRIOR (1) to spec 2
local flag = SpecFlag:SetClassSpecFlag(nil, 1, 2)
print(flag)
-- Add spec 3 as well
flag = SpecFlag:SetClassSpecFlag(flag, 1, 3)
print(flag)
-- and spec 1
flag = SpecFlag:SetClassSpecFlag(flag, 1, 1)
print(flag)
-- Now add priest spec 3
flag = SpecFlag:SetClassSpecFlag(flag, 5, 3)
print(flag)
-- -- Set WARRIOR (1) to spec 2
-- local flag = SpecFlag:SetClassSpecFlag(nil, 1, 2)
-- print(flag)
-- -- Add spec 3 as well
-- flag = SpecFlag:SetClassSpecFlag(flag, 1, 3)
-- print(flag)
-- -- and spec 1
-- flag = SpecFlag:SetClassSpecFlag(flag, 1, 1)
-- print(flag)
-- -- Now add priest spec 3
-- flag = SpecFlag:SetClassSpecFlag(flag, 5, 3)
-- print(flag)

local flag = SpecFlag:SetClassSpecFlag("5010771040000", 2, 1)
local flag = SpecFlag:SetClassSpecFlag(flag, 10, 2)
SpecFlag:DecodeFlag(flag)
1 change: 1 addition & 0 deletions __tests/wow_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ CLOSES_IN = "Time Left";
LOOT_ITEM = "%s receives loot: %s."
RANDOM_ROLL_RESULT = "%s rolls %d (%d-%d)"
REQUEST_ROLL = "Request Roll"
INVTYPE_CHEST = "Chest"
ITEM_CLASSES_ALLOWED = "Classes: %s"
ITEM_LEVEL_ABBR = "ilvl"
ITEM_MOD_AGILITY = "%c%s Agility";
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Changes

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

RCLootCouncil will no longer group loot legendary items automatically.

Chest pieces with `INVTYPE_ROBE` are now correctly grouped with chests in regards to buttons and responses (#246).

# 3.10.3

## Changes
Expand Down

0 comments on commit db578ce

Please sign in to comment.