Skip to content

Commit

Permalink
SoD changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AznamirWoW committed Dec 27, 2023
1 parent 6ebc364 commit e6f51f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions PallyPower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ function PallyPower:NeedsBuff(class, test, playerName)
return false
end
-- no might for casters (and hunters in Classic)
if (class == 3 or (self.isVanilla and class == 6) or class == 7 or class == 8) and test == 2 then
if (class == 3 or class == 7 or class == 8) and test == 2 then -- removed (self.isVanilla and class == 6) or
return false
end
end
Expand Down Expand Up @@ -2045,7 +2045,8 @@ function PallyPower:UpdateRoster()
tmp.class = "PET"
end
local unitType, _, _, _, _, npcId = strsplit("-", UnitGUID(unitid))
if (npcId == "510") or (npcId == "19668") or (npcId == "1863") or (unitType ~= "Pet" and npcId == "26125") or (npcId == "185317") then -- 510: Water Elemental, 19668: Shadowfiend, 1863: Succubus, 26125: Risen Ghoul, 185317: Incubus
-- 510: Water Elemental, 19668: Shadowfiend, 1863: Succubus, 26125: Risen Ghoul, 185317: Incubus
if (unitType ~= "Pet") and (npcId == "510" or npcId == "19668" or npcId == "1863" or npcId == "26125" or npcId == "185317") then
tmp.class = false
else
local i = 1
Expand Down Expand Up @@ -2705,11 +2706,12 @@ function PallyPower:GetBuffExpiration(classID)
if unit.unitid then
local j = 1
local spellID, gspellID = self:GetSpellID(classID, unit.name)
local isMight = (spellID == 2) or (gspellID == 2)
local spell = self.Spells[spellID]
local gspell = self.GSpells[gspellID]
local buffName = UnitBuff(unit.unitid, j)
while buffName do
if (buffName == gspell) then
if (buffName == gspell) or (not isWrath and isMight and buffName == PallyPower.Spells[8]) then
local _, _, _, _, buffDuration, buffExpire = UnitAura(unit.unitid, j, "HELPFUL")
if buffExpire then
if buffExpire == 0 then
Expand All @@ -2722,7 +2724,7 @@ function PallyPower:GetBuffExpiration(classID)
--self:Debug("[GetBuffExpiration] buffName: "..buffName.." | classExpire: "..classExpire.." | classDuration: "..classDuration)
break
end
elseif (buffName == spell) then
elseif (buffName == spell) or (not isWrath and isMight and buffName == PallyPower.Spells[8]) then
local _, _, _, _, buffDuration, buffExpire = UnitAura(unit.unitid, j, "HELPFUL")
if buffExpire then
if buffExpire == 0 then
Expand Down Expand Up @@ -3254,10 +3256,11 @@ function PallyPower:GetUnitAndSpellSmart(classid, mousebutton)
end

function PallyPower:IsBuffActive(spellName, gspellName, unitID)
local isMight = (spellName == PallyPower.Spells[2]) or (gSpellName == PallyPower.GSpells[2])
local j = 1
local buffName = UnitBuff(unitID, j)
while buffName do
if (buffName == spellName) or (buffName == gspellName) then
if (buffName == spellName) or (buffName == gspellName) or (not isWrath and isMight and buffName == PallyPower.Spells[8] )then
local _, _, _, _, buffDuration, buffExpire = UnitAura(unitID, j, "HELPFUL")
if buffExpire then
if buffExpire == 0 then
Expand Down
1 change: 1 addition & 0 deletions PallyPowerValues.lua
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ PallyPower.Spells = PallyPower.isWrath and {
[5] = GetSpellInfo(19977), -- Blessing of Light
[6] = GetSpellInfo(20911), -- Blessing of Sanctuary
[7] = GetSpellInfo(6940), -- Blessing of Sacrifice
[8] = GetSpellInfo(425600), -- Horn or Lordaeron
}

PallyPower.GSpells = PallyPower.isWrath and {
Expand Down
2 changes: 1 addition & 1 deletion PallyPower_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 11404
## Interface: 11500
## Author: Aznamir, Dyaxler, Es, gallantron
## Title: PallyPower Classic
## Version: @project-version@
Expand Down

0 comments on commit e6f51f2

Please sign in to comment.