Download
(172Kb)
Download
Updated: 08-21-18 07:12 AM
Pictures
File Info
Compatibility:
Battle for Azeroth (8.0.1)
Updated:08-21-18 07:12 AM
Created:08-20-11 02:14 PM
Downloads:8,636
Favorites:47
MD5:

ShieldBars  Popular! (More than 5000 hits)

Version: 1.2.8
by: Voyager [More]

ShieldBars 1.2.8

ShieldBars is an addon that displays your currently active shields.
Most of the commonly used shields are supported. It will only display something while there's an active shield on the player.
Use the options menu to show an example shield to help with customisation.

Features

  • Supports all classes
  • Change colors, fonts and bar textures
  • Change size of bars and icon
  • Bar text flashing when shield is about to expire or on low percentage
  • Bar sorting by shield priority, time left or index

1.2.8
- Fixed issue with shields sometimes not being refreshed
1.2.7
- Updated for 8.0
- Added detection of unknown shields
1.2.4
- Added new mage shields
1.2.2
- Fixes issue after profile change
1.2.0
- Updated for 7.0
1.1.4
- Updated for 6.2+
1.1.2
- Updated for 6.0.2
1.1.1
- Updated for 5.4.0
1.1.0
- Updated for 5.3.0
- Added some new shields from TTK
1.0.8-50200
- Updated for 5.2.0
1.0.8
- Updated for 5.1.0
1.0.7
- Added Brewmaster Monk's Guard shield
1.0.6
- Updated for 5.0.4
- Added many new shields
- Fix for Blood Shield
1.0.5
- Updated for 4.3
1.0.4
- Fixed shield names overlapping
- Improved shield value detection
1.0.2
- Fixed Stoneclaw Shield, Blood Shield
- Added Savage Defence, Anti-Magic Shell
1.0.1
- Fixed bar height/width setting options
Post A Reply Comment Options
Unread 11-24-22, 02:55 AM  
ryumo
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Compatibility with 10.0.2...when I get a minute. And a clue!

Is anyone having any luck converting the tooltip parser after the black magic changes to how tooltips are handles in 10.0.2? For lack of time I've just ripped out the mechanism temporarily so right now it looks like this (lines 1232-1244):

Code:
function ShieldBars:IsShieldSpell(spellID, spellSchool)
	if notShieldSpells[spellID] then
		return
	elseif shieldSpells[spellID] then
		return true
	elseif newShieldSpells[spellID] then
		return true
	else
		-- And this is where the tooltip parser used to go
		-- MB 11/19/2022
		notShieldSpells[spellID] = true
	end
end
It works, it's just not gonna learn any new shields on its own until I work out why the new method for pulling a buff's tooltip text is returning (nil)....
Last edited by ryumo : 11-24-22 at 02:57 AM.
Report comment to moderator  
Reply With Quote
Unread 10-26-22, 09:22 AM  
ryumo
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Dragonflight Pre-Patch Compatability

To keep our precious baby boy alive for Dragonflight, so far these steps are effective:


1. Download the updated Ace-3 library and replace ShieldBar's older internal parts (found in ShieldBars/Libs) with the new equivalents. Note not all pieces will have a new version, but that's fine.

2. In ShieldBars.lua, make the following corrections -

In line 1639 change
frame.timer = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Timer", "OVERLAY", GameFontNormal)
to
frame.timer = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Timer", "OVERLAY")

In line 1647 change
frame.text = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Text", "OVERLAY", GameFontNormal)
to
frame.text = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Text", "OVERLAY")

In line 1655 change
frame.shield = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Shield", "OVERLAY", GameFontNormal)
to
frame.shield = frame.bar:CreateFontString("ShieldBarsStatusBar"..barID.."Shield", "OVERLAY")



The behavior of Frame:CreateFontString changed in 10.0, using the third argument to point to a virtual frame for inheritance purposes; it can be left blank if the child frame doesn't need to inherit any poperties (like here, where we're using the default font anyway).

Ace-3 needs to be swapped out because the old callback handler doesn't fire correctly anymore in whatever new model they have.
Report comment to moderator  
Reply With Quote
Unread 07-02-21, 10:25 PM  
nullafy
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Re: 9.1

Thanks zkpjy! Keeping one of my fav addons alive

