diff --git a/Sounds/loot-1.wav b/Sounds/loot-1.wav index c438b8a..f74a7e7 100644 Binary files a/Sounds/loot-1.wav and b/Sounds/loot-1.wav differ diff --git a/Sounds/loot-10.wav b/Sounds/loot-10.wav new file mode 100644 index 0000000..0bfa40a Binary files /dev/null and b/Sounds/loot-10.wav differ diff --git a/Sounds/loot-11.wav b/Sounds/loot-11.wav new file mode 100644 index 0000000..950ae32 Binary files /dev/null and b/Sounds/loot-11.wav differ diff --git a/Sounds/loot-12.wav b/Sounds/loot-12.wav new file mode 100644 index 0000000..ff50f02 Binary files /dev/null and b/Sounds/loot-12.wav differ diff --git a/Sounds/loot-13.wav b/Sounds/loot-13.wav new file mode 100644 index 0000000..9c4f00d Binary files /dev/null and b/Sounds/loot-13.wav differ diff --git a/Sounds/loot-14.wav b/Sounds/loot-14.wav new file mode 100644 index 0000000..507c8b3 Binary files /dev/null and b/Sounds/loot-14.wav differ diff --git a/Sounds/loot-15.wav b/Sounds/loot-15.wav new file mode 100644 index 0000000..ecf02f6 Binary files /dev/null and b/Sounds/loot-15.wav differ diff --git a/Sounds/loot-16.wav b/Sounds/loot-16.wav new file mode 100644 index 0000000..8dbdbae Binary files /dev/null and b/Sounds/loot-16.wav differ diff --git a/Sounds/loot-17.wav b/Sounds/loot-17.wav new file mode 100644 index 0000000..e1d05c6 Binary files /dev/null and b/Sounds/loot-17.wav differ diff --git a/Sounds/loot-18.wav b/Sounds/loot-18.wav new file mode 100644 index 0000000..af7594f Binary files /dev/null and b/Sounds/loot-18.wav differ diff --git a/Sounds/loot-19.wav b/Sounds/loot-19.wav new file mode 100644 index 0000000..02120c9 Binary files /dev/null and b/Sounds/loot-19.wav differ diff --git a/Sounds/loot-2.wav b/Sounds/loot-2.wav index 6c5ed60..e985c96 100644 Binary files a/Sounds/loot-2.wav and b/Sounds/loot-2.wav differ diff --git a/Sounds/loot-20.wav b/Sounds/loot-20.wav new file mode 100644 index 0000000..2cfcc24 Binary files /dev/null and b/Sounds/loot-20.wav differ diff --git a/Sounds/loot-21.wav b/Sounds/loot-21.wav new file mode 100644 index 0000000..b56cb4b Binary files /dev/null and b/Sounds/loot-21.wav differ diff --git a/Sounds/loot-22.wav b/Sounds/loot-22.wav new file mode 100644 index 0000000..470a9f4 Binary files /dev/null and b/Sounds/loot-22.wav differ diff --git a/Sounds/loot-23.wav b/Sounds/loot-23.wav new file mode 100644 index 0000000..5fad59b Binary files /dev/null and b/Sounds/loot-23.wav differ diff --git a/Sounds/loot-24.wav b/Sounds/loot-24.wav new file mode 100644 index 0000000..fe02db4 Binary files /dev/null and b/Sounds/loot-24.wav differ diff --git a/Sounds/loot-3.wav b/Sounds/loot-3.wav index 6e2324d..13cecad 100644 Binary files a/Sounds/loot-3.wav and b/Sounds/loot-3.wav differ diff --git a/Sounds/loot-4.wav b/Sounds/loot-4.wav index 450337f..361416b 100644 Binary files a/Sounds/loot-4.wav and b/Sounds/loot-4.wav differ diff --git a/Sounds/loot-5.wav b/Sounds/loot-5.wav index 52ffdea..7cfd239 100644 Binary files a/Sounds/loot-5.wav and b/Sounds/loot-5.wav differ diff --git a/Sounds/loot-6.wav b/Sounds/loot-6.wav index 499cd50..0b535a0 100644 Binary files a/Sounds/loot-6.wav and b/Sounds/loot-6.wav differ diff --git a/Sounds/loot-7.wav b/Sounds/loot-7.wav new file mode 100644 index 0000000..49bc4a3 Binary files /dev/null and b/Sounds/loot-7.wav differ diff --git a/Sounds/loot-8.wav b/Sounds/loot-8.wav new file mode 100644 index 0000000..87a2f92 Binary files /dev/null and b/Sounds/loot-8.wav differ diff --git a/Sounds/loot-9.wav b/Sounds/loot-9.wav new file mode 100644 index 0000000..40db944 Binary files /dev/null and b/Sounds/loot-9.wav differ diff --git a/extra_features.lua b/extra_features.lua index efdbc08..1fceb33 100644 --- a/extra_features.lua +++ b/extra_features.lua @@ -81,3 +81,33 @@ ChatFrame_OnEvent = function(event) -- Call original handler for all other messages originalChatFrame_OnEvent(event) end + + +if event == "ADDON_LOADED" then + -- default ON + if sepgp_sound == nil then sepgp_sound = true end + + -- seed RNG once per session + math.randomseed(GetTime() * 1000) + math.random(); math.random(); math.random() + + -- /epgp sound on|off + SLASH_EPGP1 = "/epgp" + SlashCmdList["EPGP"] = function(msg) + msg = (msg or ""):lower() + local cmd, arg = msg:match("^(%S+)%s*(.*)$") + if cmd == "sound" then + if arg == "on" then + sepgp_sound = true + DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00EPGP: sound ON|r") + elseif arg == "off" then + sepgp_sound = false + DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00EPGP: sound OFF|r") + else + DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Usage: /epgp sound on|off|r") + end + else + DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Usage: /epgp sound on|off|r") + end + end +end diff --git a/shootyepgp.lua b/shootyepgp.lua index 24772a9..d029c40 100644 --- a/shootyepgp.lua +++ b/shootyepgp.lua @@ -987,8 +987,11 @@ function sepgp:bidPrint(link, masterlooter, need, greed, bid) -- Start with a string that has placeholders for all three local msg = string.format(L["Click $MS or $PRIOOS or $OS for %s"], link) - local randomSound = math.random(1, 6) - PlaySoundFile("Interface\\AddOns\\shootyepgp\\Sounds\\loot-" .. randomSound .. ".wav") + math.randomseed(GetTime() * 1000) + if sepgp_sound then + local randomSound = math.random(1, 24) + PlaySoundFile("Interface\\AddOns\\shootyepgp\\Sounds\\loot-" .. randomSound .. ".wav") + end -- Decide which placeholders to keep/remove based on need/greed/bid if (need and greed) or bid then diff --git a/shootyepgp.toc b/shootyepgp.toc index 99f2436..9a16b77 100644 --- a/shootyepgp.toc +++ b/shootyepgp.toc @@ -7,10 +7,10 @@ ## X-Website: https://github.com/cinecom/shootyepgp/ ## X-Category: Guild ## X-Credits: shooty, Qcat(zhCN) -## Version: 10.07 +## Version: 10.08 ## X-Alpha: ## OptionalDeps: Ace2 -## SavedVariables: sepgp_saychannel, sepgp_groupbyclass, sepgp_groupbyarmor, sepgp_groupbyrole, sepgp_raidonly, sepgp_dbver, sepgp_debug, sepgp_fubar +## SavedVariables: sepgp_saychannel, sepgp_groupbyclass, sepgp_groupbyarmor, sepgp_groupbyrole, sepgp_raidonly, sepgp_dbver, sepgp_debug, sepgp_fubar, sepgp_sound ## SavedVariablesPerCharacter: sepgp_main, sepgp_log, sepgp_looted, sepgp_decay, sepgp_minep, sepgp_reservechannel, sepgp_progress, sepgp_discount, sepgp_altspool, sepgp_altpercent Libs\AceLibrary\AceLibrary.lua