Quantcast

- Some cleanup of the core functions to eliminate stuff like vehicles, orderhalls, etc. Also did some changes to the template to allow for better "bar" definitions which are returning "nil" at the moment.

HonorGoG [06-25-19 - 20:10]
- Some cleanup of the core functions to eliminate stuff like vehicles, orderhalls, etc.  Also did some changes to the template to allow for better "bar" definitions which are returning "nil" at the moment.
Filename
TitanClassic/TitanClassic.toc
TitanClassic/TitanClassicMovable.lua
TitanClassic/TitanPanelClassic.lua
TitanClassic/TitanPanelClassicTemplate.lua
diff --git a/TitanClassic/TitanClassic.toc b/TitanClassic/TitanClassic.toc
index 1046d5f..27f56d3 100644
--- a/TitanClassic/TitanClassic.toc
+++ b/TitanClassic/TitanClassic.toc
@@ -2,17 +2,17 @@
 ## Title: Titan Panel Classic |cff00aa001.0.0.11302|r
 ## Author: Titan Panel Development Team
 ## Version: 1.0.0.11302
-## SavedVariables: TitanClassicAll, TitanClassicSettings, TitanClassicSkins, ServerTimeOffsets, ServerHourFormat
+## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat
 ## OptionalDeps: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu
 ## Notes: Adds a display bar on the top and/or bottom of the screen. Allows users to show and control information/launcher plugins.
 ## X-Embeds: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu
-## X-Credits: TitanMod, Dark Imakuni, Adsertor, Titan Dev Team
+## X-Credits: TitanMod, Dark Imakuni, Adsertor, Titan Panel Development Team
 ## X-Category: Interface Enhancements
 ## X-Website: http://www.titanpanel.org
 ## X-Email: honorgog@gmail.com
 ## X-Localizations: enUS, ptBR, zhCN, deDE, esES, frFR, itIT, koKR, ruRU, zhTW
 ## X-License: All rights reserved (See license.txt)
-## X-WoWI-ID: 8092
+## X-WoWI-ID:

 embeds.xml

diff --git a/TitanClassic/TitanClassicMovable.lua b/TitanClassic/TitanClassicMovable.lua
index 8191d8f..6bb47c0 100755
--- a/TitanClassic/TitanClassicMovable.lua
+++ b/TitanClassic/TitanClassicMovable.lua
@@ -118,7 +118,7 @@ NOTE:
 :NOTE
 --]]
 function TitanMovable_MenuBar_Enable()
-	if InCombatLockdown() or UnitInVehicle("player") then
+	if InCombatLockdown() then
 		-- wait until out of combat...
 		-- if player is in vehicle then do not set user is placed,
 		-- needed whether in taxi or other vehicle that may replace the main menu bar
@@ -383,12 +383,14 @@ local function MoveMenuFrame(frame_ptr, start_y, top_bottom, force)
 		and DoAdjust(top_bottom, force)
 	then
 		local yOffset = TitanMovable_GetPanelYOffset(top_bottom) -- includes scale adjustment
---		xOffset = TitanMovableFrame_GetXOffset(frame, top_bottom);
+		xOffset = TitanMovableFrame_GetXOffset(frame, top_bottom);
+--[[ Urnati : Is StatusTrackingBarManager needed in this case since the above xOffset is active again? --]]
 		if ( StatusTrackingBarManager:GetNumberVisibleBars() == 2 ) then
 			yOffset = yOffset + 17;
 		elseif ( StatusTrackingBarManager:GetNumberVisibleBars() == 1 ) then
 			yOffset = yOffset + 14;
 		end
+
 		xOfs = TitanPanelGetVar("MainMenuBarXAdj")

 		SetPosition(frame, "BOTTOM", "UIParent", "BOTTOM", xOfs, yOffset)
@@ -795,12 +797,11 @@ function TitanMovable_SecureFrames()
 		TitanPanelAce:SecureHook("TargetFrame_Update", TitanPanel_AdjustFrames) -- TargetFrame.lua
 --		TitanPanelAce:SecureHook(MainMenuBar, "Show", TitanPanel_AdjustFrames) -- HelpFrame.xml
 --		TitanPanelAce:SecureHook(MainMenuBar, "Hide", TitanPanel_AdjustFrames) -- HelpFrame.xml
