loot: use both setslot and setid for lootbuttons

This commit is contained in:
shagu
2018-11-04 21:35:19 +01:00
parent 977948263c
commit b7638db5f2
3 changed files with 4 additions and 3 deletions
-1
View File
@@ -23,7 +23,6 @@ FRIENDS_NAME_LOCATION = "ButtonTextLocation"
COOLDOWN_FRAME_TYPE = "Cooldown"
LOOT_BUTTON_FRAME_TYPE = "Button"
LOOT_BUTTON_SLOT_FUNCTION = "SetID"
PLAYER_BUFF_START_ID = 0
-1
View File
@@ -18,7 +18,6 @@ FRIENDS_NAME_LOCATION = "ButtonTextNameLocation"
COOLDOWN_FRAME_TYPE = "Model"
LOOT_BUTTON_FRAME_TYPE = "LootButton"
LOOT_BUTTON_SLOT_FUNCTION = "SetSlot"
PLAYER_BUFF_START_ID = -1
+4 -1
View File
@@ -470,7 +470,10 @@ pfUI:RegisterModule("loot", function ()
maxrarity = math.max(maxrarity, quality)
maxwidth = math.max(maxwidth, slot.name:GetStringWidth())
slot[LOOT_BUTTON_SLOT_FUNCTION](slot, id)
slot:SetID(id)
if slot.SetSlot then
slot:SetSlot(id)
end
slot:Enable()
slot:Show()