forked from jp-ganis/JPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jpparse.lua
executable file
·571 lines (504 loc) · 21.1 KB
/
jpparse.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
--[[
JPS - WoW Protected Lua DPS AddOn
Copyright (C) 2011 Jp Ganis
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]--
--------------------------
-- LOCALIZATION
--------------------------
local L = MyLocalizationTable
local LOG=jps.Logger(jps.LogLevel.ERROR)
--------------------------
-- Functions CAST
--------------------------
-- GetSpellInfo -- name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange = GetSpellInfo(spellId or spellName)
-- IsHarmfulSpell(spellname) -- IsHelpfulSpell(spellname)) returns 1 or nil -- USELESS SOMES SPELLS RETURNS NIL AS OUBLI, SPIRIT SHELL
-- IsSpellInRange(spellID, spellType, unit) -- spellType String, "spell" or "pet"
-- IsSpellInRange(spellName, unit) -- returns 0 if out of range, 1 if in range, or nil if the unit is invalid.
function jps_IsSpellInRange(spell,unit)
if spell == nil then return false end
if unit == nil then unit = "target" end
local spellname = nil
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
local inRange = IsSpellInRange(spellname, unit)
if inRange == nil then
local myIndex = nil
local name, texture, offset, numSpells, isGuild = GetSpellTabInfo(2)
local booktype = "spell"
for index = offset+1, numSpells+offset do
-- Get the Global Spell ID from the Player's spellbook
local spellID = select(2, GetSpellBookItemInfo(index, booktype))
if spellID and spellname == GetSpellBookItemName(index, booktype) then
myIndex = index
break -- because we have a match
end
end
-- If a Pet Spellbook is found, do the same as above and try to get an Index on the Spell
local numPetSpells = HasPetSpells()
if myIndex == 0 and numPetSpells then
booktype = "pet"
for index = 1, numPetSpells do
-- Get the Global Spell ID from the Pet's spellbook
local spellID = select(2, GetSpellBookItemInfo(index, booktype))
if spellID and spellname == GetSpellBookItemName(index, booktype) then
myIndex = index
break -- Breaking out of the for/do loop, because we have a match
end
end
end
if myIndex then
inRange = IsSpellInRange(myIndex, booktype, unit)
end
return inRange
end
return inRange
end
-- Collecting the Spell GLOBAL SpellID, not to be confused with the SpellID
-- Matching the Spell Name and the GLOBAL SpellID will give us the Spellbook index of the Spell
-- With the Spellbook index, we can then proceed to do a proper IsSpellInRange with the index.
function jps_SpellHasRange(spell)
if spell == nil then return false end
local spellname = nil
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
local hasRange = SpellHasRange(spellname)
if hasRange == nil then
local myIndex = nil
local name, texture, offset, numSpells, isGuild = GetSpellTabInfo(2)
local booktype = "spell"
for index = offset+1, numSpells+offset do
-- Get the Global Spell ID from the Player's spellbook
local spellID = select(2, GetSpellBookItemInfo(index, booktype))
if spellID and spellname == GetSpellBookItemName(index, booktype) then
myIndex = index
break -- Breaking out of the for/do loop, because we have a match
end
end
if myIndex then
hasRange= SpellHasRange(myIndex, booktype)
end
return hasRange
end
return hasRange
end
function jps.IsSpellInRange(spell,unit)
if spell == nil then return false end
if jps.spellNeedSelect(spell) then return true end
--if jps_IsSpellInRange(spell,unit)~=1 then return false end
if jps_IsSpellInRange(spell,unit)==0 then return false end
return true
end
function jps.SpellHasRange(spell)
if spell == nil then return false end
if jps_SpellHasRange(spell)~=1 then return false end
return true
end
function jps.UnitExists(unit)
if unit == nil then return false end
if UnitExists(unit)== false then return false end
if UnitIsVisible(unit)==false then return false end
if UnitIsDeadOrGhost(unit)==true then return false end
return true
end
-- UnitInRange(unit) -- returns FALSE if out of range or if the unit is invalid. TRUE if in range
-- information is ONLY AVAILABLE FOR MEMBERS OF THE PLAYER'S GROUP
-- when not in a party/raid, the new version of UnitInRange returns FALSE for "player" and "pet". The old function returned true.
-- jps.IsSpellKnown(spell) can be use below lvl 90
function jps.canHeal(unit)
if not jps.UnitExists(unit) then return false end
if GetUnitName("player") == GetUnitName(unit) then return true end
if UnitCanAssist("player",unit)==false then return false end -- UnitCanAssist(unitToAssist, unitToBeAssisted) return 1 if the unitToAssist can assist the unitToBeAssisted, nil otherwise
if UnitIsFriend("player",unit)==false then return false end -- UnitIsFriend("unit","otherunit") return 1 if otherunit is friendly to unit, nil otherwise.
-- PNJ returns 1 with UnitIsFriend -- PNJ returns 1 or nil (Vendors) with UnitCanAssist
if UnitInVehicle(unit)==true then return false end -- inVehicle - 1 if the unit is in a vehicle, otherwise nil
if jps.PlayerIsBlacklisted(unit) then return false end
if not select(1,UnitInRange(unit)) then return false end -- return FALSE when not in a party/raid reason why to be true for player GetUnitName("player") == GetUnitName(unit)
return true
end
-- INVALID IF THE NAMED PLAYER IS NOT A PART OF YOUR PARTY OR RAID -- NEED .."TARGET"
-- JPS.CANDPS IS WORKING ONLY FOR PARTYn..TARGET AND RAIDn..TARGET NOT FOR UNITNAME..TARGET
-- check if we can damage a unit
function jps.canDPS(unit)
if not jps.UnitExists(unit) then return false end
if jps.PvP then
if jps.buff("Ice Block", unit) then return false end
if jps.buff("Dispersion", unit) then return false end
if jps.buff("Divine Shield", unit) then return false end
if jps.buff("Deterrence", unit) then return false end
if jps.buff("Evasion", unit) then return false end
if jps.buff("Cloak of Shadows", unit) then return false end
end
if (string.match(GetUnitName(unit), L["Dummy"])) then return true end
if UnitCanAttack("player", unit)==false then return false end-- UnitCanAttack(attacker, attacked) return 1 if the attacker can attack the attacked, nil otherwise.
if UnitIsEnemy("player",unit)==false then return false end -- WARNING a unit is hostile to you or not Returns either 1 ot nil -- Raider's Training returns nil with UnitIsEnemy
if jps.PlayerIsBlacklisted(unit) then return false end -- WARNING Blacklist is updated only when UNITH HEALTH occurs
if not jps.IsSpellInRange(jps.HarmSpell,unit) then return false end
return true
end
local battleRezSpells = {
tostring(select(1,GetSpellInfo(20484))), -- Druid: Rebirth
tostring(select(1,GetSpellInfo(61999))), -- DK: Raise Ally
tostring(select(1,GetSpellInfo(20707))), -- Warlock: Soulstone
tostring(select(1,GetSpellInfo(126393))) -- Hunter: Eternal Guardian
}
local function isBattleRez(spell)
for _,v in ipairs(battleRezSpells) do
if v == spell then return true end
end
return false
end
-- check if a spell is castable @ unit
function jps.canCast(spell,unit)
if spell == "" then return false end
if unit == nil then unit = "target" end
local spellname = nil
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
if jps.PlayerIsBlacklisted(unit) then return false end -- ADDITION jps.PlayerIsBlacklisted(unit) in CANCAST
if not jps.spellNeedSelect(spellname) then
if not jps.UnitExists(unit) and not isBattleRez(spell) then return false end
end
if spellname == nil then return false end
spellname = string.lower(spellname)
if jps.Debug then
jps_canCast_debug(spell,unit)
end
if(getSpellStatus(spellname ) == 0) then return false end -- NEW
local usable, nomana = IsUsableSpell(spellname) -- usable, nomana = IsUsableSpell("spellName" or spellID)
if not usable then return false end
if nomana then return false end
if (jps.cooldown(spellname)~=0) then return false end
if jps.SpellHasRange(spell) and not jps.IsSpellInRange(spell,unit) then return false end
if jps[spell] ~= nil and jps[spell] == false then return false end
return true
end
----------------------
-- CAST
----------------------
-- "Death and Decay" 43265 -- DK
-- "Mass Dispel" 32375 -- Priest
-- "Power Word: Barrier" 62618 -- Priest
-- "Flamestrike" 2120 -- Mage
-- "Rain of Fire" 104233 -- Mage
-- "Dizzying Haze" 115180 -- Brewmaster
-- "Light's Hammer" 114158 -- Paladin
-- "Healing Rain" 73921 -- Shaman
-- "wild mushroom" 88747 -- Druid
-- "Explosive Trap" 82939 - Hunter (was 13813)
-- "Ice Trap" 82941 - Hunter (was 13809)
-- "Freezing Trap" 60192 - Hunter (was 1499)
-- "Summon Jade Serpent Statue" - 115313 Monk
-- "Healing Sphere" - 115460 Monk
-- "mocking banner" - 114192 warrior
-- "heroic leap" - 6544 warrior
-- "Freeze" - 33395 Frost Mage
-- "Rune Of Power" 116011- Mage
-- "Rain of Fire" 5740 -- Warlock
-- "Lightwell" 724 - Priest
-- "Holy Word: Sanctuary" 88685 - Priest
-- "Shadowfury" 30283 - Warlock
-- "Summon Black Ox Statue" - 115315 - Monk
-- "Summon Black Ox Statue" - 115315 - Monk
-- "cataclysm" - 152108 Warlock
-- "earthquake" - 61882 shaman
-- "binding shot" - 109248 hunter
--JPTODO: 6.0 jps.spellNeedSelectTable need new spell Ids for new ground spells
jps.spellNeedSelectTable = {109248,30283,88685,724,32375,43265,62618,2120,104233,115180,114158,73921,88747, 82939, 82941, 60192, 115313, 115460, 114192, 6544, 33395, 116011, 5740, 115315, 152108,61882}
function jps.spellNeedSelect(spell)
local spellname = nil
if type(spell) == "string" then spellname = string.lower(spell) end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
for i,j in ipairs (jps.spellNeedSelectTable) do
if spellname == string.lower(tostring(select(1,GetSpellInfo(j)))) then return true end
end
return false
end
function jps.Cast(spell) -- "number" "string"
local spellname = nil
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
if jps.Target == nil then jps.Target = "target" end
if not jps.Casting then jps.LastCast = spellname end
if jps.spellNeedSelect(spellname) then
SetCVar("deselectOnClick", "0")
CastSpellByName(spellname)
CameraOrSelectOrMoveStart(1)
CameraOrSelectOrMoveStop(1)
SetCVar("deselectOnClick", "1")
else
CastSpellByName(spellname,jps.Target) -- CastSpellByID(spellID [, "target"])
end
jps.timedCasting[string.lower(spell)] = math.ceil(GetTime())
jps.CastBar.currentSpell = spellname
jps.CastBar.currentTarget = jps.Target
jps.CastBar.currentMessage = jps.Message
if (jps.IconSpell ~= spellname) or (jps.Target ~= jps.LastTarget) then
jps.set_jps_icon(spellname)
if jps.Debug then write(spellname,"|cff1eff00",jps.Target,"|cffffffff",jps.Message) end
end
jps.LastTarget = jps.Target
jps.LastTargetGUID = UnitGUID(jps.Target)
jps.Target = nil
jps.Message = ""
jps.ThisCast = nil
end
jps.UserInitiatedSpellsToIgnore = {
-- General Skills
6603, -- Auto Attack (prevents from toggling on/off)
-- Monk Skills
109132, -- Roll (Unless you want to roll off cliffs, leave this here)
137639, -- Storm, Earth, and Fire (prevents you from destroying your copy as soon as you make it)
115450, -- Detox (when casting Detox without any dispellable debuffs, the cooldown resets)
119582, -- Purifying Brew (having more than 1 chi, this can prevent using it twice in a row)
115008, -- Chi Torpedo (same as roll)
101545, -- Flying Serpent Kick (prevents you from landing as soon as you start "flying")
115921, -- Legacy of The Emperor
116781, -- Legacy of the White Tiger
115072, -- Expel Harm (below 35%, brewmasters ignores cooldown on this spell)
115181, -- Breath of Fire (if you are chi capped, this can make you burn all your chi)
115546, -- Provoke (prevents you from wasting your taunt)
116740, -- Tigereye Brew (prevents you from wasting your stacks and resetting your buff)
115294, -- Mana Tea (This isn't an instant cast, but since it only has a 0.5 channeled time, it can triggers twice in the rotation)
111400, -- warlock burning rush
108978, --alter time
12051, --evocation
1953, -- blink
19263, -- Deterrence
781, -- Disengage
108839, --Ice Floes
}
function jps.isRecast(spell,unit)
local spellname = nil
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
if unit==nil then unit = "target" end
return jps.LastCast==spellname and UnitGUID(unit)==jps.LastTargetGUID
end
function jps.shouldSpellBeIgnored(spell)
if type(spell) == "string" then spellname = spell end
if type(spell) == "number" then spellname = tostring(select(1,GetSpellInfo(spell))) end
if not spellname then return false end
spellname = spellname:lower()
local result = false
for _, v in pairs(jps.UserInitiatedSpellsToIgnore) do
if spellname == string.lower(tostring(select(1,GetSpellInfo(v)))) then
return true
end
end
return false
end
----------------------
-- DEBUG MODE
----------------------`
--JPTODO: 6.0 check jps_canHeal_debug debug output
function jps_canHeal_debug(unit)
if not jps.UnitExists(unit) then write("not Unit") return false end
if GetUnitName("player") == GetUnitName(unit) then write("Player") return true end
if UnitExists(unit)~=1 then write("not Exists") return false end
if UnitIsVisible(unit)~=1 then write("not Visible") return false end
if UnitIsDeadOrGhost(unit)==1 then write("Dead") return false end
if UnitCanAssist("player",unit)~=1 then write("not Friend") return false end
if UnitInVehicle(unit)==1 then write("in Vehicle") return false end
if jps.PlayerIsBlacklisted(unit) then write("Blacklist") return false end
if not select(1,UnitInRange(unit)) then write("not inRange") return false end
write("Passed all tests canHeal".."|cffa335ee"..unit)
return true
end
--JPTODO: 6.0 check jps_canCast_debug debug output
function jps_canCast_debug(spell,unit) -- NEED A SPELLNAME
LOG.info("Can Cast Debug for %s @ $s ", spell, unit)
if spell == nil then LOG.info("spell is nil %s @ $s", spell, unit)return false end
if not jps.spellNeedSelect(spell) then
if not jps.UnitExists(unit) then LOG.info("invalid unit %s @ $s", spell, unit) return false end
end
local usable, nomana = IsUsableSpell(spell) -- IsUsableSpell("spellName" or spellID)
if not usable then LOG.info("spell is not sable %s @ $s", spell, unit) return false end
if nomana then LOG.info("failed mana test %s @ $s", spell, unit) return false end
if jps.cooldown(spell)~=0 then LOG.info("cooldown not finished %s @ $s", spell, unit) return false end
if jps_SpellHasRange(spell)~=1 then LOG.info("spellhasRange check failed %s @ $s", spell, unit) return false end
if jps.SpellHasRange(spell) and not jps.IsSpellInRange(spell,unit) then OG.info("not in range %s @ $s", spell, unit) return false end
LOG.info("Passed all tests %s @ $s", spell, unit)
return true
end
-------------------------
-- SPELL CONFIG METHODS
-------------------------
function setSpellStatus(spell, status)
spell = string.lower(spell)
jps.spellConfig[jps.Spec][spell] = status
end
function getSpellStatus(spell)
spell = spell:lower() --spell = string.lower(spell)
local spellConfig = jps.spellConfig[jps.Spec][spell]
if(spellConfig == nil) then
setSpellStatus(spell, 1)
jps.addSpellCheckboxToFrame(spell)
return 1
else
return jps.spellConfig[jps.Spec][spell]
end
end
-------------------------
-- PARSE NON-STATIC SPELLTABLE
-------------------------
--[[ -- MultiTable
function jps.IsCastingPoly( unit )
if ... then return false end
return true
end
parseMultiUnitTable( { "shadow word: death", jps.IsCastingPoly, {"arena1","arena2","arena3"} } )
the code is equivalent to:
parseSpellTable(
{
{ "shadow word: death", jps.IsCastingPoly("arena1") , "arena1" },
{ "shadow word: death", jps.IsCastingPoly("arena2") , "arena2" },
{ "shadow word: death", jps.IsCastingPoly("arena3") , "arena3" },
}
)
--]]
function parseMultiUnitTable( spellTable )
local spell = spellTable[1]
local unitFunction = spellTable[2]
local targets = spellTable[3]
local message = spellTable[4]
if message == nil then message = "" end
local sirenTable = {}
for _, unit in pairs(targets) do
local unitTable = {}
table.insert( unitTable, 1, spell )
table.insert( unitTable, 2, unitFunction(unit) )
table.insert( unitTable, 3, unit )
table.insert( unitTable, 4, message..unit )
table.insert( sirenTable, unitTable )
end
return parseSpellTable(sirenTable)
end
function conditionsMatched(spell,conditions)
-- nil
if spell == nil then
return false
-- nil
elseif conditions == nil then
return true
-- onCD
elseif conditions == "onCD" then
return true
-- otherwise
else
return conditions
end
end
-- Pick a spell from a priority table.
function parseSpellTable( hydraTable )
if jps.firstInitializingLoop == true then return nil,"target" end
local spell = nil
local conditions = nil
local target = nil
local message = ""
for position, spellTable in pairs(hydraTable) do
if type(spellTable) == "function" then spellTable = spellTable() end
spell = spellTable[1]
conditions = spellTable[2]
target = spellTable[3]
if not target then target = "target" end
message = spellTable[4]
if message == nil then message = "" end
if jps.Message ~= message then jps.Message = message end
-- NESTED TABLE
if spell == "nested" and conditions then
local newTable = spellTable[3]
spell,target,position = parseSpellTable( newTable)
elseif spell == "opening" and conditions and jps.Opening == true then
local newTable = spellTable[3]
spell,target,position = parseSpellTable( newTable)
if position == newTable[#newTable] then
jps.Opening = false
end
-- MACRO -- BE SURE THAT CONDITION TAKES CARE OF CANCAST -- TRUE or FALSE -- NOT NIL
elseif type(spell) == "table" and spell[1] == "macro" and conditions then
local macroText = spell[2]
local macroTarget = spell[3]
if conditions and type(macroText) == "string" then
local macroSpell = macroText
if string.find(macroText,"%s") == nil then -- {"macro","/startattack"}
macroSpell = macroText
else
macroSpell = select(3,string.find(macroText,"%s(.*)")) -- {"macro","/cast Sanguinaire"}
end
if not jps.Casting then jps.Macro(macroText) end -- Avoid interrupt Channeling with Macro
if jps.Debug then macrowrite(macroSpell,"|cff1eff00",macroTarget,"|cffffffff",jps.Message) end
end
-- CASTSEQUENCE WORKS ONLY FOR {INSTANT CAST, SPELL}
-- better than "#showtooltip\n/cast Frappe du colosse\n/cast Sanguinaire"
-- because I can check the spell with jps.canCast
-- {"macro",{109964,2060},player}
if conditions and type(macroText) == "table" then
for _,sequence in ipairs (macroText) do
local spellname = tostring(select(1,GetSpellInfo(sequence)))
if jps.canCast(spellname,macroTarget) then
local macroText = "/cast "..spellname
if not jps.Casting then jps.Macro(macroText) end -- Avoid interrupt Channeling with Macro
if jps.Debug then macrowrite(spellname,"|cff1eff00",macroTarget,"|cffffffff",jps.Message) end
end
end
end
-- MultiTarget List -- { spell , function_unit , table_unit }
elseif type(conditions) == "function" and type(target) == "table" then
spell,target = parseMultiUnitTable(spellTable)
end
-- If not already assigned, assign target now.
if not target and type(spellTable[3]) == "string" then
target = spellTable[3]
end
-- Return spell if conditions are true and spell is castable.
if type(spell) ~= "table" and conditionsMatched(spell,conditions) and jps.canCast(spell,target) then
jps.CastBar.nextSpell = tostring(select(1,GetSpellInfo(spell)))
jps.CastBar.nextTarget = target
return spell,target, position
end
end
return nil
end
-------------------------
-- MULTIPLE ROTATIONS
-------------------------
function hideDropdown()
rotationDropdownHolder:Hide()
end
function jps.RotationActive(spellTable)
local countRotations = 0
for i,j in ipairs (spellTable) do
if spellTable[i]["ToolTip"] ~= nil then
jps.MultiRotation = true
countRotations = countRotations+1
jps.ToggleRotationName[i] = spellTable[i]["ToolTip"]
end
end
if jps.initializedRotation == false then
if countRotations > 1 and jps.getConfigVal("Rotation Dropdown Visible") == 1 then
UIDropDownMenu_SetText(DropDownRotationGUI, jps.ToggleRotationName[1])
jps.deleteFunctionFromQueue(hideDropdown,"gui_loaded")
rotationDropdownHolder:Show()
else
jps.addTofunctionQueue(hideDropdown,"gui_loaded")
end
jps.firstInitializingLoop = true
end
jps.initializedRotation = true
if jps.MultiRotation then
jps.Tooltip = spellTable[jps.Count]["ToolTip"]
return spellTable[jps.Count]
else
return spellTable
end
end