Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not PriorityQueue then return end
- if select(2, UnitClass('player')) ~= "PALADIN" then
- return
- end
- local L = LibStub("AceLocale-3.0"):GetLocale("PriorityQueue")
- local C = PriorityQueue.constants -- Defined in PriorityQueue LUA no locale needed.
- C["GCD Spell"] = GetSpellInfo(19750)
- C["Consecration"], _, C["Consecration Icon"] = GetSpellInfo(26573)
- C["Crusader Strike"], _, C["Crusader Strike Icon"] = GetSpellInfo(35395)
- C["Divine Storm"], _, C["Divine Storm Icon"] = GetSpellInfo(53385)
- C["Hammer of Wrath"], _, C["Hammer of Wrath Icon"] = GetSpellInfo(24275)
- C["Templar's Verdict"], _, C["Templar's Verdict Icon"] = GetSpellInfo(85256)
- C["Holy Wrath"], _, C["Holy Wrath Icon"] = GetSpellInfo(2812)
- C["Seal of Righteousness"], _, C["Seal of Righteousness Icon"] = GetSpellInfo(20154)
- C["Seal of Truth"], _, C["Seal of Truth Icon"] = GetSpellInfo(31801)
- C["Seal of Justice"], _, C["Seal of Justice Icon"] = GetSpellInfo(20164)
- C["Seal of Insight"], _, C["Seal of Insight Icon"] = GetSpellInfo(20165)
- C["Seal of Anything"], _, C["Seal of Anything Icon"] = GetSpellInfo(50908)
- C["Judgement"], _, C["Judgement Icon"] = GetSpellInfo(20271)
- C["Inquisition"], _, C["Inquisition Icon"] = GetSpellInfo(84963)
- C["Zealotry"], _, C["Zealotry Icon"] = GetSpellInfo(85696)
- C["Exorcism"], _, C["Exorcism Icon"] = GetSpellInfo(85673)
- --prot specific:
- C["Shield of the Righteous"], _, C["Shield of the Righteous Icon"] = GetSpellInfo(53600)
- C["Hammer of the Righteous"], _, C["Hammer of the Righteous Icon"] = GetSpellInfo(53595)
- C["Word of Glory"], _, C["Word of Glory Icon"] = GetSpellInfo(85673)
- C["Avenger's Shield"], _, C["Avenger's Shield Icon"] = GetSpellInfo(31935)
- -- Buffs/Procs:
- C["The Art of War"] = GetSpellInfo(59578);
- C["Divine Shield"], _, C["Divine Shield Icon"] = GetSpellInfo(642)
- function PriorityQueue:UNIT_MANA()
- if self.db.char.priority.show and InCombatLockdown() then
- self:SetNextPriority()
- end
- end
- ---------------------------
- -- Paladin Priorities
- ---------------------------
- function PriorityQueue:DetermineGCD()
- if PriorityQueue.db.char.priority.spec ~= 0 then
- if PriorityQueue.db.char.priority.spec == 1 then
- --Holy
- C["GCD Spell"] = GetSpellInfo(19750) --Flash of Light
- elseif PriorityQueue.db.char.priority.spec == 2 then
- --Prot
- C["GCD Spell"] = GetSpellInfo(25780) --Righteous Fury
- elseif PriorityQueue.db.char.priority.spec == 3 then
- --Ret
- C["GCD Spell"] = GetSpellInfo(85256) --Templar's Verdict
- end
- else
- PriorityQueue:GetCurrentSpec()
- end
- end
- function PriorityQueue:GetPaladinPriorityDefaults()
- self:RegisterEvent("UNIT_MANA")
- self.db.char.priority.dropthreat.name = C["Divine Shield"]
- self.db.char.priority.dropthreat.icon = C["Divine Shield Icon"]
- self.presets.default = "Retribution"
- self.presets.priorities.name["Retribution"] = L["Retribution"]
- self.presets.priorities.list["Retribution"] = { "sot", "inquisition", "cs", "how", "exorcism_aow", "tv", "judgement", "hw", "consecration", "none", "none", "none", "none", "none", "none" }
- self.presets.priorities.name["RetributionAOE"] = L["Retribution AOE"]
- self.presets.priorities.list["RetributionAOE"] = { "sot", "inquisition", "ds", "how", "exorcism_aow", "tv", "judgement", "hw", "consecration", "none", "none", "none", "none", "none", "none" }
- --Inq > CS > HoW > Exo > TV > J > HW > Cons
- --Seal of Truth
- --Inquisition (Buff)
- --Crusader Strike > All
- --Hammer of Wrath (Execute)
- --Templar's Verdict (Finisher)
- --Judgement
- --Holy Wrath
- --Consecrate
- self.presets.priorities.name["Protection"] = L["Protection"]
- self.presets.priorities.list["Protection"] = { "sot", "sotr", "cs", "judgement", "hw", "as", "hw", "consecration", "none", "none", "none", "none", "none", "none", "none" }
- self.presets.priorities.name["ProtectionAOE"] = L["Protection AOE"]
- self.presets.priorities.list["ProtectionAOE"] = { "sot", "hotr", "hw", "consecration", "as", "sotr", "judgement", "none", "none", "none", "none", "none", "none", "none", "none" }
- --prot:
- --Shield of the Righteous / Word of Glory > Crusader's Strike > Judgement > Hammer of Wrath (when active) > Avenger's Shield > Holy Wrath > Consecration
- --NOTE: SotR / Shield of the Righteous will not activate until you have at least one charge of Holy Power.
- --Hammer of the Righteous > Consecration > Holy Wrath > Avenger's Shield > Shield of the Righteous / Word of Glory > Judgement
- end
- --PROT START
- PriorityQueue.priorityTable.name["sotr"] = C["Shield of the Righteous"]
- PriorityQueue.priorityTable.icon["sotr"] = C["Shield of the Righteous Icon"]
- PriorityQueue.priorityTable.spid["sotr"] = 53600
- PriorityQueue.priorityTable.actn["sotr"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["sotr"] =
- function ()
- if UnitPower("player", 9) == 3 then
- return PriorityQueue:SpellAvailable(C["Shield of the Righteous"])
- end
- end
- PriorityQueue.priorityTable.name["as"] = C["Avenger's Shield"]
- PriorityQueue.priorityTable.icon["as"] = C["Avenger's Shield Icon"]
- PriorityQueue.priorityTable.spid["as"] = 31935
- PriorityQueue.priorityTable.actn["as"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["as"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Avenger's Shield"])
- end
- PriorityQueue.priorityTable.name["hotr"] = C["Hammer of the Righteous"]
- PriorityQueue.priorityTable.icon["hotr"] = C["Hammer of the Righteous Icon"]
- PriorityQueue.priorityTable.spid["hotr"] = 53595
- PriorityQueue.priorityTable.actn["hotr"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["hotr"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Hammer of the Righteous"])
- end
- --PROT END
- --General Abilities
- PriorityQueue.priorityTable.name["cs"] = C["Crusader Strike"]
- PriorityQueue.priorityTable.icon["cs"] = C["Crusader Strike Icon"]
- PriorityQueue.priorityTable.spid["cs"] = 35395
- PriorityQueue.priorityTable.actn["cs"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["cs"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Crusader Strike"])
- end
- PriorityQueue.priorityTable.name["ds"] = C["Divine Storm"]
- PriorityQueue.priorityTable.icon["ds"] = C["Divine Storm Icon"]
- PriorityQueue.priorityTable.spid["ds"] = 53385
- PriorityQueue.priorityTable.actn["ds"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["ds"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Divine Storm"])
- end
- PriorityQueue.priorityTable.name["judgement"] = C["Judgement"]
- PriorityQueue.priorityTable.icon["judgement"] = C["Judgement Icon"]
- PriorityQueue.priorityTable.spid["judgement"] = 20271
- PriorityQueue.priorityTable.actn["judgement"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["judgement"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Judgement"])
- end
- PriorityQueue.priorityTable.name["hw"] = C["Holy Wrath"]
- PriorityQueue.priorityTable.icon["hw"] = C["Holy Wrath Icon"]
- PriorityQueue.priorityTable.spid["hw"] = 2812
- PriorityQueue.priorityTable.actn["hw"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["hw"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Holy Wrath"])
- end
- PriorityQueue.priorityTable.name["how"] = C["Hammer of Wrath"]
- PriorityQueue.priorityTable.icon["how"] = C["Hammer of Wrath Icon"]
- PriorityQueue.priorityTable.spid["how"] = 24275
- PriorityQueue.priorityTable.actn["how"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["how"] =
- function ()
- local sAW = UnitBuff("player", "Avenging Wrath")
- local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target")
- if sAW ~= nil then
- return PriorityQueue:SpellAvailable(C["Hammer of Wrath"])
- else
- if unithealth <= 20 then -- only usable if target health < 20%
- return PriorityQueue:SpellAvailable(C["Hammer of Wrath"])
- end
- end
- end
- PriorityQueue.priorityTable.name["tv"] = C["Templar's Verdict"]
- PriorityQueue.priorityTable.icon["tv"] = C["Templar's Verdict Icon"]
- PriorityQueue.priorityTable.spid["tv"] = 85256
- PriorityQueue.priorityTable.actn["tv"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["tv"] =
- function ()
- sDivinePurpose = UnitBuff("player", "Divine Purpose")
- if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
- return PriorityQueue:SpellAvailable(C["Templar's Verdict"])
- end
- end
- PriorityQueue.priorityTable.name["zealotry"] = C["Zealotry"]
- PriorityQueue.priorityTable.icon["zealotry"] = C["Zealotry Icon"]
- PriorityQueue.priorityTable.spid["zealotry"] = 85696
- PriorityQueue.priorityTable.actn["zealotry"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["zealotry"] =
- function ()
- sDivinePurpose = UnitBuff("player", "Divine Purpose")
- if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
- return PriorityQueue:SpellAvailable(C["Zealotry"])
- end
- end
- PriorityQueue.priorityTable.name["inquisition"] = C["Inquisition"]
- PriorityQueue.priorityTable.icon["inquisition"] = C["Inquisition Icon"]
- PriorityQueue.priorityTable.spid["inquisition"] = 84963
- PriorityQueue.priorityTable.actn["inquisition"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["inquisition"] =
- function ()
- sDivinePurpose = UnitBuff("player", "Divine Purpose")
- local inqBuff, _, _, _, _, _, inqExpireTime = UnitBuff("player", "Inquisition")
- if inqBuff ~= nil then
- local inqExpire = (inqExpireTime - GetTime())
- if inqExpire < 5 then
- if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
- return PriorityQueue:SpellAvailable(C["Inquisition"])
- end
- end
- else
- if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
- return PriorityQueue:SpellAvailable(C["Inquisition"])
- end
- end
- end
- PriorityQueue.priorityTable.name["consecration"] = C["Consecration"]
- PriorityQueue.priorityTable.icon["consecration"] = C["Consecration Icon"]
- PriorityQueue.priorityTable.spid["consecration"] = 26573
- PriorityQueue.priorityTable.actn["consecration"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["consecration"] =
- function ()
- local manapercent = 100 * UnitPower("player") / UnitPowerMax("player")
- if manapercent > 60 then
- return PriorityQueue:SpellAvailable(C["Consecration"])
- end
- end
- PriorityQueue.priorityTable.name["exorcism_nogcd"] = L["Exorcism no other GCD"]
- PriorityQueue.priorityTable.icon["exorcism_nogcd"] = C["Exorcism Icon"]
- PriorityQueue.priorityTable.spid["exorcism_nogcd"] = 879
- PriorityQueue.priorityTable.actn["exorcism_nogcd"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["exorcism_nogcd"] =
- function ()
- --Only cast if no other ability is coming off CD within 1.5 seconds and Holy Power ~= 3.
- local CSstart, CSduration, CSenabled = GetSpellCooldown(35395);
- local CScooldown = (CSstart + CSduration - GetTime())
- local JUstart, JUduration, JUenabled = GetSpellCooldown(20271);
- local JUcooldown = (JUstart + JUduration - GetTime())
- if CScooldown <= 1.5 and JUcooldown <= 1.5 and UnitPower("player", 9) ~= 3 then
- return PriorityQueue:SpellAvailable(C["Exorcism"])
- end
- end
- PriorityQueue.priorityTable.name["exorcism_aow"] = L["Exorcism if Art of War"]
- PriorityQueue.priorityTable.icon["exorcism_aow"] = C["Exorcism Icon"]
- PriorityQueue.priorityTable.spid["exorcism_aow"] = 879
- PriorityQueue.priorityTable.actn["exorcism_aow"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["exorcism_aow"] =
- function ()
- sAoW = UnitBuff("player", "The Art of War")
- if sAoW ~= nil then
- return PriorityQueue:SpellAvailable(C["Exorcism"])
- end
- end
- PriorityQueue.priorityTable.name["exorcism"] = C["Exorcism"]
- PriorityQueue.priorityTable.icon["exorcism"] = C["Exorcism Icon"]
- PriorityQueue.priorityTable.spid["exorcism"] = 879
- PriorityQueue.priorityTable.actn["exorcism"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["exorcism"] =
- function ()
- return PriorityQueue:SpellAvailable(C["Exorcism"])
- end
- --Seals
- PriorityQueue.priorityTable.name["sor"] = C["Seal of Righteousness"]
- PriorityQueue.priorityTable.icon["sor"] = C["Seal of Righteousness Icon"]
- PriorityQueue.priorityTable.spid["sor"] = 20154
- PriorityQueue.priorityTable.actn["sor"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["sor"] =
- function ()
- sSoR = UnitBuff("player", "Seal of Righteousness")
- if sSoR == nil then
- return PriorityQueue:SpellAvailable(C["Seal of Righteousness"])
- end
- end
- PriorityQueue.priorityTable.name["sot"] = C["Seal of Truth"]
- PriorityQueue.priorityTable.icon["sot"] = C["Seal of Truth Icon"]
- PriorityQueue.priorityTable.spid["sot"] = 31801
- PriorityQueue.priorityTable.actn["sot"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["sot"] =
- function ()
- sSoT = UnitBuff("player", "Seal of Truth")
- if sSoT == nil then
- return PriorityQueue:SpellAvailable(C["Seal of Truth"])
- end
- end
- PriorityQueue.priorityTable.name["soj"] = C["Seal of Justice"]
- PriorityQueue.priorityTable.icon["soj"] = C["Seal of Justice Icon"]
- PriorityQueue.priorityTable.spid["soj"] = 20164
- PriorityQueue.priorityTable.actn["soj"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["soj"] =
- function ()
- sSoJ = UnitBuff("player", "Seal of Justice")
- if sSoJ == nil then
- return PriorityQueue:SpellAvailable(C["Seal of Justice"])
- end
- end
- PriorityQueue.priorityTable.name["soi"] = C["Seal of Insight"]
- PriorityQueue.priorityTable.icon["soi"] = C["Seal of Insight Icon"]
- PriorityQueue.priorityTable.spid["soi"] = 20165
- PriorityQueue.priorityTable.actn["soi"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["soi"] =
- function ()
- sSoI = UnitBuff("player", "Seal of Insight")
- if sSoI == nil then
- return PriorityQueue:SpellAvailable(C["Seal of Insight"])
- end
- end
- PriorityQueue.priorityTable.name["soa"] = L["Seal of Anything"]
- PriorityQueue.priorityTable.icon["soa"] = C["Seal of Anything Icon"]
- PriorityQueue.priorityTable.spid["soa"] = 31801
- PriorityQueue.priorityTable.actn["soa"] = "/startattack" --ALSO PERFORM ACTION
- PriorityQueue.priorityTable.test["soa"] =
- function ()
- sSoR = UnitBuff("player", "Seal of Righteousness")
- sSoT = UnitBuff("player", "Seal of Truth")
- sSoJ = UnitBuff("player", "Seal of Justice")
- sSoI = UnitBuff("player", "Seal of Insight")
- if sSoR ~= nil or sSoT ~= nil or sSoJ ~= nil or sSoI ~= nil then
- --We have a seal up
- else
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement