Fixed a bug

This commit is contained in:
Horyoshi
2026-02-17 13:56:24 +01:00
parent 41bf6727b3
commit f546d6f57d
4 changed files with 35 additions and 11 deletions
+3 -3
View File
@@ -131,7 +131,7 @@ end
-- Send attention signal to officers (ML only)
function sepgp_bids:sendAttention()
if IsRaidLeader() or sepgp:lootMaster() then
if sepgp:lootMaster() then
sepgp:broadcastBidAttention()
sepgp:defaultPrint(L["Attention signal sent to officers."])
end
@@ -192,7 +192,7 @@ function sepgp_bids:OnTooltipUpdate()
"text3", offspec
)
-- Countdown button (only for Master Looter)
if IsRaidLeader() or sepgp:lootMaster() then
if sepgp:lootMaster() then
local countdownHeader = T:AddCategory(
"columns", 2,
"text","","child_textR", 1, "child_textG", 1, "child_textB", 1,"child_justify", "LEFT",
@@ -206,7 +206,7 @@ function sepgp_bids:OnTooltipUpdate()
)
end
-- Attention button (only for Master Looter)
if IsRaidLeader() or sepgp:lootMaster() then
if sepgp:lootMaster() then
local attentionCat = T:AddCategory(
"columns", 1,
"text", "",
+4
View File
@@ -220,6 +220,8 @@ Results will print here when done.]],
["Alts"] = true,
["New Minimum EP"] = true,
-- bid broadcasting
["Auto-open Bid Window"] = true,
["Automatically open the bid window when loot is announced."] = true,
["Attention"] = true,
["Attention signal sent to officers."] = true,
["Attention! Master Looter wants you to check the bid window."] = true,
@@ -442,6 +444,8 @@ L:RegisterTranslations("zhCN", function() return {
["Set Minimum EP"] = "设置最小值 EP",
["New Minimum EP"] = "新最小值 EP",
-- bid broadcasting
["Auto-open Bid Window"] = "自动打开竞标窗口",
["Automatically open the bid window when loot is announced."] = "当拾取被宣布时自动打开竞标窗口.",
["Attention"] = "注意",
["Attention signal sent to officers."] = "注意信号已发送给官员.",
["Attention! Master Looter wants you to check the bid window."] = "注意! 分配者希望你查看竞标窗口.",
+26 -6
View File
@@ -314,6 +314,21 @@ function sepgp:buildMenu()
sepgp:SetRefresh(true)
end,
}
options.args["autobidwindow"] = {
type = "toggle",
name = L["Auto-open Bid Window"],
desc = L["Automatically open the bid window when loot is announced."],
order = 81,
hidden = function() return not (admin()) end,
get = function() return sepgp_autobidwindow == 1 end,
set = function(v)
if sepgp_autobidwindow == 1 then
sepgp_autobidwindow = 0
else
sepgp_autobidwindow = 1
end
end,
}
options.args["loot_sounds"] = {
type = "toggle",
name = "Loot sounds",
@@ -467,6 +482,7 @@ function sepgp:OnInitialize() -- ADDON_LOADED (1) unless LoD
if sepgp_discount == nil then sepgp_discount = 0.25 end
if sepgp_altspool == nil then sepgp_altspool = false end
if sepgp_altpercent == nil then sepgp_altpercent = 1.0 end
if sepgp_autobidwindow == nil then sepgp_autobidwindow = 0 end
if sepgp_log == nil then sepgp_log = {} end
if sepgp_looted == nil then sepgp_looted = {} end
if sepgp_debug == nil then sepgp_debug = {} end
@@ -1226,8 +1242,12 @@ function sepgp:addonComms(prefix,message,channel,sender)
sepgp.bid_item.name = coloredName
running_bid = true
self:ScheduleEvent("shootyepgpBidTimeout", self.clearBids, 300, self)
-- DO NOT auto-open bid window for officers, they must open manually
sepgp_bids:Refresh()
-- Auto-open bid window if the officer has the option enabled
if sepgp_autobidwindow == 1 then
sepgp_bids:Toggle(true)
else
sepgp_bids:Refresh()
end
end
-- Handle bid data broadcast from master looter
elseif who == "BIDS" then
@@ -1993,7 +2013,7 @@ function sepgp:captureLootCall(text, sender)
if (link_found) then
local quality = hexColorQuality[itemColor] or -1
if (quality >= 3) then
if (IsRaidLeader() or self:lootMaster()) then
if (self:lootMaster()) then
self:clearBids(true)
sepgp.bid_item.link = itemString
sepgp.bid_item.linkFull = itemLink
@@ -2019,7 +2039,7 @@ lootBid.msos = {".*[oO][sS][pP][rR][iI][oO].*"}
function sepgp:captureBid(text, sender)
if not running_bid then return end
if not (IsRaidLeader() or self:lootMaster()) then return end
if not (self:lootMaster()) then return end
if not sepgp.bid_item.link then return end
local mskw_found, oskw_found, msoskw_found
@@ -2117,8 +2137,8 @@ function sepgp:clearBids(reset)
if reset~=nil then
self:debugPrint(L["Clearing old Bids"])
end
-- Broadcast clear to officers if we are the ML/RL
if (IsRaidLeader() or self:lootMaster()) and running_bid then
-- Broadcast clear to officers if we are the ML
if (self:lootMaster()) and running_bid then
self:broadcastBidClear()
end
sepgp.bid_item = {}
+2 -2
View File
@@ -7,11 +7,11 @@
## X-Website: https://github.com/cinecom/shootyepgp/
## X-Category: Guild
## X-Credits: shooty, Qcat(zhCN)
## Version: 10.19.3 <ERROR>
## Version: 10.19.4 <ERROR>
## X-Alpha:
## OptionalDeps: Ace2
## SavedVariables: sepgp_saychannel, sepgp_groupbyclass, sepgp_groupbyarmor, sepgp_groupbyrole, sepgp_raidonly, sepgp_dbver, sepgp_debug, sepgp_fubar, sepgp_sound, RaidStrikeDB, RaidStrikeResetTime, BenchTrackerDB
## SavedVariablesPerCharacter: sepgp_main, sepgp_log, sepgp_looted, sepgp_decay, sepgp_minep, sepgp_reservechannel, sepgp_progress, sepgp_discount, sepgp_altspool, sepgp_altpercent
## SavedVariablesPerCharacter: sepgp_main, sepgp_log, sepgp_looted, sepgp_decay, sepgp_minep, sepgp_reservechannel, sepgp_progress, sepgp_discount, sepgp_altspool, sepgp_altpercent, sepgp_autobidwindow
Libs\AceLibrary\AceLibrary.lua
Libs\AceOO-2.0\AceOO-2.0.lua