Originally Posted by zkpjy
ShieldBars.lua 260
local spellSchoolColors = {
[SCHOOL_MASK_PHYSICAL] = { 0.9, 0.85, 0.5 },
[SCHOOL_MASK_HOLY] = { 0.9, 0.8, 0.4 },
[SCHOOL_MASK_FIRE] = { 1.0, 0.5, 0.0 },
[SCHOOL_MASK_NATURE] = { 0.0, 0.8, 0.4 },
[SCHOOL_MASK_FROST] = { 0.5, 0.5, 1.0 },
[SCHOOL_MASK_SHADOW] = { 0.5, 0.0, 0.7 },
[SCHOOL_MASK_ARCANE] = { 0.7, 0.2, 0.9 },
}
to
local spellSchoolColors = {
[Enum.Damageclass.MaskPhysical] = { 0.9, 0.85, 0.5 },
[Enum.Damageclass.MaskHoly] = { 0.9, 0.8, 0.4 },
[Enum.Damageclass.MaskFire] = { 1.0, 0.5, 0.0 },
[Enum.Damageclass.MaskNature] = { 0.0, 0.8, 0.4 },
[Enum.Damageclass.MaskFrost] = { 0.5, 0.5, 1.0 },
[Enum.Damageclass.MaskShadow] = { 0.5, 0.0, 0.7 },
[Enum.Damageclass.MaskArcane] = { 0.7, 0.2, 0.9 },
}
Report comment to moderator  
Reply With Quote
Unread 07-01-21, 02:34 AM  
zkpjy
A Kobold Labourer
 
zkpjy's Avatar

Forum posts: 0
File comments: 18
Uploads: 0
Thumbs up 9.1

ShieldBars.lua 260
local spellSchoolColors = {
[SCHOOL_MASK_PHYSICAL] = { 0.9, 0.85, 0.5 },
[SCHOOL_MASK_HOLY] = { 0.9, 0.8, 0.4 },
[SCHOOL_MASK_FIRE] = { 1.0, 0.5, 0.0 },
[SCHOOL_MASK_NATURE] = { 0.0, 0.8, 0.4 },
[SCHOOL_MASK_FROST] = { 0.5, 0.5, 1.0 },
[SCHOOL_MASK_SHADOW] = { 0.5, 0.0, 0.7 },
[SCHOOL_MASK_ARCANE] = { 0.7, 0.2, 0.9 },
}
to
local spellSchoolColors = {
[Enum.Damageclass.MaskPhysical] = { 0.9, 0.85, 0.5 },
[Enum.Damageclass.MaskHoly] = { 0.9, 0.8, 0.4 },
[Enum.Damageclass.MaskFire] = { 1.0, 0.5, 0.0 },
[Enum.Damageclass.MaskNature] = { 0.0, 0.8, 0.4 },
[Enum.Damageclass.MaskFrost] = { 0.5, 0.5, 1.0 },
[Enum.Damageclass.MaskShadow] = { 0.5, 0.0, 0.7 },
[Enum.Damageclass.MaskArcane] = { 0.7, 0.2, 0.9 },
}
Report comment to moderator  
Reply With Quote
Unread 10-17-20, 04:10 PM  
ryumo
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Patch 9.x Compatability

In case you're still using this (and why wouldn't you?) to track your absorbs, with a little duct tape you can make it compatible with the Shadowlands pre-patch.

At line 1505 of shieldbars.lua is the function SetBar(), which is the thing that breaks under patch 9.01 due to changes in inheritance rules. In order to un-break it, add the following code immediately after line 1505:
Code:
if (BackdropTemplateMixin) then
        Mixin(bar, BackdropTemplateMixin)
    end
Don't replace any existing code, just add those lines. This should make the beginning of the function now look something like this:

Code:
local function SetBar(id, bar) -- After Blizzard broke background inheritance if (BackdropTemplateMixin) then Mixin(bar, BackdropTemplateMixin) end -- Set the positioning and layout of the bar bar:SetHeight(db.height) bar:SetWidth(db.width) bar:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", tile = true, tileSize = 16 }) bar:SetBackdropColor(0.2, 0.2, 0.2, 1) bar:Hide()

Viola! The best shield and absorb tracker is back in business!
Report comment to moderator  
Reply With Quote
Unread 09-12-18, 11:21 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
I've tracked problem to the ShieldBars:IsShieldSpell function (and possibly ShieldBars:FindBuff) and have put in a temporary solution for myself.

