Files
coa-omen/Omen.toc
T
florian.berthold b6d42dfe5d Add OmenSync: addon-channel fallback for Vol'jin party threat
The CoA Vol'jin core does not push UnitDetailedThreatSituation data
for party-member units, so vanilla Omen draws only the local
player's bar in 5-mans. The same install on Bronzebeard/classic+
shows the whole party because that core does push the data. The gap
is server-side, not client-side, and there is no Omen flag that
fixes it.

OmenSync layers a tiny SendAddonMessage("OMSYNC", …, "PARTY"|"RAID")
relay on top:
- Each player's Omen broadcasts its own player+pet threat values
  (throttled, ~0.4s + 5% delta) every time updatethreat() succeeds
  via the API path.
- Receivers store incoming values keyed by senderGUID/mobGUID and
  serve them as a fallback in updatethreat() whenever
  UnitDetailedThreatSituation returns nil.

When the API does push data (Bronzebeard) the existing path still
wins; sync values are simply unused, so this is a no-op on healthy
realms. Both peers must run a fork that emits the OMSYNC prefix.

Wire format keeps each message under the 255-byte AddonMessage cap:
    <subjectGUID>|<mobGUID>|<threatValue>|<isTanking 0|1>
Sender's name comes from CHAT_MSG_ADDON's sender arg. Subject GUID
distinguishes the player and pet broadcasts each Omen instance
emits.

Hook in Omen.lua's local updatethreat():
- After UnitDetailedThreatSituation returns nil for any unit, try
  Omen:SyncGetThreat(guid, mobGUID).
- After it returns a value for "player" or "pet", call
  Omen:SyncBroadcastThreat to relay it to peers.
2026-05-08 23:40:17 +02:00

63 lines
2.2 KiB
TeX

## Interface: 30300
## Version: 3.0.9-coa1
## Title: Omen3
## Notes: A lightweight, flexible, multi-target threat meter. (CoA fork: custom class colors)
## Notes-ruRU: Лёгкий, гибкий, измеритель угрозы.
## Notes-frFR: Un "threat meter" léger, flexible et multi-cibles.
## Notes-zhCN: 一个灵活的,多目标的,低资源占用的威胁值计量器。
## Notes-zhTW: 一個輕量級、有彈性、可監視多個目標的仇恨統計插件。
## Notes-koKR: 다중-대상에 대한 위협수준 미터기로 보여줍니다.
## Author: Xinhuan
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibSink-2.0, LibDBIcon-1.0, !ClassColors
## X-eMail: xinhuan @ gmail DOT com
## X-Donate: PayPal:xinhuan @ gmail DOT com
## X-Category: Combat
## X-ConfigMode: true
## SavedVariables: Omen3DB
## X-Curse-Packaged-Version: v3.0.9
## X-Curse-Project-Name: Omen Threat Meter
## X-Curse-Project-ID: omen-threat-meter
## X-Curse-Repository-ID: wow/omen-threat-meter/mainline
#@no-lib-strip@
Libs\LibStub\LibStub.lua
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
Libs\AceAddon-3.0\AceAddon-3.0.xml
Libs\AceGUI-3.0\AceGUI-3.0.xml
Libs\AceConfig-3.0\AceConfig-3.0.xml
Libs\AceConsole-3.0\AceConsole-3.0.xml
Libs\AceDB-3.0\AceDB-3.0.xml
Libs\AceEvent-3.0\AceEvent-3.0.xml
Libs\AceLocale-3.0\AceLocale-3.0.xml
Libs\AceTimer-3.0\AceTimer-3.0.xml
Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml
Libs\LibSharedMedia-3.0\lib.xml
Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
Libs\LibSink-2.0\lib.xml
#@end-no-lib-strip@
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
#@no-lib-strip@
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
#@end-no-lib-strip@
Localization\enUS.lua
Localization\deDE.lua
Localization\frFR.lua
Localization\esES.lua
Localization\koKR.lua
Localization\zhTW.lua
Localization\zhCN.lua
Localization\ruRU.lua
## CoA patches ##
# Loaded before Omen.lua so RAID_CLASS_COLORS is populated when
# Omen.lua takes its local snapshot at the top of the file.
CoAClassColors.lua
Omen.lua
# Loaded after Omen.lua so the AceAddon namespace exists and we can
# attach Sync* methods. Provides addon-channel fallback for the threat
# data Vol'jin/CoA does not push for party members.
OmenSync.lua