Download
(55 Kb)
Download
Updated: 08/16/18 02:30 PM
Pictures
File Info
Compatibility:
Wolfhunter (4.1)
Updated:08/16/18 02:30 PM
Created:03/31/14 07:22 PM
Monthly downloads:115
Total downloads:102,344
Favorites:228
MD5:
Categories:Bags, Bank, Inventory, Info, Plug-in Bars
Weapon Charge Alert  Popular! (More than 5000 hits)
Version: 1.1.24
by: katkat42, Harven, ingeniousclown
I'm always one to forget to check on the charge level of my weapon(s) while I play, so I made this add-on to do that for me.

When your weapons reach a customizable charge percentage, a little alert will show up with a color indicating just how badly you need to charge it!

While the window is showing, you can click on your weapon to instantly open the charge window for that weapon.

Commands:
/wca or /weaponchargealert
"lock" - lock the window (and hide it if necessary)
"unlock" - unlock the window and unhide it so you can move it around

example:
"/wca unlock"

Now soliciting German and French translations of the Settings page!


If you like ingeniousclown's add-ons, why not consider donating? Remember that this is IN NO WAY REQUIRED to enjoy these add-ons! Just think of it as an extra way to say "Hey man, I like what you've done. Can I buy you a beer?"



If you want to send appreciation to the current maintainer, perhaps you'd consider sending in-game gold to @katkat42 on NA? Again, it's NOT REQUIRED by ANY stretch of the imagination; it's just a way to say "Hey, I like your work. Can I buy you a Mountain Lager?"
v1.1.24
-Updated to API 100024 (Update 4.1),
-Updated LibAddonMenu to 2.0-r26.

v1.1.20
-Updated to API 100020 (Update 3.1),
-Updated LibAddonMenu to 2.0-r24.
-Updated LibStub to 1.0r4

v1.1.19
-Updated to API 100019 (Update 3.0),
-Updated LibAddonMenu to 2.0-r23.

v1.1.18
-Updated to API 100018 (Update 13),

v1.1.17
-Updated to API 100017 (Update 12),
-Updated LibAddonMenu to 2.0-r22.

v1.1.16
-Updated to API 100016 (Update 11),
-Updated LibAddonMenu to 2.0-r21.

v1.1.15
-Updated to API 100015 (Update 10)

v1.1.14
-Updated to API 100014 (Update 9)

v1.1.13
-Updated to API 100013 (Update 8)

v1.1.12
-Updated to API 100012 (Update 7)
-Update to LibAddonMenu-2.0r18

v1.1.11
- Fixed a bug causing the alert backdrop image to be visible when it shouldn't be.
- The alert will not pop up when switching weapons in some scenes.

v1.1.10
- The alert control is now attached to the hud and hudui scenes so it will be not visible during conversations (and in others scenes - like inventory, etc)

v1.1.9
-Fixed an error in the localization code

v1.1.8
-Updated to API 100011 (Update 6)
-Added a keybind to bring up weapon charge window
-Added an adjustment to re-orient the indicators horizontally or vertically

v1.1.7
-Updated to API 100010 (Update 5)

v1.1.6
-Updated to API 100009 (Update 4)
-Fixed a problem with the window having dimensions of 0, 0 when unlocked but no alerts were needed. The window now shows properly when unlocked.

v1.1.5a
- fixed error introduced when merging files

v1.1.5
-Made the window background shrink and expand with the number of icons shown

v1.1.4
-Updated to API 100008 (Update 3)

v1.1.3
-Update to LibAddonMenu-2.0r8
-Updated to API 100007 and added requisite README


v1.1.2
-Updated to LibAddonMenu-2.0


v1.1.1
-Just updating the API version number so it will no longer be "out of date"


v1.1.0
-Updated the manifest (why do I always forget this?!)
-Removed most of the slash commands to make way for a shiny new SETTINGS MENU! This has a handful of new features and functionality including customizable alert thresholds and colors.


