Collision

Collision is a library that tries to provide more information about the player armor durability in a easy and simple way. It was originally developed by Jaliborc for Bongos Durability, but the author encourages any developer to use it too.

Access Collision
To simply get a reference to the library, query LibStub for it:

local Collision = LibStub:GetLibrary("Collision-1.3") local Collision = LibStub("Collision-3.0")

Or, to embed Collision into your addon object:

LibStub("Collision-3.0"):Embed(myObject)

API
The following API provides everything you need yo know to use Collision.

:GetArmorDurability(slot, precise)
Returns the durability values of the given armor slot

:GetOverallDurability(precise)
Calculates the overall durability percentage

:GetRepairCost
Calculates the repair cost of all armor equipped in the character

:PrintRepairCost(tooltip)
Prints the repair cost of all armor equipped in the character to the given tooltip

:IterateDamagedArmor
Iterates over the damaged armor slots

:IterateBrokenArmor
Iterates over the broken armor slots

More Help
For additional help, contact the author at Jalimods or see Collision in action.