mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 04:30:01 +00:00
hunterbar: add range based auto paging
This commit is contained in:
Vendored
+5
@@ -52,6 +52,11 @@ pfLocaleSpellInterrupts["deDE"] = {
|
||||
["Erdschock"] = true;
|
||||
}
|
||||
|
||||
pfLocaleHunterbars["deDE"] = {
|
||||
["MELEE"] = "Raptorstoß",
|
||||
["RANGED"] = "Arkaner Schuss",
|
||||
}
|
||||
|
||||
pfLocaleSpells["deDE"] = {
|
||||
['Eisenherz nimmt wieder Huhngestalt an'] = {t=1000, icon="Ability_Racial_BearForm" };
|
||||
['Monstrositätenspucke'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
|
||||
|
||||
Vendored
+5
@@ -52,6 +52,11 @@ pfLocaleSpellInterrupts["enUS"] = {
|
||||
["Earth Shock"] = true;
|
||||
}
|
||||
|
||||
pfLocaleHunterbars["enUS"] = {
|
||||
["MELEE"] = "Raptor Strike",
|
||||
["RANGED"] = "Arcane Shot",
|
||||
}
|
||||
|
||||
pfLocaleSpells["enUS"] = {
|
||||
['"Plucky" Resumes Chicken Form'] = {t=1000, icon="Ability_Racial_BearForm" };
|
||||
['Abomination Spit'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
|
||||
|
||||
Vendored
+5
@@ -52,6 +52,11 @@ pfLocaleSpellInterrupts["frFR"] = {
|
||||
["Horion de terre"] = true;
|
||||
}
|
||||
|
||||
pfLocaleHunterbars["frFR"] = {
|
||||
["MELEE"] = "Attaque du raptor",
|
||||
["RANGED"] = "Tir des Arcanes",
|
||||
}
|
||||
|
||||
pfLocaleSpells["frFR"] = {
|
||||
['Le Brave reprend sa forme de poulet'] = {t=1000, icon="Ability_Racial_BearForm" };
|
||||
['Crachat d\'abomination'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
|
||||
|
||||
Vendored
+5
@@ -52,6 +52,11 @@ pfLocaleSpellInterrupts["ruRU"] = {
|
||||
["Земной шок"] = true;
|
||||
}
|
||||
|
||||
pfLocaleHunterbars["ruRU"] = {
|
||||
["MELEE"] = "Удар ящера",
|
||||
["RANGED"] = "Чародейский выстрел",
|
||||
}
|
||||
|
||||
pfLocaleSpells["ruRU"] = {
|
||||
['"Отчаянный" снова принимает облик цыпленка"'] = {t=1000, icon="Ability_Racial_BearForm" };
|
||||
['Плевок мясника'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
|
||||
|
||||
Vendored
+5
@@ -52,6 +52,11 @@ pfLocaleSpellInterrupts["zhCN"] = {
|
||||
["地震术"] = true;
|
||||
}
|
||||
|
||||
pfLocaleHunterbars["zhCN"] = {
|
||||
["MELEE"] = "猛禽一击",
|
||||
["RANGED"] = "奥术射击",
|
||||
}
|
||||
|
||||
pfLocaleSpells["zhCN"] = {
|
||||
['"Plucky" Resumes Chicken Form'] = {t=1000, icon="Ability_Racial_BearForm" };
|
||||
['憎恶喷吐'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
|
||||
|
||||
@@ -89,6 +89,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("bars", nil, "background", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "glowrange", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "rangecolor", "1,0.1,0.1,1")
|
||||
pfUI:UpdateConfig("bars", nil, "hunterbar", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_time", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_actionmain", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_bottomleft", "0")
|
||||
|
||||
@@ -934,6 +934,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Show actionbar backgrounds", pfUI_config.bars, "background", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Use colored icon as range indicator", pfUI_config.bars, "glowrange", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Range indicator Color", pfUI_config.bars, "rangecolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Range based auto paging (Hunter)", pfUI_config.bars, "hunterbar", "checkbox")
|
||||
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Seconds to wait until hide bars", pfUI_config.bars, "hide_time")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Autohide main actionbar", pfUI_config.bars, "hide_actionmain", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Autohide bottomleft actionbar", pfUI_config.bars, "hide_bottomleft", "checkbox")
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
pfUI:RegisterModule("hunterbar", function ()
|
||||
local _,class = UnitClass("player")
|
||||
if class ~= "HUNTER" or pfUI_config.bars.hunterbar == "0" then return end
|
||||
|
||||
pfUI.hunterbar = CreateFrame("Frame", "pfHunterBar", UIParent)
|
||||
pfUI.hunterbar.scanner = CreateFrame("GameTooltip", "pfHunterBarScanner", UIParent, "GameTooltipTemplate")
|
||||
pfUI.hunterbar.scanner:SetOwner(pfUI.hunterbar, "ANCHOR_NONE")
|
||||
|
||||
pfUI.hunterbar.melee = nil
|
||||
pfUI.hunterbar.ranged = nil
|
||||
pfUI.hunterbar.current = 1
|
||||
|
||||
pfUI.hunterbar:RegisterEvent("ACTIONBAR_SLOT_CHANGED")
|
||||
pfUI.hunterbar:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.hunterbar:SetScript("OnEvent", function()
|
||||
for i=1,120 do
|
||||
if pfUI.hunterbar.melee and pfUI.hunterbar.ranged then return end
|
||||
|
||||
pfUI.hunterbar.scanner:ClearLines()
|
||||
pfUI.hunterbar.scanner:SetAction(i)
|
||||
if pfHunterBarScannerTextLeft1 then
|
||||
if pfHunterBarScannerTextLeft1:GetText() == pfLocaleHunterbars[pfUI.cache["locale"]]["MELEE"] then
|
||||
pfUI.hunterbar.melee = i
|
||||
elseif pfHunterBarScannerTextLeft1:GetText() == pfLocaleHunterbars[pfUI.cache["locale"]]["RANGED"] then
|
||||
pfUI.hunterbar.ranged = i
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.hunterbar:SetScript("OnUpdate", function()
|
||||
if not pfUI.hunterbar.melee or not pfUI.hunterbar.ranged then return end
|
||||
|
||||
if IsActionInRange(pfUI.hunterbar.melee) == 1 and IsActionInRange(pfUI.hunterbar.ranged) == 0 then
|
||||
if pfUI.hunterbar.current ~= 0 then
|
||||
CURRENT_ACTIONBAR_PAGE = 9
|
||||
ChangeActionBarPage()
|
||||
pfUI.hunterbar.current = 0
|
||||
end
|
||||
else
|
||||
if pfUI.hunterbar.current ~= 1 then
|
||||
CURRENT_ACTIONBAR_PAGE = 1
|
||||
ChangeActionBarPage()
|
||||
pfUI.hunterbar.current = 1
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -34,6 +34,7 @@ pfLocaleShift = {}
|
||||
pfLocaleSpells = {}
|
||||
pfLocaleSpellEvents = {}
|
||||
pfLocaleSpellInterrupts = {}
|
||||
pfLocaleHunterbars = {}
|
||||
|
||||
pfUI:SetScript("OnEvent", function()
|
||||
if arg1 == "pfUI" then
|
||||
|
||||
Reference in New Issue
Block a user