mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 12:10:01 +00:00
loot: add rarity threshold to random loot announce
This commit is contained in:
+2
-1
@@ -154,6 +154,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("loot", nil, "autopickup", "1")
|
||||
pfUI:UpdateConfig("loot", nil, "mousecursor", "1")
|
||||
pfUI:UpdateConfig("loot", nil, "advancedloot", "1")
|
||||
pfUI:UpdateConfig("loot", nil, "rollannouncequal", "3")
|
||||
pfUI:UpdateConfig("loot", nil, "rollannounce", "0")
|
||||
pfUI:UpdateConfig("loot", nil, "raritytimer", "1")
|
||||
|
||||
@@ -1017,4 +1018,4 @@ function pfUI:MigrateConfig()
|
||||
pfUI:UpdateConfig("buffbar", "tdebuff", "color", ".5,.1,.1,1")
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["deDE"] = {
|
||||
["Profile"] = nil,
|
||||
["Raid Icon Size"] = nil,
|
||||
["Raid"] = nil,
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -373,8 +373,9 @@ pfUI_translation["enUS"] = {
|
||||
["Profile"] = nil,
|
||||
["Raid Icon Size"] = nil,
|
||||
["Raid"] = nil,
|
||||
["Random"] = nil,
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Random"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
["Range Display Color"] = nil,
|
||||
["Remaining"] = nil,
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["esES"] = {
|
||||
["Profile"] = "Perfil",
|
||||
["Raid"] = "Banda",
|
||||
["Raid Icon Size"] = "Tamaño de los iconos de banda",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random"] = "Aleatorio",
|
||||
["Random Rolling"] = "Tirar los dados aleatoriamente",
|
||||
["Range Check Interval"] = "Intervalo de comprobación de alcance",
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["frFR"] = {
|
||||
["Profile"] = "Profil",
|
||||
["Raid Icon Size"] = "Taille des icônes de Raid",
|
||||
["Raid"] = "Raid",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["koKR"] = {
|
||||
["Profile"] = "프로파일",
|
||||
["Raid"] = "레이드",
|
||||
["Raid Icon Size"] = "레이드 아이콘 크기",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["ruRU"] = {
|
||||
["Profile"] = "Профиль",
|
||||
["Raid Icon Size"] = "Размер иконки рейда",
|
||||
["Raid"] = "Рейд",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = "Случайный бросок",
|
||||
["Random"] = "Случайно",
|
||||
["Range Check Interval"] = "Интервал проверки диапазона",
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["zhCN"] = {
|
||||
["Profile"] = "配置文件",
|
||||
["Raid Icon Size"] = "团队图标大小",
|
||||
["Raid"] = "团队",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = "随机Roll点 物品:",
|
||||
["Random"] = "给随机玩家",
|
||||
["Range Check Interval"] = "范围检查间隔",
|
||||
|
||||
Vendored
+1
@@ -373,6 +373,7 @@ pfUI_translation["zhTW"] = {
|
||||
["Profile"] = "設定檔",
|
||||
["Raid Icon Size"] = "團隊圖示大小",
|
||||
["Raid"] = "團隊",
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = "隨機Roll點 物品:",
|
||||
["Random"] = "給隨機玩家",
|
||||
["Range Check Interval"] = "範圍檢查間隔",
|
||||
|
||||
@@ -717,6 +717,12 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.dropdowns.num_shapeshift_slots = BarLayoutOptions(NUM_SHAPESHIFT_SLOTS)
|
||||
pfUI.gui.dropdowns.num_pet_action_slots = BarLayoutOptions(NUM_PET_ACTION_SLOTS)
|
||||
|
||||
pfUI.gui.dropdowns.loot_rarity = {}
|
||||
for i=0, getn(_G.ITEM_QUALITY_COLORS)-2 do
|
||||
local entry = string.format("%d:%s", i, string.format("%s%s%s", _G.ITEM_QUALITY_COLORS[i].hex, _G[string.format("ITEM_QUALITY%d_DESC",i)], FONT_COLOR_CODE_CLOSE))
|
||||
table.insert(pfUI.gui.dropdowns.loot_rarity, entry)
|
||||
end
|
||||
|
||||
-- main tab frame
|
||||
pfUI.gui.tabs = CreateTabFrame(pfUI.gui, "LEFT")
|
||||
pfUI.gui.tabs:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 0, -25)
|
||||
@@ -1113,6 +1119,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, this, T["Disable Loot Confirmation Dialog (Without Group)"], C.loot, "autopickup", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Loot Window On MouseCursor"], C.loot, "mousecursor", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Advanced Master Loot Menu"], C.loot, "advancedloot", "checkbox")
|
||||
CreateConfig(nil, this, T["Random Roll Announcement Rarity"], C.loot, "rollannouncequal", "dropdown", pfUI.gui.dropdowns.loot_rarity)
|
||||
CreateConfig(nil, this, T["Detailed Random Roll Announcement"], C.loot, "rollannounce", "checkbox")
|
||||
CreateConfig(nil, this, T["Use Item Rarity Color For Loot-Roll Timer"], C.loot, "raritytimer", "checkbox")
|
||||
this.setup = true
|
||||
|
||||
+14
-11
@@ -37,18 +37,21 @@ pfUI:RegisterModule("loot", function ()
|
||||
local slot = pfUI.loot.selectedSlot or 0
|
||||
local to = table.getn(candidates)
|
||||
if to >= 1 then
|
||||
SendChatMessageWide(T["Random Rolling "]..GetLootSlotLink(slot))
|
||||
if C.loot.rollannounce == "1" then
|
||||
local k,names = 1, ""
|
||||
for i=1,to do
|
||||
names = (k==1) and (i..":"..pfUI.loot.index_to_name[candidates[i]]) or (names..", "..i..":"..pfUI.loot.index_to_name[candidates[i]])
|
||||
-- fit the maximum names in a single 255 char message (15)
|
||||
if i == to or k == 15 then
|
||||
QueueFunction(SendChatMessageWide,names)
|
||||
names = ""
|
||||
local _,_,_,quality = GetLootSlotInfo(slot)
|
||||
if quality >= tonumber(C.loot.rollannouncequal) then
|
||||
SendChatMessageWide(T["Random Rolling "]..GetLootSlotLink(slot))
|
||||
if C.loot.rollannounce == "1" then
|
||||
local k,names = 1, ""
|
||||
for i=1,to do
|
||||
names = (k==1) and (i..":"..pfUI.loot.index_to_name[candidates[i]]) or (names..", "..i..":"..pfUI.loot.index_to_name[candidates[i]])
|
||||
-- fit the maximum names in a single 255 char message (15)
|
||||
if i == to or k == 15 then
|
||||
QueueFunction(SendChatMessageWide,names)
|
||||
names = ""
|
||||
end
|
||||
k = k<15 and k+1 or 1
|
||||
end
|
||||
k = k<15 and k+1 or 1
|
||||
end
|
||||
end
|
||||
end
|
||||
pfUI.loot:RegisterEvent("CHAT_MSG_SYSTEM")
|
||||
pfUI.loot.randomRolling = true
|
||||
|
||||
Reference in New Issue
Block a user