Skip to content

Commit

Permalink
Updated for SL
Browse files Browse the repository at this point in the history
The Addon was updated for SL with Phial of Serenity and Spiritual Healing Potion
  • Loading branch information
ollidiemaus committed Nov 27, 2020
1 parent fe3069e commit 8fb9d9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
4 changes: 2 additions & 2 deletions HealthstoneAutoMacro.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 80300
## Version: 1.1.2
## Interface: 90001
## Version: 1.2
## Title: Healthstone Auto Macro
## Author: ollidiemaus
## Notes: Updates the Macro HAMHealthPot to use either Healthstone, Coastal Healing Potion, Silas' Vial of Continuous Curing or Emerald of Vigor
Expand Down
26 changes: 10 additions & 16 deletions code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,27 @@
do

local HSId = 5512;
local NormalPotId = 152494;
local AbyssalPotId = 169451;
local EmeraldId = 166799; -- Emerald of Vigor
local NormalPotId = 171267;
local PhialId = 177278; -- Phial of Serenity

function getPotNames()
NormalPotName = GetItemInfo(NormalPotId);
AbyssalPotName = GetItemInfo(AbyssalPotId);
EmeraldName = GetItemInfo(EmeraldId);
PhialName = GetItemInfo(PhialId);

-- fall back on connect sometimes GetItem fail
if AbyssalPotName==nil then
AbyssalPotName = "Abyssal Healing Potion"
end
if NormalPotName==nil then
NormalPotName = "Coastal Healing Potion"
NormalPotName = "Spiritual Healing Potion"
end
if EmeraldName==nil then
EmeraldName = "Emerald of Vigor"
if PhialName==nil then
PhialName = "Phial of Serenity"
end
return AbyssalPotName, NormalPotName, EmeraldName
return NormalPotName, PhialName
end

function getPots()
AbyssalPotName, NormalPotName, EmeraldName = getPotNames()
NormalPotName, PhialName = getPotNames()
return {
{EmeraldName, GetItemCount(EmeraldId, false, false)},
{AbyssalPotName, GetItemCount(AbyssalPotId, false, false)},
{PhialName, GetItemCount(PhialId, false, false)},
{NormalPotName, GetItemCount(NormalPotId, false, false)}

}
Expand Down Expand Up @@ -88,4 +82,4 @@ HealPotMacroIcon:SetScript("OnEvent",function(self,event,...)
end
end)

end
end

0 comments on commit 8fb9d9d

Please sign in to comment.