Skip to content

Commit

Permalink
Version: 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharlikran committed Jul 24, 2022
1 parent 3802f9a commit 813760b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
28 changes: 14 additions & 14 deletions FoundryTacticalCombat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--[[----------------------------------------------------------
FOUNDRY TACTICAL COMBAT
----------------------------------------------------------
FTC is a user interface overhaul designed the replace the Elder Scrolls Online
FTC is a user interface overhaul designed the replace the Elder Scrolls Online
interface and provide useful and time-sensitive information about combat events
allowing players to better respond and react to evolving game situations.
Expand All @@ -18,8 +18,8 @@
Author: Atropos / Philgo68 / Demiknight (Dark Brotherhood) / Rhyono (Homestead/Morrowind/HotR/CC/Dragon Bones/Summerset/Wolfhunter/Murkmire/Wrathstone/Elsweyr/Scalebreaker/Dragonhold/Harrowstorm/Greymoor/Stonethorn/Markarth/FoA/Blackwood/Walking Flame/Deadlands)
Contributors: decay2 / Scootworks / Hoft / Antisenil / sirinsidiator / mitbulls
Email: [email protected]
Version: 1.21
Updated: 2022-06-07
Version: 1.22
Updated: 2022-24-07
]]--

--[[----------------------------------------------------------
Expand All @@ -30,7 +30,7 @@
FTC = {}
FTC.name = "FoundryTacticalCombat"
FTC.tag = "FTC"
FTC.version = 1.21
FTC.version = 1.22
FTC.settings = 0.60
FTC.language = GetCVar("language.2")
FTC.UI = WINDOW_MANAGER:CreateTopLevelWindow( "FTC_UI" )
Expand All @@ -55,20 +55,20 @@ FTC.inMenu = false
FTC.inWelcome = false
FTC.move = false

--[[
--[[
* Master Initialization Function
* --------------------------------
* Triggered by EVENT_ADD_ON_LOADED
* --------------------------------
]]--
]]--
function FTC.Initialize( eventCode, addOnName )

-- Only set up for FTC
if ( addOnName ~= FTC.name ) then return end

-- Unregister setup event
EVENT_MANAGER:UnregisterForEvent( "FTC" , EVENT_ADD_ON_LOADED )

-- Load Saved Variables
FTC.Vars = ZO_SavedVars:NewAccountWide( 'FTC_VARS' , (FTC.settings*100) , nil , FTC.Defaults )

Expand All @@ -77,7 +77,7 @@ function FTC.Initialize( eventCode, addOnName )

-- Initialize UI Layer
FTC.UI:Initialize()

-- Setup Character Management
FTC.Player:Initialize()
FTC.Target:Initialize()
Expand All @@ -88,7 +88,7 @@ function FTC.Initialize( eventCode, addOnName )

-- Unit Frames Component
if ( FTC.Vars.EnableFrames ) then FTC.Frames:Initialize() end

-- Active Buffs Component
if ( FTC.Vars.EnableBuffs ) then FTC.Buffs:Initialize() end

Expand All @@ -100,20 +100,20 @@ function FTC.Initialize( eventCode, addOnName )

-- Advanced Hotbar Component
if ( FTC.Vars.EnableHotbar ) then FTC.Hotbar:Initialize() end

-- Combat Statistics
if ( FTC.Vars.EnableStats ) then FTC.Stats:Initialize() end

-- Menu Component
FTC.Menu:Initialize()

-- Register Event Handlers
FTC:RegisterEvents()

-- Register Slash Command
SLASH_COMMANDS["/"..FTC.tag] = FTC.Slash
SLASH_COMMANDS["/"..string.lower(FTC.tag)] = FTC.Slash

-- Fire Setup Callback
CALLBACK_MANAGER:FireCallbacks("FTC_Ready")
end
Expand Down
5 changes: 3 additions & 2 deletions FoundryTacticalCombat.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Title: Foundry Tactical Combat
## Description: A combat enhancement addon designed to give players access to relevant combat data in an easy to process framework which allows them to respond quickly and effectively to evolving combat situations.
## Version: 1.21
## APIVersion: 101034
## Version: 1.22
## AddOnVersion: 122
## APIVersion: 100035
## SavedVariables: FTC_VARS
## DependsOn: LibAddonMenu-2.0 LibMsgWin-1.0>=10
## OptionalDependsOn: UnitFramesRebirth
Expand Down
30 changes: 15 additions & 15 deletions log/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
COMBAT LOG FUNCTIONS
]]----------------------------------------------------------