-		TitanPanelAce:SecureHook(OverrideActionBar, "Show", TitanPanel_AdjustFrames) -- HelpFrame.xml
-		TitanPanelAce:SecureHook(OverrideActionBar, "Hide", TitanPanel_AdjustFrames) -- HelpFrame.xml
+--		TitanPanelAce:SecureHook(OverrideActionBar, "Show", TitanPanel_AdjustFrames) -- HelpFrame.xml
+--		TitanPanelAce:SecureHook(OverrideActionBar, "Hide", TitanPanel_AdjustFrames) -- HelpFrame.xml
 		TitanPanelAce:SecureHook("UpdateContainerFrameAnchors", Titan_ContainerFrames_Relocate) -- ContainerFrame.lua
-		TitanPanelAce:SecureHook(WorldMapFrame.BorderFrame.MaximizeMinimizeFrame.MinimizeButton, "Show", TitanPanel_AdjustFrames) -- WorldMapFrame.lua
-
-		TitanPanelAce:SecureHook("OrderHall_CheckCommandBar", TitanPanel_AdjustFrames)
+--		TitanPanelAce:SecureHook(WorldMapFrame.BorderFrame.MaximizeMinimizeFrame.MinimizeButton, "Show", TitanPanel_AdjustFrames) -- WorldMapFrame.lua
+--		TitanPanelAce:SecureHook("OrderHall_CheckCommandBar", TitanPanel_AdjustFrames)
 	end

 	if not TitanPanelAce:IsHooked("VideoOptionsFrameOkay_OnClick", Titan_AdjustUIScale) then
diff --git a/TitanClassic/TitanPanelClassic.lua b/TitanClassic/TitanPanelClassic.lua
index 103c3f5..bc2f540 100644
--- a/TitanClassic/TitanPanelClassic.lua
+++ b/TitanClassic/TitanPanelClassic.lua
@@ -302,16 +302,16 @@ _G[TITAN_PANEL_CONTROL]:RegisterEvent("PLAYER_REGEN_DISABLED");
 _G[TITAN_PANEL_CONTROL]:RegisterEvent("PLAYER_REGEN_ENABLED");
 _G[TITAN_PANEL_CONTROL]:RegisterEvent("CVAR_UPDATE");
 _G[TITAN_PANEL_CONTROL]:RegisterEvent("PLAYER_LOGOUT");
-_G[TITAN_PANEL_CONTROL]:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
-_G[TITAN_PANEL_CONTROL]:RegisterEvent("UNIT_ENTERED_VEHICLE");
-_G[TITAN_PANEL_CONTROL]:RegisterEvent("UNIT_EXITED_VEHICLE");
+--_G[TITAN_PANEL_CONTROL]:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
+--_G[TITAN_PANEL_CONTROL]:RegisterEvent("UNIT_ENTERED_VEHICLE");
+--_G[TITAN_PANEL_CONTROL]:RegisterEvent("UNIT_EXITED_VEHICLE");
 _G[TITAN_PANEL_CONTROL]:SetScript("OnEvent", function(_, event, ...)
 	_G[TITAN_PANEL_CONTROL][event](_G[TITAN_PANEL_CONTROL], ...)
 end)
 -- For the pet battle - for now we'll hide the Titan bars...
 -- Cannot seem to move the 'top' part of the frame.
-_G[TITAN_PANEL_CONTROL]:RegisterEvent("PET_BATTLE_OPENING_START");
-_G[TITAN_PANEL_CONTROL]:RegisterEvent("PET_BATTLE_CLOSE");
+--_G[TITAN_PANEL_CONTROL]:RegisterEvent("PET_BATTLE_OPENING_START");
+--_G[TITAN_PANEL_CONTROL]:RegisterEvent("PET_BATTLE_CLOSE");


 --[[ Titan
diff --git a/TitanClassic/TitanPanelClassicTemplate.lua b/TitanClassic/TitanPanelClassicTemplate.lua
index 9dd6e1f..9b4a909 100644
--- a/TitanClassic/TitanPanelClassicTemplate.lua
+++ b/TitanClassic/TitanPanelClassicTemplate.lua
@@ -176,7 +176,11 @@ local function TitanTooltip_SetPanelTooltip(self, id, frame)
 	local scale = TitanPanelGetVar("Scale");
 	local offscreenX, offscreenY;
 	local i = TitanPanel_GetButtonNumber(id);
-	local bar = TITAN_PANEL_DISPLAY_PREFIX..TitanUtils_GetWhichBar(id)
+	if TITAN_PANEL_DISPLAY_PREFIX~=nil and TitanUtils_GetWhichBar(id)~=nil then
+		local bar = TITAN_PANEL_DISPLAY_PREFIX..TitanUtils_GetWhichBar(id)
+	else
+		local bar = ""
+	end
 	local vert = TitanBarData[bar].vert
 	-- Get TOP or BOTTOM for the anchor and relative anchor
 	local rel_pt, pt