mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
removed unecessaary actionbar file
removed unecessaary actionbar file
This commit is contained in:
+51
-21
@@ -395,6 +395,14 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
|||||||
for line in gfind(body, "[^%\n]+") do
|
for line in gfind(body, "[^%\n]+") do
|
||||||
_, _, match = string.find(line, '^#showtooltip (.+)')
|
_, _, match = string.find(line, '^#showtooltip (.+)')
|
||||||
|
|
||||||
|
-- skip any further manual macro scanning on
|
||||||
|
-- gameclients with native macro spell detection
|
||||||
|
if pfUI.client > 11200 and match then
|
||||||
|
self.spellslot = nil
|
||||||
|
self.booktype = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- allow the user to disable the scan
|
-- allow the user to disable the scan
|
||||||
if match and strfind(match, "disable") then
|
if match and strfind(match, "disable") then
|
||||||
return
|
return
|
||||||
@@ -972,17 +980,25 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
|||||||
pageswitch:SetScript("OnEvent", function()
|
pageswitch:SetScript("OnEvent", function()
|
||||||
if class ~= "DRUID" then return end
|
if class ~= "DRUID" then return end
|
||||||
|
|
||||||
-- UNIT_CASTEVENT: detect Cat Form and Prowl cast instantly
|
-- On login/reload: full scan
|
||||||
-- Cat Form: 768 | Prowl: 5215 (R1), 6783 (R2), 9913 (R3)
|
if event == "PLAYER_ENTERING_WORLD" then
|
||||||
|
prowling = FullScan()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- UNIT_CASTEVENT: detect Prowl cast instantly
|
||||||
|
-- Prowl Spell IDs: 5215 (Rank 1), 6783 (Rank 2), 9913 (Rank 3)
|
||||||
if event == "UNIT_CASTEVENT" then
|
if event == "UNIT_CASTEVENT" then
|
||||||
local guid, target, cEvent, spellId = arg1, arg2, arg3, arg4
|
local guid, target, cEvent, spellId = arg1, arg2, arg3, arg4
|
||||||
local _, playerGuid = UnitExists("player")
|
local _, playerGuid = UnitExists("player")
|
||||||
if guid == playerGuid and cEvent == "CAST" then
|
if guid == playerGuid and cEvent == "CAST" then
|
||||||
if spellId == 5215 or spellId == 6783 or spellId == 9913 then
|
if spellId == 5215 or spellId == 6783 or spellId == 9913 then
|
||||||
|
-- Prowl cast detected
|
||||||
inCatForm = true
|
inCatForm = true
|
||||||
prowlActive = true
|
prowlActive = true
|
||||||
prowling = true
|
prowling = true
|
||||||
elseif spellId == 768 then
|
elseif spellId == 768 then
|
||||||
|
-- Cat Form cast (Spell ID 768)
|
||||||
inCatForm = true
|
inCatForm = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1294,26 +1310,40 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
|||||||
if enable == "1" then
|
if enable == "1" then
|
||||||
-- handle pet bar
|
-- handle pet bar
|
||||||
if i == 12 then
|
if i == 12 then
|
||||||
-- only show when pet actions exists
|
if pfUI.client > 11200 then
|
||||||
if PetHasActionBar() or pfUI.unlock and pfUI.unlock:IsShown() then
|
if InCombatLockdown and InCombatLockdown() then
|
||||||
bars[i]:Show()
|
-- don't process those events during combat
|
||||||
else
|
else
|
||||||
bars[i]:Hide()
|
-- set state driver for pet bars
|
||||||
end
|
bars[i]:SetAttribute("unit", "pet")
|
||||||
|
local visibility = pfUI.unlock and pfUI.unlock:IsShown() and "show" or petvisibility
|
||||||
-- show/hide petbar on petbar updates
|
if bars[i].visibility ~= visibility then
|
||||||
if init then
|
RegisterStateDriver(bars[i], 'visibility', visibility)
|
||||||
bars[i]:RegisterEvent("PET_BAR_UPDATE")
|
bars[i].visibility = visibility
|
||||||
bars[i]:SetScript("OnEvent", function()
|
|
||||||
-- hide obsolete buttons
|
|
||||||
for i=1, NUM_PET_ACTION_SLOTS do
|
|
||||||
if not PetHasActionBar() and bars[12][i] then
|
|
||||||
bars[12][i]:Hide()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
-- refresh layout
|
end
|
||||||
CreateActionBar(12)
|
else
|
||||||
end)
|
-- only show when pet actions exists
|
||||||
|
if PetHasActionBar() or pfUI.unlock and pfUI.unlock:IsShown() then
|
||||||
|
bars[i]:Show()
|
||||||
|
else
|
||||||
|
bars[i]:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- show/hide petbar on petbar updates
|
||||||
|
if init then
|
||||||
|
bars[i]:RegisterEvent("PET_BAR_UPDATE")
|
||||||
|
bars[i]:SetScript("OnEvent", function()
|
||||||
|
-- hide obsolete buttons
|
||||||
|
for i=1, NUM_PET_ACTION_SLOTS do
|
||||||
|
if not PetHasActionBar() and bars[12][i] then
|
||||||
|
bars[12][i]:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- refresh layout
|
||||||
|
CreateActionBar(12)
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- handle shapeshift bar
|
-- handle shapeshift bar
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user