Skip to content

Commit

Permalink
allowing non-paladins to set up normal blessings
Browse files Browse the repository at this point in the history
  • Loading branch information
AznamirWoW committed Apr 10, 2024
1 parent 1b7240b commit bbc8ae0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PallyPower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ function PallyPowerGrid_NormalBlessingMenu(btn, mouseBtn, pname, class)
for index, blessing in ipairs(PallyPower.Spells) do
if PallyPower:CanBuff(pally, index) then
local unitID = PallyPower:GetUnitIdByName(pname)
if PallyPower:CanBuffBlessing(index, 0, unitID) then
if PallyPower:CanBuffBlessing(index, 0, unitID, true) then
tinsert(pallyMenu, {
text = format("%s%s%s", pre, blessing, suf),
checked = function() if GetNormalBlessings(pally, class, pname) == tostring(index) then return true end end,
Expand Down Expand Up @@ -1155,7 +1155,7 @@ function PallyPower:CanBuff(name, test)
return true
end

function PallyPower:CanBuffBlessing(spellId, gspellId, unitId)
function PallyPower:CanBuffBlessing(spellId, gspellId, unitId, config)
if unitId and spellId or gspellId then
local normSpell, greatSpell
if UnitLevel(unitId) >= 60 then
Expand All @@ -1177,7 +1177,7 @@ function PallyPower:CanBuffBlessing(spellId, gspellId, unitId)
end
if spellId > 0 then
for _, v in pairs(self.NormalBuffs[spellId]) do
if IsSpellKnown(v[2]) then
if IsSpellKnown(v[2]) or config then
if UnitLevel(unitId) >= v[1] then
local spellName = GetSpellInfo(v[2])
local spellRank = GetSpellSubtext(v[2])
Expand Down

0 comments on commit bbc8ae0

Please sign in to comment.