LibSpellRange-1.0: Smarter Spell Range Checks in WoW

LibSpellRange-1.0 fixes spellID range checks and replacement spells for World of Warcraft. Simplify your addon code with reliable range detection today.

Download LibSpellRange for World of Warcraft 11.0.2, 11.0.0, 10.2.5, 10.0.2, 9.0.1, 8.1.0

Original name: LibSpellRange

World of Warcraft: 1.15.3, 10.0.2, 10.2.5, 11.0.0, 11.0.2, 5.0.4, 5.4.8, 6.0.2, 6.2.4, 7.0.3, 7.1.0, 7.3.5, 8.1.0, 9.0.1

FileVersionLoaderSize
LibSpellRange-1.0-1.0.15-6-g705067e-alpha.zip1.15.3—10 КБDownload
LibSpellRange-1.0-1.0.15-2-g56a028d-alpha.zip10.0.2—9 КБDownload
LibSpellRange-1.0-1.0.15-1-gb706012-alpha.zip10.0.2—9 КБDownload
LibSpellRange-1.0-1.0.15-3-gd650c08-alpha.zip10.2.5—9 КБDownload
LibSpellRange-1.0-1.0.15-5-gdc7cc2c-alpha.zip11.0.0—9 КБDownload
LibSpellRange-1.0-1.0.15-9-g49da263-alpha.zip11.0.2—10 КБDownload
LibSpellRange-1.0-1.0.15-8-g985cdda-alpha.zip11.0.2—10 КБDownload
LibSpellRange-1.0-1.0.15-7-gfd681b7-alpha.zip11.0.2—10 КБDownload
LibSpellRange-1.0-r2.zip5.0.4—6 КБDownload
LibSpellRange-1.0-1.0.004.zip5.0.4—7 КБDownload
LibSpellRange-1.0-1.0.004-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r9.zip5.0.4—7 КБDownload
LibSpellRange-1.0-r9-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-1.0.003-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r2-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r3-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r3.zip5.0.4—6 КБDownload
LibSpellRange-1.0-r4-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r4.zip5.0.4—7 КБDownload
LibSpellRange-1.0-r5-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-r5.zip5.0.4—7 КБDownload
LibSpellRange-1.0-1.0.002-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-1.0.003.zip5.0.4—7 КБDownload
LibSpellRange-1.0-r7.zip5.0.4—7 КБDownload
LibSpellRange-1.0-r7-nolib.zip5.0.4—3 КБDownload
LibSpellRange-1.0-1.0.002.zip5.0.4—7 КБDownload
LibSpellRange-1.0-r11.zip5.4.8—7 КБDownload
LibSpellRange-1.0-r12.zip6.0.2—7 КБDownload
LibSpellRange-1.0-1.0.007.zip6.0.2—7 КБDownload
LibSpellRange-1.0-1.0.009.zip6.2.4—7 КБDownload
LibSpellRange-1.0-r14.zip6.2.4—7 КБDownload
LibSpellRange-1.0-r15.zip6.2.4—7 КБDownload
LibSpellRange-1.0-1.0.010.zip7.0.3—7 КБDownload
LibSpellRange-1.0-r17.zip7.0.3—7 КБDownload
LibSpellRange-1.0-1.0.011.zip7.1.0—7 КБDownload
LibSpellRange-1.0-r19.zip7.1.0—7 КБDownload
LibSpellRange-1.0-1.0.12.zip7.3.5—8 КБDownload
LibSpellRange-1.0-1.0.13-1-gbc1ce0a-alpha.zip8.1.0—8 КБDownload
LibSpellRange-1.0-1.0.13.zip8.1.0—7 КБDownload
LibSpellRange-1.0-1.0.13-2-g2d22003-alpha.zip9.0.1—8 КБDownload
LibSpellRange-1.0-1.0.14.zip9.0.1—8 КБDownload
LibSpellRange-1.0-1.0.14-1-g78fb517-alpha.zip9.0.1—8 КБDownload
LibSpellRange-1.0-1.0.15.zip9.0.1—8 КБDownload

LibSpellRange-1.0

