0
@@ -12,11 +12,6 @@ frame:SetScript("OnShow", function()
0
local title, subtitle = LibStub("tekKonfig-Heading").new(frame, "Buffet", "This panel allows you to quickly create the base macros for Buffet to edit. You can also set the macro text to be used.")
0
local function OnClick(self)
0
- if InCombatLockdown() then
0
- Buffet:Print("Cannot create macros in combat.")
0
local id = GetMacroIndexByName(self.name)
0
if id and id ~= 0 then PickupMacro(id)
0
elseif GetNumMacros() >= MAX_ACCOUNT_MACROS then Buffet:Print("All global macros in use.")
0
@@ -32,12 +27,14 @@ frame:SetScript("OnShow", function()
0
hpbutt.tiptext = "Generate a global macro for food, bandages, health potions and health stones."
0
hpbutt:SetScript("OnClick", OnClick)
0
+ if InCombatLockdown() then hpbutt:Disable() end
0
local mpbutt = tekbutt.new(frame, "TOPLEFT", hpbutt, "TOPRIGHT", GAP, 0)
0
mpbutt:SetText("MP Macro")
0
mpbutt.tiptext = "Generate a global macro for water, mana potions and mana stones."
0
mpbutt:SetScript("OnClick", OnClick)
0
+ if InCombatLockdown() then mpbutt:Disable() end
0
local hpmacrolabel = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
0
hpmacrolabel:SetText("HP Macro")
0
@@ -104,6 +101,13 @@ frame:SetScript("OnShow", function()
0
mpeditbox:SetScript("OnEnter", mpbutt:GetScript("OnEnter"))
0
mpeditbox:SetScript("OnLeave", mpbutt:GetScript("OnLeave"))
0
+ frame:SetScript("OnEvent", function(self, event)
0
+ if event == "PLAYER_REGEN_DISABLED" then hpbutt:Disable() mpbutt:Disable()
0
+ else hpbutt:Enable() mpbutt:Enable() end
0
+ frame:RegisterEvent("PLAYER_REGEN_ENABLED")
0
+ frame:RegisterEvent("PLAYER_REGEN_DISABLED")
0
frame:SetScript("OnShow", nil)
Comments
No one has commented yet.