WoW LibSpellRange-1.0 addon Dragonflight/Wrath of the Lich King Classic 2024
logo
wow addon LibSpellRange-1.0

LibSpellRange-1.0

Game Version: 9.0.1
Total Downloads: 33,058
Updated: Oct 18, 2020
Created: Sep 9, 2012
download LibSpellRange-1.0Download Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
1.0.15 release 8.06 KB Oct 18, 2020 9.0.1 1,628 download LibSpellRange-1.0 1.0.15 releaseDownload
1.0.14 release 8.02 KB Oct 16, 2020 9.0.1 1,164 download LibSpellRange-1.0 1.0.14 releaseDownload
1.0.13 release 7.17 KB Dec 24, 2018 8.1.0 4,850 download LibSpellRange-1.0 1.0.13 releaseDownload
1.0.12 release 7.99 KB Jul 7, 2018 7.3.5 7,401 download LibSpellRange-1.0 1.0.12 releaseDownload
1.0.011 release 6.88 KB Oct 31, 2016 7.1.0 6,176 download LibSpellRange-1.0 1.0.011 releaseDownload
1.0.010 release 6.87 KB Jul 26, 2016 7.0.3 5,486 download LibSpellRange-1.0 1.0.010 releaseDownload
1.0.009 release 7.01 KB Apr 19, 2016 6.2.4 757 download LibSpellRange-1.0 1.0.009 releaseDownload
1.0.007 release 6.86 KB Oct 14, 2014 6.0.2 2,016 download LibSpellRange-1.0 1.0.007 releaseDownload
1.0.004 +1 More release 6.96 KB Sep 10, 2012 5.0.4 1,189 download LibSpellRange-1.0 1.0.004
+1 More releaseDownload
1.0.003 +1 More release 6.74 KB Sep 10, 2012 5.0.4 139 download LibSpellRange-1.0 1.0.003
+1 More releaseDownload
1.0.002 +1 More release 6.62 KB Sep 10, 2012 5.0.4 111 download LibSpellRange-1.0 1.0.002
+1 More releaseDownload
1.0.15-2-g56a028d-alpha alpha 8.70 KB Nov 8, 2022 10.0.2 96 download LibSpellRange-1.0 1.0.15-2-g56a028d-alpha alphaDownload
1.0.15-1-gb706012-alpha alpha 8.55 KB Nov 8, 2022 10.0.2 4 download LibSpellRange-1.0 1.0.15-1-gb706012-alpha alphaDownload
1.0.14-1-g78fb517-alpha alpha 7.97 KB Oct 18, 2020 9.0.1 15 download LibSpellRange-1.0 1.0.14-1-g78fb517-alpha alphaDownload
1.0.13-2-g2d22003-alpha alpha 8.01 KB Oct 16, 2020 9.0.1 12 download LibSpellRange-1.0 1.0.13-2-g2d22003-alpha alphaDownload
1.0.13-1-gbc1ce0a-alpha alpha 7.94 KB Feb 23, 2019 8.1.0 297 download LibSpellRange-1.0 1.0.13-1-gbc1ce0a-alpha alphaDownload
r19 alpha 6.83 KB Oct 31, 2016 7.1.0 66 download LibSpellRange-1.0 r19 alphaDownload
r17 alpha 6.83 KB Jul 26, 2016 7.0.3 49 download LibSpellRange-1.0 r17 alphaDownload
r15 alpha 6.96 KB Apr 19, 2016 6.2.4 76 download LibSpellRange-1.0 r15 alphaDownload
r14 alpha 6.93 KB Apr 19, 2016 6.2.4 45 download LibSpellRange-1.0 r14 alphaDownload
r12 alpha 6.81 KB Oct 14, 2014 6.0.2 59 download LibSpellRange-1.0 r12 alphaDownload
r11 alpha 6.76 KB Aug 19, 2014 5.4.8 150 download LibSpellRange-1.0 r11 alphaDownload
r9 +1 More alpha 6.92 KB Sep 10, 2012 5.0.4 44 download LibSpellRange-1.0 r9
+1 More alphaDownload
r7 +1 More alpha 6.70 KB Sep 10, 2012 5.0.4 40 download LibSpellRange-1.0 r7
+1 More alphaDownload
r5 +1 More alpha 6.58 KB Sep 10, 2012 5.0.4 37 download LibSpellRange-1.0 r5
+1 More alphaDownload
r4 +1 More alpha 6.50 KB Sep 10, 2012 5.0.4 47 download LibSpellRange-1.0 r4
+1 More alphaDownload
r3 +1 More alpha 6.48 KB Sep 10, 2012 5.0.4 56 download LibSpellRange-1.0 r3
+1 More alphaDownload
r2 +1 More alpha 6.45 KB Sep 10, 2012 5.0.4 38 download LibSpellRange-1.0 r2
+1 More alphaDownload

Description

Share this:

Background

Blizzard’s IsSpellInRange API has always been very limited – you either must have the name of the spell, or its spell book ID.

Checking directly by spellID is simply not possible.
Now, in Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work – instead of giving you a new spell when leaned, they replace existing spells. These replacement spells do not work with Blizzard’s IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.

Usage

LibSpellRange-1.0 exposes an enhanced version of IsSpellInRange that:

  • Allows ranged checking based on both spell name and spellID.
  • Works correctly with replacement spells that will not work using Blizzard’s IsSpellInRange method alone.

SpellRange.IsSpellInRange(spell, unit)

Improved spell range checking function.

Parameters

spell
Name or spellID of a spell that you wish to check the range of. The spell must be a spell that you have in your spellbook or your pet’s spellbook.
unit
UnitID of the spell that you wish to check the range on.

Return value

Exact same returns as http://wowprogramming.com/docs/api/IsSpellInRange

Usage

-- Check spell range by spell name on unit "target"
local SpellRange = LibStub("SpellRange-1.0")
local inRange = SpellRange.IsSpellInRange("Stormstrike", "target")

-- Check spell range by spellID on unit "mouseover"
local SpellRange = LibStub("SpellRange-1.0")
local inRange = SpellRange.IsSpellInRange(17364, "mouseover")

SpellRange.SpellHasRange(spell)

Improved SpellHasRange.

Parameters

spell
Name or spellID of a spell that you wish to check for a range. The spell must be a spell that you have in your spellbook or your pet’s spellbook.

Return value

Exact same returns as http://wowprogramming.com/docs/api/SpellHasRange

Usage

-- Check if a spell has a range by spell name
local SpellRange = LibStub("SpellRange-1.0")
local hasRange = SpellRange.SpellHasRange("Stormstrike")

-- Check if a spell has a range by spellID
local SpellRange = LibStub("SpellRange-1.0")
local hasRange = SpellRange.SpellHasRange(17364)

Comments

Add a comment