Download
(6 Kb)
Download
Updated: 08/24/21 12:19 AM
Pictures
File Info
Compatibility:
Waking Flame (7.1.5)
Blackwood (7.0.5)
Updated:08/24/21 12:19 AM
Created:01/29/21 02:24 AM
Monthly downloads:121
Total downloads:8,548
Favorites:12
MD5:
Werewolf Timer Bar  Popular! (More than 5000 hits)
Version: 2.6
by: maximoz [More]
Descriptions

My first addon here.

It display a bar when in werewolf.

The ingame bar or other UIs were too small and not very customizable, hence why this addon was conceived.

I added the ability to block the ultimate from being pressed when in werewolf form as my fat clumsy fingers will accidentally press the ultimate key and get me out of werewolf form. You may also assign a keybind to toggle this.


Hope you will enjoy it!

Dependencies:
1. LibSavedVars
2. LibAddonMenu-2.0
Version 2.6
- API bump for Waking Flame
Version 2.5
- Found and fix bar display code
- Some code clean up
Version 2.4
- API bump for Blackwood
Version 2.3
- Added 3 font styles
- Added keybind to allow toggle for the ultimate block
Version 2.2
- API bump for Flames of Ambition
Version 2.1
- Fix to ultimate sometimes not getting blocked
Version 2
- First release
Optional Files (0)


Archived Files (6)
File Name
Version
Size
Uploader
Date
2.5
6kB
maximoz
07/10/21 08:39 AM
2.4
6kB
maximoz
05/27/21 02:10 AM
2.3
6kB
maximoz
03/17/21 04:32 AM
2.2
5kB
maximoz
03/02/21 05:55 AM
2.1
5kB
maximoz
02/03/21 07:58 AM
2
5kB
maximoz
01/29/21 02:24 AM


Post A Reply Comment Options
Unread 01/04/23, 03:34 PM  
PhnxZ
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 180
Uploads: 1
Gamepad mode

If you want to make this work in gamepad mode as well replace line 142:
Code:
slotNum = tonumber(debug.traceback():match('keybind = "ACTION_BUTTON_(%d)'))
with:
Code:
slotNum = tonumber(debug.traceback():match('keybind = "ACTION_BUTTON_(%d)')) or tonumber(debug.traceback():match('keybind = "GAMEPAD_ACTION_BUTTON_(%d)'))
Last edited by PhnxZ : 01/04/23 at 03:35 PM.
Report comment to moderator  
Reply With Quote
Unread 03/02/21, 06:13 AM  
maximoz
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 30
Uploads: 3
Re: Great Addon

Originally Posted by Whoom
Great addon, this is just what I was looking for! Thanks for all the work!
Thanks for compliment!
Report comment to moderator  
Reply With Quote
Unread 03/01/21, 09:20 PM  
Whoom

Forum posts: 0
File comments: 3
Uploads: 0
Great Addon

Great addon, this is just what I was looking for! Thanks for all the work!
Report comment to moderator  
Reply With Quote
Unread 02/04/21, 06:16 AM  
maximoz
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 30
Uploads: 3
Originally Posted by Baertram
Nope, all good then. My oversight, I thought it was missing
Makes no difference if it is directly in the callback function or in a function called from yoru callback function.
Doesn't neither matter if it's missing (just will add a few ms of non-needed client checks and increase the loadtime after login/reloadui then -> shouldn't be noticable if your callback function is not running some heavy mathematically tasks, for each addon then ).

Originally Posted by maximoz
Originally Posted by Baertram
Welcome to the addon world, and thanks for your addons.

Just a hint:
Code:
-------------------------------------------------------------------------------------------------
--  On AddOn Loaded  --
-------------------------------------------------------------------------------------------------
function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
	if addonName == WerewolfTimerBar.Name then
		WerewolfTimerBar.Initialize()
	end
end

-------------------------------------------------------------------------------------------------
--  Register Events --
-------------------------------------------------------------------------------------------------
EVENT_MANAGER:RegisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED, WerewolfTimerBar.OnAddOnLoaded)
EVENT_ADD_ON_LOADED will call your callback function (WerewolfTimerBar.OnAddOnLoaded) for EACH addon and library installed and activated!
This is why you do the check against addonName = yourAddonName in the callback function.

As your addon was found unregister the event for your addon as it will not be needed any longer (in most addons at least).
Else the check if your addon is the currntly processed one will be repeated for each next addon, but is not needed at all as yours was already loaded.

Lua Code:
  1. function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
  2.     if addonName == WerewolfTimerBar.Name then
  3.                 EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)
  4.         WerewolfTimerBar.Initialize()
  5.     end
  6. end
Thanks for the advise!

