Skip to content

Commit

Permalink
Merge branch 'release/3.14.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-morfar committed Nov 4, 2024
2 parents 024d9b5 + c884d05 commit 2861772
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 13 deletions.
12 changes: 12 additions & 0 deletions Modules/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,18 @@ function addon:OptionsTable()
min = 1,
max = self.db.profile.maxAwardReasons,
step = 1,
set = function (info, val)
addon.db.profile[info[#info]] = val
-- Update disenchant - especially if we just hid the only disenachant reason
addon.db.profile.disenchant = false
for i = 1, self.db.profile.numAwardReasons do
if self.db.profile.awardReasons[i].disenchant then
addon.db.profile.disenchant = true
break
end
end
addon:ConfigTableChanged(info[#info])
end
},
-- Award reasons made further down
reset = {
Expand Down
6 changes: 3 additions & 3 deletions Modules/votingFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ function RCVotingFrame:CheckAndHandleCandidateChanges(oldLastSession)
for _, data in ipairs(self.frame.st.data) do
candidatesInData[data.name] = true
end
local cols = self:BuildSTCols()
for name in pairs(addedCandidates) do
for i in ipairs(lootTable) do
if not lootTable[i].candidates[name] then
Expand All @@ -805,7 +804,7 @@ function RCVotingFrame:CheckAndHandleCandidateChanges(oldLastSession)
end
-- Any new candidates also needs to be added to row data
if not candidatesInData[name] then
tinsert(self.frame.st.data, {name = name, cols = cols})
tinsert(self.frame.st.data, {name = name, cols = self:BuildSTCols()})
end
end
addon.Log:D("Candidates changed:", #addedCandidates)
Expand Down Expand Up @@ -2367,7 +2366,8 @@ do
info.text = "|cff"..addon.Utils:RGBToHex(c.r, c.g, c.b)..addon.Ambiguate(name).."|r "..tostring(player.enchantingLvl)
info.notCheckable = true
info.func = function()
for _,v1 in ipairs(db.awardReasons) do
for k,v1 in ipairs(db.awardReasons) do
if k > db.numAwardReasons then break end
if v1.disenchant then
local data = lootTable[session].candidates[name] -- Shorthand
LibDialog:Spawn("RCLOOTCOUNCIL_CONFIRM_AWARD", RCVotingFrame:GetAwardPopupData(session, name, data, v1))
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: 110005
## Notes: Interface for running a Loot Council v3.14.3
## Notes: Interface for running a Loot Council v3.14.4
## Title: RCLootCouncil
## Version: 3.14.3
## Version: 3.14.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
4 changes: 4 additions & 0 deletions UI/Widgets/Frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ function Object:CreateContentFrame(parent, name, height)
frame:SavePosition() -- LibWindow SavePosition has nil error rarely and randomly and I cant really find the root cause. Let's just do a nil check.
end
end)
c:SetScript("OnLeave", function(this)
-- Used if minimized while dragging the panel
this:GetParent():StopMovingOrSizing()
end)

-- Hook updates to parent :SetWidth, :SetHeight
parent:HookScript("OnSizeChanged", function(self, w, h)
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 3.14.4

## Changes

## Bugfixes

- *Fixed Group Leader chat command help not being printed without having other modules enabled (Curse#546).*
- *Moving a frame the exact moment it's minimized will no longer make it stuck to the mouse.*
- *Clicking the "Disenchant" button in the voting frame could use values from hidden award reasons.*

# 3.14.3

## Changes
Expand Down
22 changes: 14 additions & 8 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function RCLootCouncil:OnInitialize()
{cmd = "profile", desc = L.chat_commands_profile, },
{cmd = "reset", desc = L["chat_commands_reset"]},
{cmd = "sync", desc = L["chat_commands_sync"]},
{cmd = "trade", desc = L.chat_commands_trade},
{cmd = "version", desc = L["chat_commands_version"]},
}
self.mlChatCmdHelp = {
Expand All @@ -167,7 +168,6 @@ function RCLootCouncil:OnInitialize()
{cmd = "start", desc = L.chat_commands_start},
{cmd = "stop", desc = L.chat_commands_stop},
{cmd = "test (#)", desc = L["chat_commands_test"]},
{cmd = "trade)", desc = L.chat_commands_trade},
{cmd = "whisper", desc = L["chat_commands_whisper"]},

}
Expand Down Expand Up @@ -363,6 +363,15 @@ function RCLootCouncil:DoChatHook()
self:RawHook(self, "Print", function(_, ...) self.hooks[self].Print(self, getglobal(db.chatFrameName), ...) end, true)
end

function RCLootCouncil:PrintMLChatHelp()
print ""
local mlCommandsString = self:IsCorrectVersion() and L.chat_commands_groupLeader_only or L.chat_commands_ML_only
print("|cFFFFA500" .. mlCommandsString .. "|r")
for _, y in ipairs(self.mlChatCmdHelp) do
print("|cff20a200", y.cmd, "|r:", y.desc)
end
end

function RCLootCouncil:ChatCommand(msg)
local input = self:GetArgs(msg, 1)
local args = {}
Expand All @@ -383,13 +392,8 @@ function RCLootCouncil:ChatCommand(msg)
local module, shownMLCommands
for _, v in ipairs(self.chatCmdHelp) do
-- Show ML commands beneath regular commands, but above module commands
if v.module and not shownMLCommands then
print ""
local mlCommandsString = self:IsCorrectVersion() and L.chat_commands_groupLeader_only or L.chat_commands_ML_only
print("|cFFFFA500".. mlCommandsString .. "|r")
for _, y in ipairs(self.mlChatCmdHelp) do
print("|cff20a200", y.cmd, "|r:", y.desc)
end
if v.module and not shownMLCommands then -- this won't trigger if there's no module(s)
self:PrintMLChatHelp()
shownMLCommands = true
end
if v.module ~= module then -- Print module name and version
Expand All @@ -409,6 +413,8 @@ function RCLootCouncil:ChatCommand(msg)
end
module = v.module
end
-- If there's no modules, just print the ML commands now
if not shownMLCommands then self:PrintMLChatHelp() end
self.Log:d("- debug or d - Toggle debugging")
self.Log:d("- log - display the debug log")
self.Log:d("- clearLog - clear the debug log")
Expand Down

0 comments on commit 2861772

Please sign in to comment.