--[[
--[[
* Initialize Combat Log Component
* --------------------------------
* Called by FTC:Initialize()
Expand All @@ -33,7 +33,7 @@
FCL = FTC.LMW:CreateMsgWindow("FTC_CombatLog", GetString(FTC_CL_Label) , nil , nil )
FCL:SetDimensions(FTC.Vars.LogWidth,FTC.Vars.LogHeight)
-- fix for High Isle GuiRoot startup error
--FCL:SetParent(FTC_UI)
-- FCL:SetParent(FTC_UI)
FCL:SetParent(GuiRoot)
FCL:ClearAnchors()
FCL:SetAnchor(unpack(FTC.Vars.FTC_CombatLog))
Expand All @@ -48,7 +48,7 @@
FTC_CombatLogLabel:SetFont(FTC.UI:Font(FTC.Vars.LogFont,FTC.Vars.LogFontSize+2,true))
FTC_CombatLogBg:SetAlpha(FTC.Vars.LogOpacity/100)

--[[
--[[
* Prehook Chat window
]]--
local chatSystem = SYSTEMS:GetObject("ChatSystem")
Expand All @@ -64,17 +64,17 @@

ZO_PreHook(chatSystem, "Minimize", function() FTC.Log:SetupChat( false ) end)
ZO_PreHook(chatSystem, "Maximize", function() FTC.Log:SetupChat( true ) end)

isPreHooked = true
end)

-- Save initialization status
if not FTC.init.Log then
FTC.init.Log = true
end
end

--[[
--[[
* Setup Combat Log Interaction with Chat
* --------------------------------
* Called by FTC.Log:Initialize()
Expand All @@ -92,7 +92,7 @@
end
end

--[[
--[[
* Setup Combat Log Interaction with Chat
* --------------------------------
* Called by FTC.Log:Initialize()
Expand All @@ -111,7 +111,7 @@
end
end

--[[
--[[
* Print Message to Log
* --------------------------------
* Called by FTC.Log:Damage()
Expand All @@ -133,7 +133,7 @@
log:AddText( time .. message , unpack(color) )
end

--[[
--[[
* Write Combat Log Damage Events
* --------------------------------
* Called by FTC:OnCombatEvent()
Expand Down Expand Up @@ -206,15 +206,15 @@

-- Ignore healing/ignore healing out of combat
if (FTC.Vars.LogCOH and not IsUnitInCombat("player") and damage.heal) or (FTC.Vars.LogHideHeal and damage.heal) then

else
-- Construct the message
FTC.Log:Print( subject .. verb .. target .. ability .. amount , color )
end
end
end

--[[
--[[
* Write Combat Log Experience
* --------------------------------
* Called by FTC.OnXPUpdate()
Expand All @@ -223,7 +223,7 @@
function FTC.Log:Exp( currentExp , reason )

-- Get the new experience amount
local diff = math.max( currentExp - FTC.Player.exp , 0 )
local diff = math.max( currentExp - FTC.Player.exp , 0 )
if ( diff <= 0 ) then return end

-- Determine label
Expand All @@ -233,10 +233,10 @@
else label = " bonus " end

-- Print to log
FTC.Log:Print( "You earned " .. FTC.DisplayNumber(diff) .. label .. "experience." , {0,0.6,0.6} )
FTC.Log:Print( "You earned " .. FTC.DisplayNumber(diff) .. label .. "experience." , {0,0.6,0.6} )
end

--[[
--[[
* Write Combat Log Alliance Points
* --------------------------------
* Called by FTC.OnXPUpdate()
Expand All @@ -246,5 +246,5 @@
if ( difference < 0 ) then return end

-- Print to log
FTC.Log:Print( "You earned " .. FTC.DisplayNumber(difference) .. " alliance points." , {0,0.6,0.6} )
FTC.Log:Print( "You earned " .. FTC.DisplayNumber(difference) .. " alliance points." , {0,0.6,0.6} )
end

0 comments on commit 813760b

Please sign in to comment.