Commit a44e6bce authored by Darth Predator's avatar Darth Predator
Browse files

This way. This closes #10

parent d75a6a16
......@@ -604,6 +604,7 @@ L["Automatic Width"] = true
L["Change width based on the zone name length."] = true
L["Update Throttle"] = true
L["The frequency of coordinates and zonetext updates. Check will be done more often with lower values."] = true
L["Hide In Class Hall"] = true
L["Full Location"] = true
L["Color Type"] = true
L["Custom Color"] = true
......
......@@ -595,6 +595,7 @@ L["Automatic Width"] = true
L["Change width based on the zone name length."] = true
L["Update Throttle"] = true
L["The frequency of coordinates and zonetext updates. Check will be done more often with lower values."] = true
L["Hide In Class Hall"] = true
L["Full Location"] = true
L["Color Type"] = true
L["Custom Color"] = true
......
......@@ -601,6 +601,7 @@ L["Automatic Width"] = "Автоматическая ширина"
L["Change width based on the zone name length."] = "Изменять ширину в зависимости от длины текста."
L["Update Throttle"] = "Частота обновления"
L["The frequency of coordinates and zonetext updates. Check will be done more often with lower values."] = "Частота обновления координат и текста локации. Проверка проводится чаще с более низким значением."
L["Hide In Class Hall"] = "Скрывать в оплоте"
L["Full Location"] = "Полный текст"
L["Color Type"] = "Тип окрашивания"
L["Custom Color"] = "Свой цвет"
......
......@@ -366,6 +366,7 @@ function LP:Toggle()
loc_panel:Hide()
E:DisableMover(loc_panel.mover:GetName())
end
LP:UNIT_AURA(nil, "player")
end
function LP:PopulateItems()
......@@ -499,23 +500,14 @@ end
function LP:PLAYER_ENTERING_WORLD()
local x, y = T.GetPlayerMapPosition("player")
if x then LP.RestrictedArea = false else LP.RestrictedArea = true end
LP:OrderHallToggle()
LP:UNIT_AURA(nil, "player")
end
function LP:ZONE_CHANGED_NEW_AREA()
--if not LP.db.enable then return end
LP:OrderHallToggle()
end
function LP:OrderHallToggle()
if LP.db.enable then
if (C_Garrison.IsPlayerInGarrison(LE_GARRISON_TYPE_7_0)) and LP.db.orderhallhide then
--print("I have entered my class hall")
loc_panel:Hide()
elseif not loc_panel:IsShown() then
--print("I have left my class hall")
loc_panel:Show()
end
function LP:UNIT_AURA(event, unit)
if unit ~= "player" then return end
if LP.db.enable and LP.db.orderhallhide then
local inOrderHall = C_Garrison.IsPlayerInGarrison(LE_GARRISON_TYPE_7_0);
loc_panel:SetShown(not inOrderHall);
end
end
......@@ -541,7 +533,8 @@ function LP:Initialize()
LP:RegisterEvent("PLAYER_REGEN_DISABLED")
LP:RegisterEvent("PLAYER_REGEN_ENABLED")
LP:RegisterEvent("PLAYER_ENTERING_WORLD")
LP:RegisterEvent("ZONE_CHANGED_NEW_AREA")
LP:RegisterEvent("UNIT_AURA")
end
SLE:RegisterModule(LP:GetName())
\ No newline at end of file
......@@ -13,7 +13,7 @@ local function configTable()
type = "toggle",
name = L["Enable"],
order = 1,
set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Toggle(); LP:OrderHallToggle() end,
set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Toggle(); end,
},
linkcoords = {
type = "toggle",
......@@ -75,7 +75,7 @@ local function configTable()
order = 9,
type = "toggle",
name = L["Hide In Class Hall"],
set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:OrderHallToggle() end,
set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Toggle(); end,
},
location = {
order = 20,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment