RedditPP Mascot

RedditPP

r/wowaddons • … • u/therinlahhan

Trying to build a mod that displays outgoing damage with colors for elemental damage. Having a few issues.

![img](b4i0y02mq5rh1)

I'm working on a small combat-text addon for **WoW Classic: Forever** and could use some advice from people more familiar with the current addon API/restrictions.

The goal is to replace regular floating damage numbers with our own numbers that are colored by damage school:

* Physical = white * Holy = gold * Fire = red/orange * Nature = green * Frost = blue * Shadow = purple * Arcane = pink/magenta

It also displays healing and handles crit sizing, but I'm not trying to build another full SCT addon with loot, XP, icons, cooldown notifications, etc. The main goal is just clean, Blizzard-style floating damage numbers with school coloring.

On Forever, the traditional combat-log approach appears to be restricted/protected. Registering things like `COMBAT_LOG_EVENT_UNFILTERED` causes the protected-action/Blizzard-UI-only error, so I'm specifically trying to stay within APIs that are currently allowed.

The main source of damage information I'm using is:

UNIT\_COMBAT(unit, action, flagText, amount, schoolMask)

This works well and gives us the amount and damage school. The problem is that `unit` identifies the **victim**, not the attacker, so if two players are attacking the target, there's leakage and the addon will show damage from both players on my screen.

I've been taking an approach similar to the modern/fallback methodology used by MSBT: correlate `UNIT_COMBAT` events with signals that are known to originate from the local player. It works for some actions/spells but not for everything. Occasionally the addon suppresses my damage instead of displaying it, and occasionally still other players' damage leaks through.

So I'm mainly wondering if anyone has any ideas for a better way to approach this, of pulling info from the combat log specifically for the player.

— 0