Skip to content

Commit 098fa72

Browse files
committed
Fixed mage spells for Cata classic
1 parent b464b79 commit 098fa72

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

changelog.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.13.2:
2+
- Fixed mage spell for Cataclysm classic
3+
14
1.13.1:
25
- Update for War Within expansion
36
- Add new challenge portals (thanks to imjayc2)

portals.lua

+3-21
Original file line numberDiff line numberDiff line change
@@ -287,23 +287,6 @@ local function tconcat(t1, t2)
287287
return t1
288288
end
289289

290-
function findSpell(spellName)
291-
local i = 1
292-
local spellType = Enum.SpellBookSpellBank.Player or BOOKTYPE_SPELL
293-
while true do
294-
local s = GetSpellBookItemName(i, spellType)
295-
if not s then
296-
break
297-
end
298-
299-
if s == spellName then
300-
return i
301-
end
302-
303-
i = i + 1
304-
end
305-
end
306-
307290
-- returns true, if player has item with given ID in inventory or bags and it's not on cooldown
308291
local function hasItem(itemID)
309292
local item, found, id
@@ -478,14 +461,13 @@ local function GenerateLinks(spells)
478461

479462
for _, unTransSpell in ipairs(spells) do
480463
if IsPlayerSpell(unTransSpell[1]) then
481-
local spellId, spellName
482-
local spell, _, spellIcon = GetSpellInfo(unTransSpell[1])
464+
local spellName
465+
local spell, _, spellIcon, _, _, _, spellId = GetSpellInfo(unTransSpell[1])
483466
if type(spell) == "table" then
484-
spellId = findSpell(spell.name)
467+
spellId = spell.spellID
485468
spellIcon = spell.iconID
486469
spellName = spell.name
487470
else
488-
spellId = findSpell(spell)
489471
spellName = spell
490472
end
491473

0 commit comments

Comments
 (0)