The value of an item is the following: the result of the formula using the bonuses of that item and all the items from the base set (except the item in the same equip location), substracting the result of the formula without that item (meaning: empty equip slot of that item, other slots are filled with the base items). The result is: "what that item would add to the gear".
I have uploaded it as an attachement. Feel free to put in on SVN/Curse/Wowinterface, embed it to ItemValue, etc. (Just name me as author :) )
Q: Why should I use a formula like that?
A: For instance, when you have zero spellhit so far, you (should) want it badly. When you already maxed that out, it is worth nothing to you. Another example is the case of spell haste: Having higher +spelldamage, haste worth more.
Q: Why setting a base equipment, not using the current one.
A: I'm a shaman. I currently have 4 sets of gear: spellcast, melee, heal and pvp. I can't always change equipment to see if that caster bracer is an upgrade to my elemental gear or not. This way I can set up the pewpew formulas to use my elemental gear as a basis.
Q: Your code sucks! It uses more memory than Firefox 2 and eats half my FPS.
A: I know. Please tell me how to make it better. (It's not that bad tho)
Q: Can you give me an example?
A: Average heal per sec of a rank 12 Healing Wave of a 8/0/53 shaman:
- 2285 is the average healing from base spell
- Assuming raid enviroment, +10% to INT (blessing of kings)
- 30% of INT goes to +heal (Nature's Blessing talent)
- HW12 gets 86% of +heal bonus
- 10% bonus to all heals(Purification talent)
- crit is a +50% to heals
- base crit is 5%, +5% from Tidal Mastery talent
- divided by the cast time after haste gives HPS
Edit1: The example formula has a few bugs (spellcrit calculation is wrong here), so don't just blindly copy-paste.
Edit2: Removed the attachement as Thexod included in the mod (and also wrote a code way more efficient than mine).