Add bag glow (that doesn't work)
This commit is contained in:
4
LegionWA/BagBoEGlow/Event.lua
Normal file
4
LegionWA/BagBoEGlow/Event.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- BAG_UPDATE
|
||||
function(e)
|
||||
aura_env.update()
|
||||
end
|
30
LegionWA/BagBoEGlow/Init.lua
Normal file
30
LegionWA/BagBoEGlow/Init.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local function getItemLink(container, slot)
|
||||
return select(7, GetContainerItemInfo(container, slot)) or ""
|
||||
end
|
||||
local function getBindType(container, slot)
|
||||
return select(14, GetItemInfo(getItemLink(container, slot))) or 0
|
||||
end
|
||||
local function isBoe(container, slot)
|
||||
return getBindType(container, slot) == 1
|
||||
end
|
||||
|
||||
|
||||
local showGlow = function(container, slot)
|
||||
ActionButton_ShowOverlayGlow(_G["ElvUI_ContainerFrameBag" .. container .. "Slot" .. slot])
|
||||
end
|
||||
local hideGlow = function(container, slot)
|
||||
ActionButton_HideOverlayGlow(_G["ElvUI_ContainerFrameBag" .. container .. "Slot" .. slot])
|
||||
end
|
||||
|
||||
aura_env.update = function()
|
||||
for container = 0, 4 do
|
||||
for slot = 1, GetContainerNumSlots(container) do
|
||||
print(C_Item.IsBound(ItemLocation:CreateFromBagAndSlot(container, slot)))
|
||||
if isBoe(container, slot) then
|
||||
showGlow(container, slot)
|
||||
else
|
||||
hideGlow(container, slot)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
18
LegionWA/BagBoEGlow/README
Normal file
18
LegionWA/BagBoEGlow/README
Normal file
@@ -0,0 +1,18 @@
|
||||
Haven't found a way of determining whether an item is soulbound or not without tooltip scanning which I don't want to do
|
||||
|
||||
local cTip = CreateFrame("GameTooltip","PrivTooltip",nil,"GameTooltipTemplate")
|
||||
local function IsSoulbound(bag, slot)
|
||||
cTip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
cTip:SetBagItem(bag, slot)
|
||||
cTip:Show()
|
||||
for i = 1,cTip:NumLines() do
|
||||
if(_G[name.."TooltipTextLeft"..i]:GetText()==ITEM_SOULBOUND) then
|
||||
cTip:Hide()
|
||||
return true
|
||||
end
|
||||
end
|
||||
cTip:Hide()
|
||||
return false
|
||||
end
|
||||
|
||||
Some guy says this is good
|
1
LegionWA/DruidEnergyBar/Export
Normal file
1
LegionWA/DruidEnergyBar/Export
Normal file
File diff suppressed because one or more lines are too long
@@ -18,6 +18,13 @@ PlayerController = {
|
||||
end,
|
||||
getPlayers = function(self)
|
||||
|
||||
end,
|
||||
process = function(guid)
|
||||
if (self.nearbyPlayers[guid] == nil) then
|
||||
self.addPlayer(guid)
|
||||
else
|
||||
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
@@ -77,5 +84,7 @@ function PlayerInfo:New(guid)
|
||||
return o
|
||||
end
|
||||
|
||||
aura_env.processEvent = function(allstates, caster, target)
|
||||
aura_env.processEvent = function(caster, target)
|
||||
PlayerController:process(caster)
|
||||
PlayerController:process(target)
|
||||
end
|
||||
|
Reference in New Issue
Block a user