mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-15 17:50:48 +00:00
libspell: return spell book id and its book-type
This commit is contained in:
+5
-3
@@ -83,10 +83,12 @@ end
|
|||||||
-- [number] Casting time of the spell in milliseconds
|
-- [number] Casting time of the spell in milliseconds
|
||||||
-- [number] Minimum range from the target required to cast the spell
|
-- [number] Minimum range from the target required to cast the spell
|
||||||
-- [number] Maximum range from the target at which you can cast the spell
|
-- [number] Maximum range from the target at which you can cast the spell
|
||||||
|
-- [number] The numeric spell-id of the spell
|
||||||
|
-- [number] The type of the spellbook that the spell is in
|
||||||
local spellinfo = {}
|
local spellinfo = {}
|
||||||
function libspell.GetSpellInfo(index, bookType)
|
function libspell.GetSpellInfo(index, bookType)
|
||||||
local cache = spellinfo[index]
|
local cache = spellinfo[index]
|
||||||
if cache then return cache[1], cache[2], cache[3], cache[4], cache[5], cache[6] end
|
if cache then return cache[1], cache[2], cache[3], cache[4], cache[5], cache[6], cache[7], cache[8] end
|
||||||
|
|
||||||
local name, rank, id
|
local name, rank, id
|
||||||
local icon = ""
|
local icon = ""
|
||||||
@@ -131,8 +133,8 @@ function libspell.GetSpellInfo(index, bookType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
spellinfo[index] = { name, rank, icon, castingTime, minRange, maxRange }
|
spellinfo[index] = { name, rank, icon, castingTime, minRange, maxRange, id, bookType }
|
||||||
return name, rank, icon, castingTime, minRange, maxRange
|
return name, rank, icon, castingTime, minRange, maxRange, id, bookType
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Reset all spell caches whenever new spells are learned/unlearned
|
-- Reset all spell caches whenever new spells are learned/unlearned
|
||||||
|
|||||||
Reference in New Issue
Block a user