mrbuds / libgetframe Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
Dear expert,
Missing unit/raidframes in libGetFrame makes incorrect behavior of external glowing, pointing frametype to ‘unitframe’.
I have used ‘InvenRaidFrame3’ (former raidframe of Lime), and found it was missing in this library. Sometimes external glowing works into this frame but sometimes not.
It looks working with "^InvenRaidFrames3Group", --IRF3 in LibGetFrame-1.0.lua.
Twitch keeps reporting 1.1.3 is available and installing 1.1.2-2-gdb40eb7-alpha.
I used CPUThieves to catch the culprit that was hanging my game whenever we drop combat after a pack in M+ dungeons. It starts to happen after a dungeon or so, sometimes a little less, sometiems a little more, and the only thing that fixes it is a /reload, at which point it'll be fine until about a dungeon's worth of time again.
Here's a link to my compressed addons folder (~115MB): https://drive.google.com/file/d/1WrsQ3aM9WUYBe5leP_I_Aj5pKhpgNJOM/view?usp=sharing
There are edge cases where the frame cache isn't updated but new frames are added to the UI. As an example, after someone makes visible their previously hidden raid/party frames but before they join a group for GROUP_ROSTER_UPDATE to fire. This matters for testing, mostly.
Is it reasonable to implement something like
function lib.ForceScan(delay)
ScanForUnitFrames(delay)
end
for authors to have a bit more control over expected frames with regards to edge cases?
This is a bug report I posted for WeakAuras and was told to repost it here. See the link for the full details: WeakAuras/WeakAuras2#3143
Not sure if this is working as intended, but when using "Group by Frame" and selecting "Unit Frames" for a dynamic group the auras apply to your focus target in addition to your party members. In Classic vanilla the focus target feature did not exist and it only applied to your party members.
Here's the real bug: the focus target appears to take priority over the party frame. For example, I have a weakaura to show when party members are drinking. I have the tank focused and it will show the focus frame drinking, but not his party frame.
Latest update (1.5.9) breaks weakauras that use raid frame glows.
Testing path:
While the auras trigger, they don't show glows on the raid frame. When I disabled LibGetFrame the glows appeared again.
268x LibGetFrame-1.0\LibGetFrame-1.0-21.lua:230: bad argument #1 to 'pairs' (table expected, got nil)
[string "@LibGetFrame-1.0\LibGetFrame-1.0-21.lua"]:230: in function `GetUnitFrame'
[string "--[==[ Error in 'Targeted Spells' ]==] return function(allstates, event, sourceUnit)
if not aura_env.loaded then return false end
if event == "ENCOUNTER_END" then
-- reset aura state to avoid ghost icons between pulls
for _,cast in pairs(aura_env.allcasts) do
if cast.nameplate then
aura_env.removeFontFromNameplate(cast.nameplate)
end
end
aura_env.allcasts = {}
for _,state in pairs(allstates) do
state.show = false
state.changed = true
end
return true
end
if sourceUnit and UnitIsEnemy(sourceUnit, "player") then
local allcasts = aura_env.allcasts
local sourceGUID = UnitGUID(sourceUnit)
local iconChanged = false
local cast = allcasts[sourceGUID]
if event == "UNIT_SPELLCAST_START"
or event == "UNIT_SPELLCAST_DELAYED"
or event == "UNIT_SPELLCAST_CHANNEL_START"
or event == "UNIT_SPELLCAST_CHANNEL_UPDATE"
or event == "UNIT_TARGET"
then
if not cast then
-- check if unit is casting
local castType
local name,_,texture,castStart,castEnd,_,_,notInterruptible,spellId = UnitCastingInfo(sourceUnit)
if name then
castType = "cast"
else
name,_,texture,castStart,castEnd,_,notInterruptible,spellId = UnitChannelInfo(sourceUnit)
if name then
castType = "channel"
end
end
if spellId and not aura_env.isBlackListed(spellId, sourceUnit) then
local spellInList = aura_env.spells[spellId]
-- find npc's target
local targetUnit = sourceUnit.."target"
if UnitExists(targetUnit) then
for groupmember in WA_IterateGroupMembers() do
if UnitIsUnit(targetUnit, groupmember) then
local targetGUID = UnitGUID(groupmember)
local targeted = targetGUID == WeakAuras.myGUID
local showIcon = (spellInList and spellInList.icon) or (not spellInList and aura_env.config.icon.enable)
local showGlow = spellInList and spellInList.glow
local showNameplate
if aura_env.config.nameplate.enable == 1 then
showNameplate = true
elseif aura_env.config.nameplate.enable == 2 then
showNameplate = (spellInList and spellInList.nameplate) or (not spellInList)
elseif aura_env.config.nameplate.enable == 3 then
showNameplate = spellInList and spellInList.nameplate
elseif aura_env.config.nameplate.enable == 4 then
showNameplate = false
end
local playSound = targeted and spellInList and spellInList.sound
local bigIcon = targeted and spellInList and spellInList.bigIcon
allcasts[sourceGUID] = {
name = name,
icon = texture,
start = castStart/1000,
expirationTime = castEnd/1000,
spellId = spellId,
target = groupmember,
targetGUID = targetGUID,
targeted = targeted,
spellInList = spellInList,
notInterruptible = notInterruptible,
castType = castType,
showIcon = showIcon,
showGlow = showGlow,
bigIcon = bigIcon,
showNameplate = showNameplate,
nameplate = showNameplate and aura_env.addFontToNameplate(
sourceUnit,
groupmember
),
playSound = playSound
}
iconChanged = true
break
end
end
end
end
else
if UnitExists(sourceUnit) then
if event == "UNIT_SPELLCAST_DELAYED"
or event == "UNIT_SPELLCAST_CHANNEL_UPDATE"
or event == "UNIT_SPELLCAST_CHANNEL_START"
then
local castType
local name,_,_,castStart,castEnd,_,_,notInterruptible,spellId = UnitCastingInfo(sourceUnit)
if name then
castType = "cast"
else
name,_,_,castStart,castEnd,_,notInterruptible,spellId = UnitChannelInfo(sourceUnit)
if name then
castType = "channel"
end
end
if spellId then
cast.notInterruptible = notInterruptible
cast.castType = castType
cast.start = castStart/1000
cast.expirationTime = castEnd/1000
cast.changed = true
iconChanged = true
end
elseif event == "UNIT_TARGET" then
local targetUnit = sourceUnit.."target"
if UnitExists(targetUnit) then
for groupmember in WA_IterateGroupMembers() do
if UnitIsUnit(targetUnit, groupmember) then
if cast.nameplate then
aura_env.removeFontFromNameplate(cast.nameplate)
end
local targetGUID = UnitGUID(groupmember)
local targeted = targetGUID == WeakAuras.myGUID
local spellId = cast.spellId
cast.changed = true
cast.target = groupmember
cast.targetGUID = targetGUID
cast.targeted = targeted
if cast.showNameplate then
cast.nameplate = aura_env.addFontToNameplate(
sourceUnit,
groupmember
)
end
iconChanged = true
break
end
end
end
end
end
end
elseif cast then
if event == "UNIT_SPELLCAST_STOP" -- or event == "UNIT_SPELLCAST_SUCCEEDED"
or event == "UNIT_SPELLCAST_INTERRUPTED"
or event == "UNIT_SPELLCAST_FAILED"
or event == "UNIT_SPELLCAST_FAILED_QUIET"
or event == "UNIT_SPELLCAST_CHANNEL_STOP"
then
if cast.nameplate then
aura_env.removeFontFromNameplate(cast.nameplate)
end
allcasts[sourceGUID] = nil
iconChanged = true
elseif event == "NAME_PLATE_UNIT_REMOVED" then
if cast.nameplate then
aura_env.removeFontFromNameplate(cast.nameplate)
end
elseif event == "NAME_PLATE_UNIT_ADDED" then
if cast.showNameplate then
cast.nameplate = aura_env.addFontToNameplate(
sourceUnit,
cast.target
)
end
end
end
if iconChanged then
local change = false
-- update allstates from allcasts
for sourceGUID, cast in pairs(allcasts) do
-- index for allstates is "spellId_targetGUID"
local index = ("%s_%s"):format(cast.spellId, cast.targetGUID)
local state = allstates[index]
if state and state.show then
state.casts[sourceGUID] = true
if cast.expirationTime > state.expirationTime then
state.expirationTime = cast.expirationTime
state.changed = true
change = true
end
else
allstates[index] = {
show = true,
name = cast.name,
icon = cast.icon,
changed = true,
autoHide = true,
progressType = "timed",
duration = cast.expirationTime - cast.start,
expirationTime = cast.expirationTime,
spellId = cast.spellId,
castType = cast.castType,
notInterruptible = cast.notInterruptible,
target = cast.target,
unit = cast.showIcon and cast.target,
targetGUID = cast.targetGUID,
frame = WeakAuras.GetUnitFrame(cast.target),
casts = {
[sourceGUID] = true
},
targeted = cast.targeted,
showGlow = cast.showGlow,
playSound = cast.playSound,
bigIcon = cast.bigIcon,
showIcon = cast.showIcon,
}
change = true
end
end
-- count how much of the same cast is showing each icon
-- remove casts stopped from state.casts
-- remove state if state.casts is empty
for index, state in pairs(allstates) do
if state.show and state.showIcon then
local countcasts = 0
for sourceGUID,_ in pairs(state.casts) do
local cast = allcasts[sourceGUID]
if not cast
or (cast and cast.targetGUID ~= state.targetGUID)
then
state.casts[sourceGUID] = nil
else
countcasts = countcasts + 1
end
end
if state.stacks ~= countcasts then
state.stacks = countcasts
state.changed = true
change = true
end
-- hide if no cast
if countcasts == 0 then
state.show = false
state.changed = true
change = true
end
end
end
if change then
return true
end
end
end
end"]:207: in function <[string "--[==[ Error in 'Targeted Spells' ]==] retu..."]:1>
[string "=[C]"]: in function xpcall' [string "@WeakAuras\GenericTrigger.lua"]:548: in function <WeakAuras\GenericTrigger.lua:541> [string "@WeakAuras\GenericTrigger.lua"]:737: in function
ScanEventsInternal'
[string "@WeakAuras\GenericTrigger.lua"]:698: in function `ScanEvents'
[string "@WeakAuras\GenericTrigger.lua"]:850: in function <WeakAuras\GenericTrigger.lua:835>
Locals:
Skipped (In Encounter)
Getting the following errors today just after doing a /reloadui command or just simply logging into the game...
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:2 Error loading Interface/AddOns/LibDFramework-1.0/Libs/LibStub/LibStub.lua
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:3 Error loading Interface/AddOns/LibDFramework-1.0/Libs/CallbackHandler-1.0-7/CallbackHandler-1.0.lua
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:4 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/LibSharedMedia-3.0-8020003/lib.xml
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:5 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceGUI-3.0-41/AceGUI-3.0.xml
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:6 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceDBOptions-3.0-15/AceDBOptions-3.0.xml
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:7 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceLocale-3.0-6/AceLocale-3.0.xm
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:8 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceAddon-3.0-13/AceAddon-3.0.xm
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:9 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceDB-3.0-27/AceDB-3.0.xml
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:10 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceTimer-3.0-17/AceTimer-3.0.xml
1x Interface/AddOns/LibDFramework-1.0/embeds.xml:11 Couldn't open Interface/AddOns/LibDFramework-1.0/Libs/AceConfig-3.0-3/AceConfig-3.0.xml
test webhook !!
The following updates to LibGetFrame-1.0.lua will improve Healbot compatibility.
local defaultFramePriorities
23 - "^HealBot", -- healbot
23 + "^HealBot_HealUnit", -- healbot
24 + "^hbPet_HealUnit", -- healbot
local defaultTargetFrames
73 + "^hbExtra_HealUnit",
local defaultFocusFrames
103 + "^hbExtra_HealUnit",
local defaultRaidFrames
105 - "^HealBot",
108 + "^HealBot_HealUnit",
109 + "^hbPet_HealUnit",
Copy of my ticket from WeakAuras/WeakAuras2#3347
Weakauras sometimes fail to anchor to Plexus raidframes. Simple example given in reproduction steps.
But also with my normal UI that uses LunaUnitFrames (only for player & target frames - raid and party disabled) and Plexus for raid frames the provided example WeakAura initially anchors to the centor of the screen instead of to any raid frames. Opening and closing WeakAuras options sometimes anchors it to some random place on screen (fstack doesn't show any frame there). See attached screenshots.
After buffing Arcane Intellect and clicking it off the aura stops showing completely.
Sometimes I see it anchoring correctly to the Plexus raid frames and sometimes it anchors to the Luna Player/Target frames instead. In general it behaves very inconsistent.
WeakAuras 3.7.3
The Burning Crusade
No errors.
No response
!WA:2!LzvZYnssryKelZoTNfK1cowmXakCW6iyG1ZA5D8mWfqTDlBniBRTvB7HDiqQ6UlPUg3QQMQQ2Y2CtXeeZjoOhH(naDdo6NGkCS8c4hbFHRKv1T1S7YfP6NSQkZV87lZU0WAJRfwt4U1gpFJTQf(UxWV8OHdfy5V57XphZfeg9HZj0Hm(yKeMSsYNqgrzC8rj6PcNZXuPdNZ4Ib3HObrmEloAm27YeSFVDCDCoCgIsYp822JreAlBjSPnLrX3eMYn70xVexGdy0qXumsyUa1sxRh2tYX0rYOh4kKiUSLYsTK6rQps9dH))rpWFiHserF3LDJjJjYLMjWXd7YiuPRB7923Rrkpo5NfjLjIF3tF6e0i2ge2tF(ROn(S9AD1vp9lMH4bDmV3BxjlivizJ3JZMuo5JZN00eKDX8JPez5KQPc83APbZ9z8qmFhwmJ)YsLkvjlFbNWry(M17sUahZVihL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VV4l2unC1znLG8Am4H6R25caJ6Lt5J0b2EA4OFadKgrM7ENyWCXGKAfUhraPkkqpGKN6pdGgjC69nGQTzMbod0Nza0k51ZtYlJEaleNLsHSJ5Kz64PhC7hrVwy(RjKQauoLA0iUsYyC4mDCyuipjPAtEaIIR3gQTehdxsYYfRyZjqGcvtWQqfw9vR(jL)VDv)fv)caTh06ks5Rcsw(Esabym91Y6fO59TDsQvqCZlh0HnIeuozzKX7kwuhlvMhseVjLAwVbIEzUKAH4SY0Hf6IpsvUK67VI6dgyRxkPAlo5Q6FzkkuxITUNN6d3w9Wt8t4yq9NHItIqDtJfyO773QzC1VBVz1Y)FR8XQtU(EfKUtz0SfAu1)mtlY6Xs5q3g1pVKAnRP3BBEfHgMkcQtuT2wT36(5ir5zHS(5dJuvxx9VkR(3rQLVFWtSu)cvDZZ0i)zGUD39(MDMEDQ)G6VL8JV)X0ffaAKr)py6eO03PCuY0tlgO2xDIgD1vC1MwR(nlUDnGUzMwHN3)6TpI)gW1idVu1W1aDvUvxqr)LsbglSBctTVIXgx62fyrRy0iHIAQU0yTpnjp6FFY7(NxxxvfR(9vYEF5S1SSuF2Qdl6OckL8pqbouXkya3twU3FnfXX1BbTYRFAebQ8znd6aKBtrB7(fY)b3umNz6px6(Bs3XRss1cMfvcF2Nw363(WET31XuhDZI6OdCdw495NOX34eQ)JFeMmks(4BxaLfyG6xo)zN9YV809)Qw8UjQFIAfvLhQtP)Vp
After doing dungeons for a while, I sometimes start generating the following error:
267x LibGetFrame-1.0\LibGetFrame-1.0-2.lua:77: UIParent:GetChildren(): Stack overflow
LibGetFrame-1.0\LibGetFrame-1.0-2.lua:77: in function <LibGetFrame-1.0\LibGetFrame-1.0.lua:72>
LibGetFrame-1.0\LibGetFrame-1.0-2.lua:121: in function <LibGetFrame-1.0\LibGetFrame-1.0.lua:96>
LibGetFrame-1.0\LibGetFrame-1.0-2.lua:180: in function GetFrame' [string "--[[ Error in 'Scan Events' ]] return funct..."]:155: in function <[string "--[[ Error in 'Scan Events' ]] return funct..."]:1> [C]: in function
xpcall'
WeakAuras\GenericTrigger.lua:517: in function <WeakAuras\GenericTrigger.lua:511>
WeakAuras\GenericTrigger.lua:637: in function ScanEventsInternal' WeakAuras\GenericTrigger.lua:624: in function
ScanEvents'
WeakAuras\GenericTrigger.lua:686: in function <WeakAuras\GenericTrigger.lua:677>
Locals:
InCombatSkipped
This was happening before LibGetFrame, too (back when it was just part of the WA).
I use ElvUI frames, if that matters.
Please add to the public interface a way to retrieve the player unit frame, even when the player is in a group. For example, add an ignoreGroupFrame
option, or expose defaultPlayerFrames
so I can plug that in as the value for framePriorities
.
Since minor version 42 (the introduction of coroutine), memory usage (and especially spikes) have gotten pretty severe. I've witnessed a 2 orders of magnitude increase between version 41 and 42 at the top end. This is a constant big spike->collection cycle.
I'm not sure if this is just a calculated side effect weighed against the benefits, but just thought I'd let you know.
When using Elvui Partyframes and being in a group, the first call of lib.GetUnitFrame(unit) in the current play session returns nil. The second call returns the apropriate partyframe. This appears to happen for all units in the group.
I can't figure out how to attach a icon group to the players nameplate generically. I can do it for elvui but not for default
This doesn't work.
local LGF = LibStub("LibGetFrame-1.0")
local frame = LGF.GetUnitFrame("player" , {ignorePartyFrame = true, ignoreRaidFrame = true})
return frame
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.