{"id":18402611,"url":"https://github.com/ascott18/libspellrange-1.0","last_synced_at":"2025-04-07T07:32:15.435Z","repository":{"id":70269891,"uuid":"140120422","full_name":"ascott18/LibSpellRange-1.0","owner":"ascott18","description":"WoW Addon Lib that provides more robust spell range checking functionality.","archived":false,"fork":false,"pushed_at":"2024-08-19T19:23:08.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T14:34:52.105Z","etag":null,"topics":["library","world-of-warcraft","world-of-warcraft-addon"],"latest_commit_sha":null,"homepage":"https://wow.curseforge.com/projects/libspellrange-1-0","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascott18.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-07T22:20:52.000Z","updated_at":"2025-01-04T13:51:10.000Z","dependencies_parsed_at":"2024-08-19T20:41:47.645Z","dependency_job_id":null,"html_url":"https://github.com/ascott18/LibSpellRange-1.0","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascott18%2FLibSpellRange-1.0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascott18%2FLibSpellRange-1.0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascott18%2FLibSpellRange-1.0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascott18%2FLibSpellRange-1.0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascott18","download_url":"https://codeload.github.com/ascott18/LibSpellRange-1.0/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612349,"owners_count":20966724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","world-of-warcraft","world-of-warcraft-addon"],"created_at":"2024-11-06T02:42:58.366Z","updated_at":"2025-04-07T07:32:15.202Z","avatar_url":"https://github.com/ascott18.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibSpellRange-1.0\n\n## Background\n\nBlizzard's `IsSpellInRange` API has always been very limited - you either must have the name of the spell, \nor its spell book ID. Checking directly by spellID is simply not possible. \nNow, since Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work - \ninstead of giving you a new spell when leaned, they replace existing spells. These replacement spells do \nnot work with Blizzard's IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.\n\n## Usage\n\n**LibSpellRange-1.0** exposes an enhanced version of IsSpellInRange that:\n\n*   Allows ranged checking based on both spell name and spellID.\n*   Works correctly with replacement spells that will not work using Blizzard's IsSpellInRange method alone.\n*   Attempts to works with pet spells via the action bar API, which as of some indeterminate recent WoW version no longer work with IsSpellInRange.\n\n### `SpellRange.IsSpellInRange(spell, unit)` - Improved `IsSpellInRange`\n\n#### Parameters\n\n- `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.\n- `unit` - UnitID of the spell that you wish to check the range on.\n\n#### Return value\n\nExact same returns as [the built-in `IsSpellInRange`](http://wowprogramming.com/docs/api/IsSpellInRange.html)\n\n#### Usage\n\n``` lua\n-- Check spell range by spell name on unit \"target\"\nlocal SpellRange = LibStub(\"SpellRange-1.0\")\nlocal inRange = SpellRange.IsSpellInRange(\"Stormstrike\", \"target\")\n\n-- Check spell range by spellID on unit \"mouseover\"\nlocal SpellRange = LibStub(\"SpellRange-1.0\")\nlocal inRange = SpellRange.IsSpellInRange(17364, \"mouseover\")\n```\n\n### `SpellRange.SpellHasRange(spell)` - Improved `SpellHasRange`\n\n#### Parameters\n\n- `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.\n\n#### Return value\n\nExact same returns as [the built-in `SpellHasRange`](http://wowprogramming.com/docs/api/SpellHasRange.html)\n\n#### Usage\n\n``` lua\n-- Check if a spell has a range by spell name\nlocal SpellRange = LibStub(\"SpellRange-1.0\")\nlocal hasRange = SpellRange.SpellHasRange(\"Stormstrike\")\n\n-- Check if a spell has a range by spellID\nlocal SpellRange = LibStub(\"SpellRange-1.0\")\nlocal hasRange = SpellRange.SpellHasRange(17364)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascott18%2Flibspellrange-1.0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascott18%2Flibspellrange-1.0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascott18%2Flibspellrange-1.0/lists"}