v1.0.0
-Added multiple new slash commands. (use "/wca" or /weaponchargealert" for the menu)
-Fixed the alternate weapon set
-Added scaling options
-Added opacity options
-Added default setting revert command


v0.2.3
-Fixed a rare issue where looting an item would stop the window from updating
-Removed the hide animation since it wasn't working correctly, anyway
-Fixed a bug with the file path of the outline texture. Now it should show up even if you don't have Inventory Grid View!


v0.2.2
-Fixed an issue where users would sometimes get an error on login and reload.


v0.21
-Fixed issue where the little alert window will start as showing when you start the game or reload the UI, even if nothing is in it.


v0.2
-Initial release
Archived Files (26)
File Name
Version
Size
Uploader
Date
1.1.20
55kB
Harven
08/14/17 07:32 PM
1.1.19
53kB
Harven
05/23/17 02:32 PM
1.1.18
50kB
Harven
02/12/17 10:45 AM
1.1.17
50kB
Harven
10/05/16 04:01 PM
1.1.16
48kB
Harven
08/01/16 04:09 PM
1.1.15
50kB
Harven
06/04/16 01:49 PM
1.1.14
47kB
Harven
03/07/16 06:20 PM
1.1.13
47kB
Harven
11/02/15 10:18 AM
1.1.12
47kB
Harven
09/01/15 05:12 PM
1.1.11
41kB
Harven
06/29/15 03:39 PM
1.1.10
41kB
Harven
06/07/15 01:12 PM
1.1.9
40kB
katkat42
03/05/15 06:00 PM
1.1.8
40kB
katkat42
03/03/15 08:37 PM
1.1.7
35kB
katkat42
11/03/14 10:18 AM
1.1.6
34kB
katkat42
09/15/14 01:34 PM
1.1.5a
34kB
katkat42
08/19/14 07:50 PM
1.1.5
34kB
katkat42
08/19/14 03:04 PM
1.1.4
33kB
katkat42
08/04/14 12:50 PM
1.1.3
35kB
ingeniousclown
06/26/14 09:42 PM
1.1.1
17kB
ingeniousclown
06/01/14 02:24 PM
1.1.0
17kB
ingeniousclown
05/19/14 11:32 PM
1.0.0
9kB
ingeniousclown
04/24/14 06:54 PM
0.2.3
8kB
ingeniousclown
04/10/14 09:08 PM
0.2.2
8kB
ingeniousclown
04/09/14 11:15 PM
0.2.2
9kB
ingeniousclown
03/31/14 09:35 PM
0.21
9kB
ingeniousclown
03/31/14 07:22 PM


Post A Reply Comment Options
Unread 04/22/14, 06:45 PM  
ingeniousclown
AddOn Author - Click to view AddOns

Forum posts: 122
File comments: 257
Uploads: 8
Re: any updates?

Originally Posted by QuadroTony
like opacity settings, or background colour?
I may add opacity settings when I fix the backup weapon bug. I'll get around to it soon I promise!

Colors though, not in the plan. Aiming to keep this one super simple and concise.
Report comment to moderator  
Reply With Quote
Unread 04/22/14, 12:12 PM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
any updates?

like opacity settings, or background colour?
Report comment to moderator  
Reply With Quote
Unread 04/19/14, 05:46 PM  
elfindreams

Forum posts: 0
File comments: 20
Uploads: 0
Wall of Text incoming :)

Awesome Addon BTW
However it currently doesn't take into account the two item sets.

When switching to the second item set, EQUIP_SLOT_MAIN_HAND does not change at all. While using the second mainhand, it is still looking for charges on the first.

To get around this I changed my copy of the plugin in the following ways:

in OnLoad() change the SetWeaponSlot() lines to:
Code:
local _, _, _, _, isMainEquipped, _ = GetEquippedItemInfo(EQUIP_SLOT_MAIN_HAND)
if (isMainEquipped) then
	SetWeaponSlot(MAIN_WEAPON, EQUIP_SLOT_MAIN_HAND)
	SetWeaponSlot(OFF_WEAPON, EQUIP_SLOT_OFF_HAND)
