Skip to content

Commit

Permalink
added support for Cata
Browse files Browse the repository at this point in the history
  • Loading branch information
ollidiemaus committed May 24, 2024
1 parent 7e4d0ef commit 984bae3
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 7 deletions.
7 changes: 4 additions & 3 deletions AutoPotion.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Interface: 100206
## Interface-Classic: 11501
## Interface: 100207
## Interface-Classic: 11502
## Interface-WOTLKC: 30403
## Version: 3.3.8
## Interface-Cata: 40400
## Version: 3.4.0
## Title: Auto Potion
## Author: ollidiemaus
## Notes: Updates the Macro AutoPotion to use either Healthstone or the highest Potion found in Bags
Expand Down
59 changes: 55 additions & 4 deletions Core/Potions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local addonName, ham = ...
local isRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
local isClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local isWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
local isCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)

--ham.leywine = ham.Item.new(194684,"Azure Leywine")
--ham.healthstone = ham.Item.new(117, "Healthstone")
Expand Down Expand Up @@ -30,6 +31,7 @@ ham.ancient = ham.Item.new(127834, "Ancient Healing Potion")
ham.aged = ham.Item.new(136569, "Aged Health Potion")
ham.tonic = ham.Item.new(109223, "Healing Tonic")
ham.master = ham.Item.new(76097, "Master Healing Potion")
ham.roguesDraught = ham.Item.new(63300, "Rogue's Draught")
ham.mythical = ham.Item.new(57191, "Mythical Healing Potion")
ham.crazy_alch = ham.Item.new(40077, "Crazy Alchemist's Potion")
ham.runic_inject = ham.Item.new(41166, "Runic Healing Injector")
Expand Down Expand Up @@ -75,6 +77,7 @@ ham.demonic2 = ham.Item.new(36891, "Demonic Healthstone")
ham.fel0 = ham.Item.new(36892, "Fel Healthstone")
ham.fel1 = ham.Item.new(36893, "Fel Healthstone")
ham.fel2 = ham.Item.new(36894, "Fel Healthstone")
------Healthstones for Cata------

function RemoveFromList(list, itemToRemove)
for i = #list, 1, -1 do
Expand All @@ -88,9 +91,6 @@ function ham.getPots()
if isRetail then
local pots = {
ham.thirdWind,
ham.witheringDreamsR3,

This comment has been minimized.

Copy link
@kilolum

kilolum May 27, 2024

Contributor

U remove my witheringDream potion fix again :(

This comment has been minimized.

Copy link
@ollidiemaus

ollidiemaus via email May 27, 2024

Author Owner
ham.witheringDreamsR2,
ham.witheringDreamsR1,
ham.dreamR3,
ham.dreamsR2,
ham.dreamR1,
Expand Down Expand Up @@ -132,7 +132,6 @@ function ham.getPots()
table.insert(pots, 1, ham.witheringR3)
end

---ADD HERE new WITHERING
if HAMDB.witheringDreamsPotion then
table.insert(pots, 1, ham.witheringDreamsR1)
table.insert(pots, 1, ham.witheringDreamsR2)
Expand Down Expand Up @@ -172,6 +171,29 @@ function ham.getPots()
ham.minor
}
end

if isCata then
return {
ham.roguesDraught,
ham.mythical,
ham.crazy_alch,
ham.runic_inject,
ham.runic,
ham.superreju,
ham.endless,
ham.injector,
ham.resurgent,
ham.super,
ham.argent,
ham.auchenai,
ham.major,
ham.superior,
ham.greater,
ham.healingPotion,
ham.lesser,
ham.minor
}
end
end

function ham.getHealthstonesClassic()
Expand Down Expand Up @@ -223,4 +245,33 @@ function ham.getHealthstonesClassic()
ham.minor0
}
end

if isCata then
return {
ham.fel2,
ham.fel1,
ham.fel0,
ham.demonic2,
ham.demonic1,
ham.demonic0,
ham.master2,
ham.master1,
ham.master0,
ham.major2,
ham.major1,
ham.major0,
ham.greater2,
ham.greater1,
ham.greater0,
ham.healtsthone2,
ham.healtsthone1,
ham.healtsthone0,
ham.lesser2,
ham.lesser1,
ham.lesser0,
ham.minor2,
ham.minor1,
ham.minor0
}
end
end
2 changes: 2 additions & 0 deletions FrameXML/InterfaceOptionsFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local addonName, ham = ...
local isRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
local isClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local isWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
local isCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)

---@class Frame
local panel = CreateFrame("Frame")
local ICON_SIZE = 50
Expand Down
2 changes: 2 additions & 0 deletions code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local addonName, ham = ...
local macroName = "AutoPotion"
local isClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local isWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
local isCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)


ham.myPlayer = ham.Player.new()

Expand Down

0 comments on commit 984bae3

Please sign in to comment.