|Go to Page...|
Purpose : Scans your equipment by reading item tooltips for cumulative bonuses like additional spell damage and sums them up. It can run as a standalone tooltip scanning mod, but the original intention behind its creation was to be a library for other mods, requesting item bonus data.
LDB Plugin : As of version 4.6, BonusScanner provides a Load-On-Demand LDB feed, called Broker_BonusScanner. The plugin is enabled by default but can be disabled via a simple slash command (/bscan broker). The LDB plugin can be configured by simply right-clicking on it. An interface options menu should open, allowing you to manipulate aspects of the button/block ('watched' bonuses, combat ratings, labels) and the tooltip (select bonuses shown at any time via the bonus category tabs, configure average item level, gem summary etc). In addition, the plugin will register and automatically enable a minimap icon the first time its loaded, for users lacking a proper LDB display addon (as a side effect, button functionality is obsoleted). The minimap icon can be optionally turned off. Support for other types of plugins (eg Titan, FuBar exclusive) is being discontinued.
Basic Usage (as a function library):
BonusScanner.active = 1, when BonusScanner is active
BonusScanner.bonuses always contains a table of bonuses for the current equipment (player). In addition, BonusScanner.GemsRed, BonusScanner.GemsYellow, BonusScanner.GemsBlue, BonusScanner.GemsPrismatic contain the total number of gems per color for the player. BonusScanner.AverageiLvl will hold the average item level value of the player's gear.
Example: BonusScanner.bonuses['HEAL'] contains the current healing bonus.
The addon also provides the following API:
- returns total of a certain bonus type or 0 if that bonus type is not present.
- example: BonusScanner:GetBonus('CRIT') returns crit chance bonus of your current equipment.
- returns table of bonuses on a certain item slot or an empty table if nothing present.
- example: BonusScanner:GetSlotBonuses('Trinket0') returns bonuses on your first trinket slot. Valid slot names are : 'Head', 'Neck', 'Shoulder', 'Shirt', 'Chest', 'Waist', 'Legs', 'Feet', 'Wrist', 'Hands', 'Finger0', 'Finger1', 'Trinket0', 'Trinket1', 'Back', 'MainHand', 'SecondaryHand', 'Ranged', 'Tabard'. They are pretty much self-explanatory.
- returns slot distribution of a certain bonus type.
- returns the bonus amount of a certain bonus type on a certain item slot.
- example: BonusScanner:GetSlotBonus('DMG', 'Head') returns the spell damage bonus on your helmet.
BonusScanner:GetRatingBonus(bonustype, value, level, class)
- returns the percentage or raw number of skillpoints of a bonus rating value.
bonustype: represents the bonus type.
Valid types are : "EXPERTISE", "DEFENSE", "DODGE", "PARRY", "BLOCK", "TOHIT", "CRIT", "RANGEDHIT", "RANGEDCRIT", "HASTE", "SPELLTOHIT", "SPELLCRIT", "HOLYCRIT", "SPELLH" (aka Spell Haste), "RESILIENCE", "ARMORPEN".
value: decimal number of the rating value.
level: The level of the character.
class: The character class e.g "DRUID" or "DEATHKNIGHT" (uppercase is preferred). If the variable is not specified, the character class of the current player is used.
- example: GetRatingBonus('CRIT',200,70, "SHAMAN") will return the percentage number corresponding to 200 critical strike rating for a level 70 Shaman character.
- returns 4 integer values representing the number of Red, Yellow, Blue and Prismatic gems (in this order) that exist on the specific itemlink (link is the itemlink in this case).
- returns true, enchantID if an enchant exists on the specific itemlink or false if an enchant is absent.
- returns 4 integer values : emptyMetaSockets, emptyRedSockets, emptyYellowSockets, emptyBlueSockets. The description of the values returned should be self explanatory.
Available bonus types are:
STR = 'Strength',
AGI = 'Agility',
STA = 'Stamina',
INT = 'Intellect',
SPI = 'Spirit',
ARMOR = 'Armor' (total),
ARCANERES = 'Arcane Resistance',
FIRERES = 'Fire Resistance',
NATURERES = 'Nature Resistance',
FROSTRES = 'Frost Resistance',
SHADOWRES = 'Shadow Resistance',
FISHING = 'Fishing',
MINING = 'Mining',
HERBALISM = 'Herbalism',
SKINNING = 'Skinning',
DEFENSE = 'Defense Rating',
EXPERTISE = 'Expertise Rating',
BLOCK = 'Block Rating',
BLOCKVALUE = 'Block Value',
DODGE = 'Dodge Rating',
PARRY = 'Parry Rating',
RESILIENCE = 'Resilience Rating',
DMGWPN = 'Increased Melee Damage',
RANGEDDMG = 'Ranged Weapon Damage',
ARMORPEN = 'Armor Penetration',
DPSMAIN = 'Main Weapon(s) DPS',
DPSRANGED = 'Ranged Weapon DPS',
DPSTHROWN = 'Thrown Weapon DPS',
ATTACKPOWER = 'Attack Power',
ATTACKPOWERUNDEAD = 'Attack Power against Undead',
ATTACKPOWERFERAL = 'Attack Power in feral form',
RANGEDATTACKPOWER = 'Ranged Attack Power',
CRIT = 'Critical Strike Rating',
RANGEDCRIT = 'Ranged Critical Strike',
TOHIT = 'Hit Rating',
RANGEDHIT = 'Ranged Hit Rating',
HASTE = 'Haste Rating',
DMGUNDEAD = 'Spell Damage against Undead',
ARCANEDMG = 'Arcane Damage',
FIREDMG = 'Fire Damage',
FROSTDMG = 'Frost Damage',
HOLYDMG = 'Holy Damage',
NATUREDMG = 'Nature Damage',
SHADOWDMG = 'Shadow Damage',
SPELLPEN = 'Spell Penetration',
SPELLPOW = 'Spell Power',
HEALTHREG = 'Life Regeneration',
MANAREG = 'Mana Regeneration',
HEALTH = 'Life Points',
MANA = 'Mana Points'
THREATREDUCTION = '% Reduced Threat',
THREATINCREASE = '% Increased Threat',
INCRCRITDMG = '% Increased Critical Damage',
SPELLREFLECT = '% Spell Reflect',
STUNRESIST = '% Stun Resistance',
PERCINT = '% Intellect',
PERCBLOCKVALUE = '% Shield Block Value',
-- WOTLK Metagems
PERCARMOR = '% Increased Armor Value',
PERCMANA ='% Mana',
PERCREDSPELLDMG = '% Reduced Spell Damage Taken',
PERCSNARE = '% Reduced Snare/Root Duration',
PERCSILENCE = '% Reduced Silence Duration',
PERCFEAR = '% Reduced Fear Duration',
PERCSTUN = '% Reduced Stun Duration',
PERCCRITHEALING = '% Increased Critical Healing',
More bonus types available for detection can and will be added as I see fit.
Slash Commands : BonusScanner provides a few slash commands, for configuration purposes. Usage is /bonusscanner or /bscan. The options are:
/bscan show - Shows all bonuses of your current equipment.
/bscan details - Shows bonuses with slot distribution.
/bscan tooltip - Attaches bonus summary on item/itemlink tooltips.
/bscan tooltip gems - Attaches gem color count on tooltips (requires tooltips enabled - holding Ctrl down while hovering over an itemlink will achieve the same result).
/bscan itembasic - Attaches item level and item ID properties on tooltips.
/bscan itemextend - Attaches enchant and gem ID properties on tooltips.
/bscan broker - Enables/Disables the LDB feed. If the plugin is already loaded, changes will take effect after reloading the UI.
/bscan clearcache - Clears the item cache and forces a garbage collection (mostly used for debugging purposes).
/bscan target - Shows bonuses for your target's equipped gear (must be in inspect range and non-NPC. As of WoW 2.4 this will work on opposite faction players, if located inside a neutral town).
/bscan target 'player' - Whispers bonuses for your target's equipped gear (must be in inspect range) to the player specified.
/bscan 'itemlink' - Shows bonuses of linked item (insert link with Shift-Click).
/bscan 'itemlink' 'player' - Whispers bonuses of linked item to the player specified.
/bscan 'slotname' - Shows bonuses of given equipment slot.
Installation : Unzip the BonusScanner archive to your ../Interface/Addons folder, overwriting any previous versions.
Additional Considerations :
- Set bonuses will not be taken into consideration in the item bonus summary, on an item tooltip, as they aren’t really part of the item but rather conditional. They will still be counted as usual in the overall summary for a specific target or the player himself. This is intended behavior.
- Detection of temporary bonuses derived by oils, poisons or stones has been disabled as again they do not represent static bonuses but have a limited duration.
- Gem colors will only be counted properly if the gems in question exist in the player's local cache (aka if the player has 'seen' the gems even once). Note that the local cache normally gets wiped on every major patch, so the gems will need to be 'seen' again for their colors to be counter properly. This is sadly, a limitation with Blizzard's system of itemlinks and the API.
- Metagem bonuses when shown as part of an item's summary, will only be counted if the user fulfills the requirements. They should still be counted properly for their owners.
Credits: BonusScanner was not originally created by myself, although a good part of its code has been written from scratch. I’ve been using the addon as part of Titan Panel back in the day and just picked it up where others left it, having very little to do personally with programming and lua. This addon was originally developed by CrowleyAJ and thus all credit goes to him for his hard work. Special thanks also goes to Archarodim, jmsteele, Xinhuan (for the gem table idea) and all the people that have contributed one way or another into keeping the addon alive.
Known Issues in v5.1
- Only English localization is fully supported at the moment. Other locales may be missing a number of bonus patterns and gem color support. Any help to correct misinterpretations, non-localized strings or add missing patterns will be greatly appreciated.