else
	SetWeaponSlot(MAIN_WEAPON, EQUIP_SLOT_BACKUP_MAIN)
	SetWeaponSlot(OFF_WEAPON, EQUIP_SLOT_BACKUP_OFF)
end
Change WeaponChanged() to:
Code:
local function WeaponChanged(eventCode, bagId, slotId, isNewItem, itemSoundCategory, updateReason)
	if(bagId ~= BAG_WORN) then return end
	local _, _, _, _, isMainEquipped, _ = GetEquippedItemInfo(EQUIP_SLOT_MAIN_HAND)

	if (isMainEquipped) then
		if(slotId == EQUIP_SLOT_MAIN_HAND) then
			SetWeaponSlot(MAIN_WEAPON, slotId)
		elseif(slotId == EQUIP_SLOT_OFF_HAND) then
			SetWeaponSlot(OFF_WEAPON, slotId)
		end
	else
		if(slotId == EQUIP_SLOT_BACKUP_MAIN) then
			SetWeaponSlot(MAIN_WEAPON, slotId)
		elseif(slotId == EQUIP_SLOT_BACKUP_OFF) then
			SetWeaponSlot(OFF_WEAPON, slotId)
		end
	end
end
Add a new event handler:
Code:
local function SlotsChanged()
	local _, _, _, _, isMainEquipped, _ = GetEquippedItemInfo(EQUIP_SLOT_MAIN_HAND)
	if (isMainEquipped) then
		SetWeaponSlot(MAIN_WEAPON, EQUIP_SLOT_MAIN_HAND)
		SetWeaponSlot(OFF_WEAPON, EQUIP_SLOT_OFF_HAND)
	else
		SetWeaponSlot(MAIN_WEAPON, EQUIP_SLOT_BACKUP_MAIN)
		SetWeaponSlot(OFF_WEAPON, EQUIP_SLOT_BACKUP_OFF)
	end	

	UpdateAllAlerts()
end
and finally with the rest of the event registrations, add:
Code:
EVENT_MANAGER:RegisterForEvent("WeaponChargeAlert_AbilityListChanged", EVENT_ABILITY_LIST_CHANGED, SlotsChanged)
Alternatively you can change it so it pays attention to EQUIP_SLOT_BACKUP_MAIN and EQUIP_SLOT_BACKUP_OFF as well as EQUIP_SLOT_MAIN_HAND and EQUIP_SLOT_OFF_HAND.

Hope my fumbling around helps some and again great addon.
Report comment to moderator  
Reply With Quote
Unread 04/18/14, 08:35 PM  
Cavanoskus
Premium Member
 
Cavanoskus's Avatar
Premium Member

Forum posts: 13
File comments: 49
Uploads: 0
Very handy. I'd be flailing around with an uncharged weapon without this.
Report comment to moderator  
Reply With Quote
Unread 04/12/14, 12:14 AM  
ingeniousclown
AddOn Author - Click to view AddOns

Forum posts: 122
File comments: 257
Uploads: 8
Re: Re: Re: Great Addon ...

Originally Posted by Ughduty
Originally Posted by ingeniousclown
...
-Without the EVENT_PLAYER_COMBAT_STATE event firing, I'm pretty sure you won't be notified when your charge gets low.
...
Because of what you said I dipped a bit deeper into your code and realized that your addon's events fire far to often, even when they shouldn't for example when someone beside me is attacking something.
I'm almost 100% sure that this is not the case. Can you tell me why you think the events fire far too often?
Report comment to moderator  
Reply With Quote
Unread 04/11/14, 05:17 AM  
Ughduty

Forum posts: 1
File comments: 5
Uploads: 0
Re: Re: Great Addon ...

Originally Posted by ingeniousclown
...
-Without the EVENT_PLAYER_COMBAT_STATE event firing, I'm pretty sure you won't be notified when your charge gets low.
...
Because of what you said I dipped a bit deeper into your code and realized that your addon's events fire far to often, even when they shouldn't for example when someone beside me is attacking something.
Report comment to moderator  
Reply With Quote
Unread 04/10/14, 02:07 PM  
ingeniousclown
AddOn Author - Click to view AddOns