I have the "EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)" inside the WerewolfTimerBar.Initialize() function .... do you mean i should put the unregister event in the OnAddonLoaded function instead of the Initialize function?
Ok got it. Thanks!
Report comment to moderator  
Reply With Quote
Unread 02/03/21, 10:28 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Nope, all good then. My oversight, I thought it was missing
Makes no difference if it is directly in the callback function or in a function called from yoru callback function.
Doesn't neither matter if it's missing (just will add a few ms of non-needed client checks and increase the loadtime after login/reloadui then -> shouldn't be noticable if your callback function is not running some heavy mathematically tasks, for each addon then ).

Originally Posted by maximoz
Originally Posted by Baertram
Welcome to the addon world, and thanks for your addons.

Just a hint:
Code:
-------------------------------------------------------------------------------------------------
--  On AddOn Loaded  --
-------------------------------------------------------------------------------------------------
function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
	if addonName == WerewolfTimerBar.Name then
		WerewolfTimerBar.Initialize()
	end
end

-------------------------------------------------------------------------------------------------
--  Register Events --
-------------------------------------------------------------------------------------------------
EVENT_MANAGER:RegisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED, WerewolfTimerBar.OnAddOnLoaded)
EVENT_ADD_ON_LOADED will call your callback function (WerewolfTimerBar.OnAddOnLoaded) for EACH addon and library installed and activated!
This is why you do the check against addonName = yourAddonName in the callback function.

As your addon was found unregister the event for your addon as it will not be needed any longer (in most addons at least).
Else the check if your addon is the currntly processed one will be repeated for each next addon, but is not needed at all as yours was already loaded.

Lua Code:
  1. function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
  2.     if addonName == WerewolfTimerBar.Name then
  3.                 EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)
  4.         WerewolfTimerBar.Initialize()
  5.     end
  6. end
Thanks for the advise!

I have the "EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)" inside the WerewolfTimerBar.Initialize() function .... do you mean i should put the unregister event in the OnAddonLoaded function instead of the Initialize function?
Last edited by Baertram : 02/03/21 at 10:30 AM.
Report comment to moderator  
Reply With Quote
Unread 02/03/21, 09:12 AM  
maximoz
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 30
Uploads: 3
Originally Posted by Baertram
Welcome to the addon world, and thanks for your addons.

Just a hint:
Code:
-------------------------------------------------------------------------------------------------
--  On AddOn Loaded  --
-------------------------------------------------------------------------------------------------
function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
	if addonName == WerewolfTimerBar.Name then
		WerewolfTimerBar.Initialize()
	end
end

-------------------------------------------------------------------------------------------------
--  Register Events --
-------------------------------------------------------------------------------------------------
EVENT_MANAGER:RegisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED, WerewolfTimerBar.OnAddOnLoaded)
EVENT_ADD_ON_LOADED will call your callback function (WerewolfTimerBar.OnAddOnLoaded) for EACH addon and library installed and activated!
This is why you do the check against addonName = yourAddonName in the callback function.

As your addon was found unregister the event for your addon as it will not be needed any longer (in most addons at least).
Else the check if your addon is the currntly processed one will be repeated for each next addon, but is not needed at all as yours was already loaded.

Lua Code:
  1. function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
  2.     if addonName == WerewolfTimerBar.Name then
  3.                 EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)
  4.         WerewolfTimerBar.Initialize()
  5.     end
  6. end
Thanks for the advise!

I have the "EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)" inside the WerewolfTimerBar.Initialize() function .... do you mean i should put the unregister event in the OnAddonLoaded function instead of the Initialize function?
Report comment to moderator  
Reply With Quote
Unread 02/03/21, 08:13 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Welcome to the addon world, and thanks for your addons.

Just a hint:
Code:
-------------------------------------------------------------------------------------------------
--  On AddOn Loaded  --
-------------------------------------------------------------------------------------------------
function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
	if addonName == WerewolfTimerBar.Name then
		WerewolfTimerBar.Initialize()
	end
end

-------------------------------------------------------------------------------------------------
--  Register Events --
-------------------------------------------------------------------------------------------------
EVENT_MANAGER:RegisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED, WerewolfTimerBar.OnAddOnLoaded)
EVENT_ADD_ON_LOADED will call your callback function (WerewolfTimerBar.OnAddOnLoaded) for EACH addon and library installed and activated!
This is why you do the check against addonName = yourAddonName in the callback function.

As your addon was found unregister the event for your addon as it will not be needed any longer (in most addons at least).
Else the check if your addon is the currntly processed one will be repeated for each next addon, but is not needed at all as yours was already loaded.

Lua Code:
  1. function WerewolfTimerBar.OnAddOnLoaded(eventCode, addonName)
  2.     if addonName == WerewolfTimerBar.Name then
  3.                 EVENT_MANAGER:UnregisterForEvent(WerewolfTimerBar.Name, EVENT_ADD_ON_LOADED)
  4.         WerewolfTimerBar.Initialize()
  5.     end
  6. end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: