Mobs don't leash by distance, they leash by time
After the swing timer, I wanted a warning before a mob I’m kiting resets and runs home. My assumption was that leashing is about distance: pull a mob too far and it gives up. So the first version of LeashTracker measured how far the target was from where the fight started.
It didn’t line up with what happened in game. Looking into how AzerothCore handles it showed why: the reset is mainly based on time. If no damage is exchanged in either direction for roughly 10 to 12 seconds, the mob evades and resets. There’s also a small inner radius where mobs never reset.
So LeashTracker was rebuilt around the right thing:
- It tracks the time since the last damage exchange, not distance.
- It learns per-mob timeouts by watching for the “Evade” aura being applied in the combat log.
Putting it together. By then I had a few separate addons, so they were merged into one: Etsky’s Combat Addon. It has:
- the melee and ranged swing timer
- LeashTracker
- a resource bar for Energy, Mana, Rage and Runic Power, with a highlight near cap and a rough Five-Second-Rule indicator for mana users
A /ecom menu toggles each module and handles unlocking, locking and resetting bar positions. All debug commands were stripped out of the final version.
Lesson learned: check how the server actually implements a mechanic before building UI around how you think it works.