If you have ever tried to build a World of Warcraft addon that reacts to spell range, you have probably run into the same wall every developer hits: Blizzard's built-in IsSpellInRange API is frustratingly limited. You either need the exact spell name or its spell book ID, and checking directly by spellID simply is not possible. LibSpellRange-1.0 exists to solve that problem once and for all.

This lightweight library exposes an enhanced version of the range-checking API that works the way developers always wished the default function would. It accepts both spell names and spellIDs, and it correctly handles the replacement spells that broke so many range-based addons starting in Mists of Pandaria.

Why Blizzard's Default API Falls Short

To understand the value of this library, you need to know a bit of history. When Mists of Pandaria launched, Blizzard changed how many talents and specialization spells work. Instead of handing you a brand-new spell when you learn a talent, the game now replaces an existing spell in your spellbook. These replacement spells do not work with Blizzard's IsSpellInRange function whatsoever. Addons that relied on the old behavior suddenly returned nil or failed outright, and the limitation is exactly what prompted the creation of this library.

LibSpellRange-1.0 wraps the original API and fills in the gaps, so your addon keeps working regardless of how Blizzard reshuffles spellbooks.

What the Library Actually Does

The library provides two improved functions that mirror the originals but with far more flexibility.

SpellRange.IsSpellInRange(spell, unit)

This is the improved spell range checking function. It accepts either the spell name or the spellID of a spell you want to check, plus the UnitID of your target. The spell must be one you have in your spellbook or your pet's spellbook. The return value matches Blizzard's original IsSpellInRange exactly, so swapping it into existing code is painless.

  • Check by name: SpellRange.IsSpellInRange("Stormstrike", "target")
  • Check by ID: SpellRange.IsSpellInRange(17364, "mouseover")

SpellRange.SpellHasRange(spell)

This is the improved SpellHasRange companion. Pass a spell name or spellID, and it tells you whether that spell has a range at all. Again, the return value matches the original API, so your conditional logic stays intact.

  • By name: SpellRange.SpellHasRange("Stormstrike")
  • By ID: SpellRange.SpellHasRange(17364)

Both functions are accessed through LibStub, the standard library loader used across the addon ecosystem, which means integration takes only a couple of lines of code.

Compatibility Across World of Warcraft Versions

One of the best things about this library is how broadly it travels. Whether you play Retail or prefer the older eras, the same range-checking logic applies. LibSpellRange-1.0 for World of Warcraft supports Retail, Classic, TBC, WotLK, Cataclysm, and MoP, making it a dependable dependency for addons that need to work across multiple client branches. Because it is a library rather than a standalone addon, it usually arrives bundled inside the addons that depend on it, but keeping it current on its own is still worthwhile if you develop or troubleshoot UI mods.

If you manage a heavily modded interface, the foxygame.net launcher makes life easier by letting you install LibSpellRange-1.0 straight from its addon catalog with a single click, so the library stays present and properly versioned alongside everything else you run.

How to Install LibSpellRange-1.0

Installation follows the standard addon routine and takes under a minute.

  • Close World of Warcraft completely before touching your addon folder.
  • Place the LibSpellRange-1.0 folder inside your World of Warcraft installation under Interface/AddOns.
  • Make sure the folder name matches exactly and is not nested inside a second folder after extraction.
  • Restart the game and confirm the addon appears in the character selection addon list.

If you would rather skip manual folder juggling, you can download LibSpellRange-1.0 through a launcher that handles extraction and updates for you, which is especially handy when a patch changes library behavior.

Who Should Use This Library

LibSpellRange-1.0 is aimed at addon authors and power users who tinker with their UI. If you are writing code that needs to know whether a spell is in range of a target, focus, mouseover, or arena enemy, this library removes the guesswork around replacement spells and spellID lookups. Players who simply install addons benefit too, because any addon built on this library will behave more reliably after talent and specialization changes.

Final Thoughts

Blizzard's range API has never been friendly to developers, and the Mists of Pandaria spell replacement changes only made things harder. LibSpellRange-1.0 closes that gap with a clean, LibStub-based wrapper that supports both spell names and spellIDs and returns values identical to the originals. Across Retail, Classic, TBC, WotLK, Cataclysm, and MoP, it remains a small but essential building block for any addon that cares about distance to its target.