Skip to content

Commit

Permalink
fix: fortitude of the bear (#63)
Browse files Browse the repository at this point in the history
* fix: fortitude of the bear

* fix: unit pet event registration

* chore: remove unused func

---------

Co-authored-by: Oliver Maus <[email protected]>
  • Loading branch information
cdhawke and ollidiemaus authored Nov 6, 2024
1 parent 6b9ce1c commit a54fc38
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Core/Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ham.Player.new = function()
local spells = {}

for i, spell in ipairs(HAMDB.activatedSpells) do
if IsSpellKnown(spell) then
if IsSpellKnown(spell) or IsSpellKnown(spell, true) then
table.insert(spells, spell)
end
end
Expand Down
2 changes: 1 addition & 1 deletion Core/Spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local isRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
ham.crimsonVialSpell = 185311
ham.renewal = 108238
ham.exhilaration = 109304
ham.fortitudeOfTheBear = 272679
ham.fortitudeOfTheBear = 388035
ham.bitterImmunity = 383762
ham.desperatePrayer = 19236
ham.expelHarm = 322101
Expand Down
2 changes: 1 addition & 1 deletion FrameXML/InterfaceOptionsFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function ham.settingsFrame:InitializeClassSpells(relativeTo)
if next(ham.supportedSpells) ~= nil then
local count = 0
for i, spell in ipairs(ham.supportedSpells) do
if IsSpellKnown(spell) then
if IsSpellKnown(spell) or IsSpellKnown(spell, true) then
local name = C_Spell.GetSpellName(spell)
local button = CreateFrame("CheckButton", nil, self.content, "InterfaceOptionsCheckButtonTemplate")

Expand Down
5 changes: 5 additions & 0 deletions code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ if isClassic == false then
updateFrame:RegisterEvent("TRAIT_CONFIG_UPDATED")
end
updateFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
updateFrame:RegisterEvent("UNIT_PET")
updateFrame:SetScript("OnEvent", function(self, event, arg1, ...)
-- when addon is loaded
if event == "ADDON_LOADED" and arg1 == addonName then
Expand All @@ -410,6 +411,10 @@ updateFrame:SetScript("OnEvent", function(self, event, arg1, ...)
if event == "BAG_UPDATE" then
onBagUpdate()
-- on loading/reloading
elseif event == "UNIT_PET" then
log("event: UNIT_PET")
MakeMacro()
-- when pet is called
elseif event == "PLAYER_ENTERING_WORLD" then
log("event: PLAYER_ENTERING_WORLD")
MakeMacro()
Expand Down

0 comments on commit a54fc38

Please sign in to comment.