WoWInterface SVN StellarUF

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/Stuf_Range
    from Rev 121 to Rev 124
    Reverse comparison

Rev 121 → Rev 124

Stuf_Range.toc
1,4 → 1,4
## Interface: 50400
## Interface: 60000
## Title: Stuf_Range
## Author: TotalPackage
## Notes: Displays estimate distance using LibRangeCheck-2.0.
libs/LibRangeCheck-2.0.lua
1,6 → 1,6
--[[
Name: LibRangeCheck-2.0
Revision: $Revision: 136 $
Revision: $Revision: 149 $
Author(s): mitch0
Website: http://www.wowace.com/projects/librangecheck-2-0/
Description: A range checking library based on interact distances and spell ranges
41,7 → 41,7
-- @class file
-- @name LibRangeCheck-2.0
local MAJOR_VERSION = "LibRangeCheck-2.0"
local MINOR_VERSION = tonumber(("$Revision: 136 $"):match("%d+")) + 100000
local MINOR_VERSION = tonumber(("$Revision: 149 $"):match("%d+")) + 100000
 
local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then
386,9 → 386,7
local checkers_Item = setmetatable({}, {
__index = function(t, item)
local func = function(unit)
if IsItemInRange(item, unit) == 1 then
return true
end
return IsItemInRange(item, unit)
end
t[item] = func
return func
436,6 → 434,9
 
-- return the spellIndex of the given spell by scanning the spellbook
local function findSpellIdx(spellName)
if not spellName or spellName == "" then
return nil
end
for i = 1, getNumSpells() do
local spell, rank = GetSpellBookItemName(i, BOOKTYPE_SPELL)
if spell == spellName then return i end
462,7 → 463,7
if spellList then
for i = 1, #spellList do
local sid = spellList[i]
local name, _, _, _, _, _, _, minRange, range = GetSpellInfo(sid)
local name, _, _, _, minRange, range = GetSpellInfo(sid)
local spellIdx = findSpellIdx(name)
if spellIdx and range then
minRange = math.floor(minRange + 0.5)
645,7 → 646,6
if type(spell) == 'number' then
spell = GetSpellInfo(spell)
end
if not spell then return nil end
return findSpellIdx(spell)
end
 
676,7 → 676,7
local item = items[i]
if GetItemInfo(item) then
minRangeCheck = function(unit)
return (IsItemInRange(item, unit) == 1)
return IsItemInRange(item, unit)
end
break
end