mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
loot
This commit is contained in:
@@ -796,13 +796,13 @@ local function SendRecieve(_, event, prefix, message, _, sender)
|
|||||||
E.SendMSGTimer = E:ScheduleTimer("SendMessage", 12)
|
E.SendMSGTimer = E:ScheduleTimer("SendMessage", 12)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--[[
|
||||||
local f = CreateFrame("Frame")
|
local f = CreateFrame("Frame")
|
||||||
f:RegisterEvent("RAID_ROSTER_UPDATE")
|
f:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
f:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
f:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
f:RegisterEvent("CHAT_MSG_ADDON")
|
f:RegisterEvent("CHAT_MSG_ADDON")
|
||||||
f:SetScript("OnEvent", SendRecieve)
|
f:SetScript("OnEvent", SendRecieve)
|
||||||
|
]]
|
||||||
function E:UpdateAll(ignoreInstall)
|
function E:UpdateAll(ignoreInstall)
|
||||||
self.private = self.charSettings.profile
|
self.private = self.charSettings.profile
|
||||||
self.db = self.data.profile
|
self.db = self.data.profile
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ function lib:RegisterPlugin(name,callback, isLib)
|
|||||||
|
|
||||||
if not lib.vcframe then
|
if not lib.vcframe then
|
||||||
local f = CreateFrame('Frame')
|
local f = CreateFrame('Frame')
|
||||||
f:RegisterEvent("RAID_ROSTER_UPDATE");
|
--f:RegisterEvent("RAID_ROSTER_UPDATE");
|
||||||
f:RegisterEvent("PARTY_MEMBERS_CHANGED");
|
--f:RegisterEvent("PARTY_MEMBERS_CHANGED");
|
||||||
f:RegisterEvent("CHAT_MSG_ADDON")
|
--f:RegisterEvent("CHAT_MSG_ADDON")
|
||||||
f:SetScript("OnEvent", lib.VersionCheck)
|
--f:SetScript("OnEvent", lib.VersionCheck)
|
||||||
lib.vcframe = f
|
lib.vcframe = f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ local OnClick = function()
|
|||||||
ss = this:GetID()
|
ss = this:GetID()
|
||||||
sq = this.quality
|
sq = this.quality
|
||||||
sn = this.name:GetText()
|
sn = this.name:GetText()
|
||||||
LootSlot(ss)
|
--LootSlot(ss)
|
||||||
end
|
end
|
||||||
|
|
||||||
local OnShow = function()
|
local OnShow = function()
|
||||||
@@ -92,14 +92,12 @@ local function anchorSlots(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function createSlot(id)
|
local function createSlot(id)
|
||||||
local frame = CreateFrame("Button", "ElvLootSlot"..id, lootFrame)
|
local frame = CreateFrame("LootButton", "ElvLootSlot"..id, lootFrame)
|
||||||
frame:SetPoint("LEFT", 8, 0)
|
frame:SetPoint("LEFT", 8, 0)
|
||||||
frame:SetPoint("RIGHT", -8, 0)
|
frame:SetPoint("RIGHT", -8, 0)
|
||||||
frame:SetHeight(iconSize - 2)
|
frame:SetHeight(iconSize - 2)
|
||||||
frame:SetID(id)
|
frame:SetID(id)
|
||||||
|
|
||||||
frame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
|
||||||
|
|
||||||
frame:SetScript("OnEnter", OnEnter)
|
frame:SetScript("OnEnter", OnEnter)
|
||||||
frame:SetScript("OnLeave", OnLeave)
|
frame:SetScript("OnLeave", OnLeave)
|
||||||
frame:SetScript("OnClick", OnClick)
|
frame:SetScript("OnClick", OnClick)
|
||||||
@@ -145,10 +143,10 @@ local function createSlot(id)
|
|||||||
return frame
|
return frame
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:LOOT_SLOT_CLEARED(_, slot)
|
function M:LOOT_SLOT_CLEARED()
|
||||||
if(not lootFrame:IsShown()) then return end
|
if not lootFrame:IsShown() then return end
|
||||||
|
|
||||||
lootFrame.slots[slot]:Hide()
|
lootFrame.slots[arg1]:Hide()
|
||||||
anchorSlots(lootFrame)
|
anchorSlots(lootFrame)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -238,6 +236,9 @@ function M:LOOT_OPENED(_, autoLoot)
|
|||||||
end
|
end
|
||||||
w = max(w, slot.name:GetStringWidth())
|
w = max(w, slot.name:GetStringWidth())
|
||||||
|
|
||||||
|
slot:SetID(i)
|
||||||
|
slot:SetSlot(i)
|
||||||
|
|
||||||
slot:Enable()
|
slot:Enable()
|
||||||
slot:Show()
|
slot:Show()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user