When unknown shield spells go through "IsShieldSpell", they seem to fail the first time through causing them to be added to the notShieldSpells table. One test I did for example, I changed the scope of notShieldSpells so I could access it in game and put a print statement above it so I can see what spells are added to that table. I ran an instance and used Spell Steal to grab "Bone Shield" ( https://www.wowhead.com/spell=266201/bone-shield ). It was added to the "notShieldSpells" table. I removed the spell from the table ("/script notShieldSpells[266201]=nil"). I used Spell Steal again on the next mob to steal the same spell and it was successfully detected and shown as a bar.

As another test, I commented out the default list and created it as an empty table so every shield spell would be considered unknown. ("local shieldSpells = {}")

The first time I got Power Word Shield ( https://www.wowhead.com/spell=17/power-word-shield ) it was added to the notShieldSpells table. I reloaded my console (hadn't changed the scope of notShieldSpells to remove the spell from the table manually) and the next time I got the shield, it was detected and shown properly.

The issue seems to a caching thing. It might be related to the new SpellMixin bit ( https://us.battle.net/forums/en/wow/topic/20762318007 ) but I'm not sure.

What I ended up doing is creating a new table similar to "newShieldSpells". As new shields are detected, they're added to my new table at the same time they're added to "newShieldSpells" but the new table is saved (SavedVariables). I added the new table to the various "is known shield" check functions. This saves having to update the list manually and allows the new shields to be known the next time I log in.
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-24-18, 08:07 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
The other shield spells not defined are affected as well so this is not limited to just Resounding Protection.

This image is me with 5 shields:
https://ibb.co/n70gF9
- Resounding Protection - no shield bar
- Bone Shield ( * 3 ) - no shield bars
- The mob I had targetted gave me the 4th Bone Shield buff (Spell Steal) which also didn't appear as a shield bar but I didn't get an image of that
- Ice Barrier - shield bar (also added in the shield list of the addon)

But sometimes it does appear:
https://ibb.co/cJ458U (Ignore the Lua error. I was working on another mod at the time.)

In one session, the shield bar for Resounding Protection appeared 30 minutes after playing. Another session, it was 30 seconds after logging on (the first refresh).

Anyways, I'll spend some time this weekend playing with the code to try and figure this out if I can.

Am I the only one experiencing this issue? Perhaps it's caused by a conflict with another addon which I'll check as well.
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-22-18, 09:15 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Just a small update (in case it helps you).

When I was playing last night for an hour or two, the shield bar for Resounding Protection did not appear at all.

This morning when I started playing, it still did not show up...

Then I did something dumb in the game, pulled a ton of mobs, died a few times trying to get back to a safe spot. After the deaths, the bar for Resounding Protection appeared.

I logged out shortly after that (had to go to work) but something to do with dying a few times made the bar appear. I'll play around with it more tonight if I get a chance.
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-21-18, 07:05 PM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Well.. I grabbed 1.2.8 and it still isn't working.

https://ibb.co/i1Nufz

The above image shows in the chat box the version for verification.

I'm shielded with Ice Barrier and Resounding Protection. Showing the tool tip for Resounding Protection in the corner.

You'll see in the middle of the image the bar for Ice Barrier but nothing for Resounding Protection.

This is what I had with 1.2.7 until I added it manually.
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-21-18, 07:16 AM  
Voyager
A Fallenroot Satyr
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 31
Uploads: 9
Originally Posted by tiker
Another spell to add:
Resounding Protection
https://www.wowhead.com/spell=263962

This is another Azurite Power shield. It refreshes every 30 seconds.

I added it myself manually for now but it seems ShieldBars misses some of the refreshes. I'd say about a third of the time, I have the buff but ShieldBars won't show it. Might be the way I added it though.
No need to add them, they should all get detected automatically now, Resounding Protection (269279) definitely does get detected.

The refresh glitch is fixed.
Report comment to moderator  
Reply With Quote
Unread 08-20-18, 09:18 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Another shield I forgot to add earlier.

Doing the Tol Dagor instance, mages can steal this shield from a mob:
https://www.wowhead.com/spell=258153

In my case, by the time I noticed the buff on me and got a screen capture, there was 3 seconds remaining on the buff and the tooltip showed "Absorbs 53764 damage.".
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Last edited by tiker : 08-20-18 at 09:18 AM.
Report comment to moderator  
Reply With Quote
Unread 08-20-18, 09:10 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Another spell to add:
Resounding Protection
https://www.wowhead.com/spell=263962

This is another Azurite Power shield. It refreshes every 30 seconds.

I added it myself manually for now but it seems ShieldBars misses some of the refreshes. I'd say about a third of the time, I have the buff but ShieldBars won't show it. Might be the way I added it though.
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-15-18, 07:55 PM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Another missing shield:
https://www.wowhead.com/spell=268595

It's one of the abilities from https://www.wowhead.com/item=161444
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 08-15-18, 06:41 AM  
tiker
A Deviate Faerie Dragon
 
tiker's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 129
Uploads: 1
Mayor Striggs / Civil Servant is missing.
https://www.wowhead.com/item=155569
__________________
XMPP: [email protected]
ActivityPub (Mastodon / Pleroma): @[email protected]
Report comment to moderator  
Reply With Quote
Unread 07-26-18, 04:04 AM  
nullafy
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Thanks!

Thank you for the update! Appears to be working well so far. Hurrah!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: