Subject: Suggested improvements for TagsDatabase.lua#335
Open
adavak wants to merge 2 commits into
Open
Conversation
|
@adavak i think you got your gh creds stolen by a worm 😭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.