Quantcast
Download
(6 Kb)
Download
Updated: 03/17/21 04:32 AM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Updated:03/17/21 04:32 AM
Created:01/29/21 02:24 AM
Monthly downloads:303
Total downloads:880
Favorites:5
MD5:
6.3.5
Werewolf Timer Bar
Version: 2.3
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.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 (3)
File Name
Version
Size
Uploader
Date
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 03/02/21, 06:13 AM  
maximoz
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 26
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: 2
File comments: 26
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
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3438
File comments: 4156
Uploads: 66
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: 2
File comments: 26
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
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3438
File comments: 4156
Uploads: 66
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: