Skip to content

Commit

Permalink
Rename to AutoPotion and support for Classic Era (#20)
Browse files Browse the repository at this point in the history
* Added support for classic Era
* Rename Addon to AutoPotion
* auto disable legacy addon
  • Loading branch information
ollidiemaus authored Mar 17, 2023
1 parent d7d1f17 commit 1601d7c
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 210 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:

- name: Create Package
uses: BigWigsMods/packager@v2
with:
args: -S
7 changes: 4 additions & 3 deletions HealthstoneAutoMacro.toc → AutoPotion.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Interface: 100005
## Version: 2.5.6
## Title: Healthstone Auto Macro
## Interface-Classic: 11403
## Version: 3.0.0
## Title: Auto Potion
## Author: ollidiemaus
## Notes: Updates the Macro HAMHealthPot to use either Healthstone or the highest Potion found in Bags
## Notes: Updates the Macro AutoPotion to use either Healthstone or the highest Potion found in Bags
## X-Curse-Project-ID: 312940
## X-Wago-ID: yQKybBG7
## SavedVariables: HAMDB
Expand Down
3 changes: 2 additions & 1 deletion Bindings.lua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_G["BINDING_NAME_MACRO HAMHealthPot"] = "Macro HAMHealthPot"
_G["BINDING_NAME_MACRO HAMHealthPot"] = "HAMHealthPot Macro"
_G["BINDING_NAME_MACRO AutoPotion"] = "AutoPotion Macro"
5 changes: 4 additions & 1 deletion Bindings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Bindings>
<Binding name="MACRO HAMHealthPot" category="Healthstone Auto Macro">
<Binding name="HAMHealthPot Macro" category="Auto Potion">
-- HAMHealthPot
</Binding>
<Binding name="AutoPotion Macro" category="Auto Potion">
-- AutoPotion
</Binding>
</Bindings>
98 changes: 74 additions & 24 deletions Core/Potions.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local addonName, ham = ...
local isClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)

--ham.leywine = ham.Item.new(194684,"Azure Leywine")
--ham.healthstone = ham.Item.new(117, "Healthstone")
ham.healthstone = ham.Item.new(5512, "Healthstone")
ham.refreshingR3 = ham.Item.new(191380, "Refreshing Healing Potion")
ham.refreshingR2 = ham.Item.new(191379, "Refreshing Healing Potion")
Expand Down Expand Up @@ -28,31 +30,79 @@ ham.minor = ham.Item.new(118, "Minor Healing Potion")
ham.greater = ham.Item.new(1710, "Greater Healing Potion")
ham.healingPotion = ham.Item.new(929, "Healing Potion")

------Healthstones for Classic------
ham.minor0 = ham.Item.new(5512, "Minor Healthstone")
ham.minor1 = ham.Item.new(19004, "Minor Healthstone")
ham.minor2 = ham.Item.new(19005, "Minor Healthstone")
ham.lesser0 = ham.Item.new(5511, "Lesser Healthstone")
ham.lesser1 = ham.Item.new(19006, "Lesser Healthstone")
ham.lesser2 = ham.Item.new(19007, "Lesser Healthstone")
ham.healtsthone0 = ham.Item.new(5509, "Healthstone")
ham.healtsthone1 = ham.Item.new(19008, "Healthstone")
ham.healtsthone2 = ham.Item.new(19009, "Healthstone")
ham.greater0 = ham.Item.new(5510, "Greater Healthstone")
ham.greater1 = ham.Item.new(19010, "Greater Healthstone")
ham.greater2 = ham.Item.new(19011, "Greater Healthstone")
ham.major0 = ham.Item.new(9421, "Major Healthstone")
ham.major1 = ham.Item.new(19012, "Major Healthstone")
ham.major2 = ham.Item.new(19013, "Major Healthstone")

function ham.getPots()
if isClassic == false then
return {
ham.refreshingR3,
ham.refreshingR2,
ham.refreshingR1,
ham.cosmic,
ham.spiritual,
ham.soulful,
ham.ashran,
ham.abyssal,
ham.astral,
ham.coastal,
ham.ancient,
ham.aged,
ham.tonic,
ham.master,
ham.mythical,
ham.runic,
ham.resurgent,
ham.super,
ham.major,
ham.lesser,
ham.superior,
ham.minor,
ham.greater,
ham.healingPotion
}
else
return {
ham.major,
ham.superior,
ham.greater,
ham.healingPotion,
ham.lesser,
ham.minor
}
end
end

function ham.getHealthstonesClassic()
return {
ham.refreshingR3,
ham.refreshingR2,
ham.refreshingR1,
ham.cosmic,
ham.spiritual,
ham.soulful,
ham.ashran,
ham.abyssal,
ham.astral,
ham.coastal,
ham.ancient,
ham.aged,
ham.tonic,
ham.master,
ham.mythical,
ham.runic,
ham.resurgent,
ham.super,
ham.major,
ham.lesser,
ham.superior,
ham.minor,
ham.greater,
ham.healingPotion
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
2 changes: 1 addition & 1 deletion Core/Spells.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local addon, ham = ...
local addonName, ham = ...

ham.crimsonVialSpell = 185311
ham.renewal = 108238
Expand Down
Loading

0 comments on commit 1601d7c

Please sign in to comment.