Forum posts: 122
File comments: 257
Uploads: 8
Re: Great Addon ...

Originally Posted by Ughduty
... and more or less exactly what I needed. So thank you for this addon!

I did do some changes to the code though. I build in functionality to hide the addon when one enters a character screen or the main menu and I uncluttered it by removing the background and making it 25% smaller (48 instead of 64 pixels). Besides that I fixed a bug with the path to the outline image that kept it from displaying. Further I created a new outline image that creates a smaller outline and I deactivated the event EVENT_PLAYER_COMBAT_STATE. If you want to incorporate these changes feel free to do so. It would be cool to have these changes implemented as options. I uploaded my version of the mod to dropbox.

Have Fun
-I feel like without the background, it is too easy to miss. Also, impossible to move when you unlock it.
-Thanks for pointing out the bug with the outline. I'm surprised it hasn't been brought to my attention sooner.
-Without the EVENT_PLAYER_COMBAT_STATE event firing, I'm pretty sure you won't be notified when your charge gets low. That event is mostly there to update the charge amount after combat. Was the show/hide animation what you wanted removed? I may add that as an option in the future.
-I'm not against making the whole thing smaller, I may add that as an option.
-Glancing through the code you helped me realize another bug with the WeaponChanged function that could rarely happen. Thanks!

Thanks for the feedback!
Report comment to moderator  
Reply With Quote
Unread 04/10/14, 05:42 AM  
Ughduty

Forum posts: 1
File comments: 5
Uploads: 0
Great Addon ...

... and more or less exactly what I needed. So thank you for this addon!

I did do some changes to the code though. I build in functionality to hide the addon when one enters a character screen or the main menu and I uncluttered it by removing the background and making it 25% smaller (48 instead of 64 pixels). Besides that I fixed a bug with the path to the outline image that kept it from displaying. Further I created a new outline image that creates a smaller outline and I deactivated the event EVENT_PLAYER_COMBAT_STATE. If you want to incorporate these changes feel free to do so. It would be cool to have these changes implemented as options. I uploaded my version of the mod to dropbox.

Have Fun
Last edited by Ughduty : 04/10/14 at 05:47 AM.
Report comment to moderator  
Reply With Quote
Unread 04/10/14, 02:41 AM  
Maelynn

Forum posts: 18
File comments: 39
Uploads: 0
Re: Very powerful addon

Originally Posted by Leinadus
Hey this looks promising, you should add in this same add-on or make another one that does the same with armors.
Yes, this! Thumbs up from me too, and chiming in with the armour request. ^^
Report comment to moderator  
Reply With Quote
Unread 04/05/14, 08:06 AM  
ingeniousclown
AddOn Author - Click to view AddOns

Forum posts: 122
File comments: 257
Uploads: 8
Originally Posted by choekstr
Just started getting a nil value stack traceback on line 142 in function SetWeaponSlot and 194 in function WeaponChanged.
When did this happen? While playing, while changing weapon, or while first logging into to the character or on /reloadui?

Am I correct in guessing that it's when logging in or on /reloadui?
Last edited by ingeniousclown : 04/05/14 at 08:10 AM.
Report comment to moderator  
Reply With Quote
Unread 04/05/14, 07:51 AM  
choekstr
 
choekstr's Avatar

Forum posts: 14
File comments: 391
Uploads: 0
Just started getting a nil value stack traceback on line 142 in function SetWeaponSlot and 194 in function WeaponChanged.
Report comment to moderator  
Reply With Quote
Unread 04/01/14, 11:32 PM  
Leinadus

Forum posts: 0
File comments: 18
Uploads: 0
Thumbs up Very powerful addon

Hey this looks promising, you should add in this same add-on or make another one that does the same with armors.

P.s. Cheers
Report comment to moderator  
Reply With Quote
Unread 03/31/14, 08:57 PM  
Balver
 
Balver's Avatar
AddOn Author - Click to view AddOns

Forum posts: 39
File comments: 70
Uploads: 2
Thanks

Thank you for this Addon, this is just what i needed.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.