Subject: Suggested improvements for TagsDatabase.lua#353
Conversation
|
Hi, Thanks for the PR. I'll take a look, as I'm working on Party/Raid Frames currently, these tags are likely to be more impactful. Localising the |
…et boolean taint Previous attempt removed == true/false comparators, but the direct boolean test (and/or) on secret boolean values still causes taint. Wrap all UnitIsDead/Ghost/Connected/AFK/DND return values with UUF:IsSecretValue before testing, matching the addon's existing pattern in Auras.lua and CastBar.lua.
There was a problem hiding this comment.
As for the rest of the localisation, if DEAD is a localised term, there should be no need to have both. At this point, I would just change to DEAD instead and when localisation is more in scope, I will take some additional time to look into this.
85523e9 - has migrated over to the localised value that exists. Ghost / Offline will need to be handled when localisation comes in future updates.
| afkDndFrame:SetScript("OnEvent", function() | ||
| for unit in pairs(UUF.db.profile.Units) do | ||
| local frame = UUF[unit:upper()] | ||
| if frame and frame.UpdateTags then | ||
| frame:UpdateTags() | ||
| end | ||
| end |
There was a problem hiding this comment.
I believe the goal here is to update the player when their status changes, looping over all the units seems like a large overkill.
| end | ||
|
|
||
| local function UpdatePips(element, stages) | ||
| if(not stages) then return end |
There was a problem hiding this comment.
Library edits should not be made here. On release, the latest master branch of oUF is packaged, therefore, overwriting libraries is ignored.
Subject: Suggested improvements for TagsDatabase.lua
Hi, here are some enhancements I made to
Core/Config/TagsDatabase.luain the health tag methods. Feel free to use or ignore any of them.Changes made:
1. Localized status text for Dead & Offline
Replaced hardcoded
"Dead"and"Offline"with WoW global strings so they auto-localize:2. AFK / DND appended as suffix instead of replacing health
Previously AFK and DND replaced the health value entirely (same as Dead/Ghost/Offline). Changed them to append as a suffix after health text, e.g.
123K (暂离)/123K (勿扰):3. Added UNIT_FLAGS to health tag events
So tags refresh when AFK/DND status changes:
4. Added PLAYER_FLAGS_CHANGED handler
Since
UNIT_FLAGSdoesn't fire for the player's own AFK/DND changes, added a standalone handler at the bottom:Things to discuss with you:
UnitIsFeignDeath()) – currently left in the code asUnitIsFeignDeath(unit) and "Feign Death". However, this API only returns valid data for friendly units; hostile units always show false.DEAD/PLAYER_OFFLINE/AFK/DND). Currently using hardcoded"Ghost". Any idea for a localized alternative, or is hardcoded English fine?Let me know if you'd like a clean diff instead.