Page 1 of 1

Finish changes to crit functions in Combat.lua

Posted: Wed May 09, 2012 5:13 pm
by Dekar
b39 appears to have some changes in mod/class/interface/Combat.lua to spellcrit function which add a critpower variable that is yet only used for Shadowstrike. All crit functions should have "add_chance" and "add_crit_power" arguments so that addons can make use of them.

This change should be complemented with a change in mod/class/interface/Archery.lua line 160 that fills in the 2 new arguments, to allow physical projectiles with different crit chance and power values from talents, just like its already possible for damage and armor penetration:

dam, crit = self:physicalCrit(dam, ammo, target, atk, def, tg.archery.crit_chance or 0, tg.archery.crit_power or 0)

I think b39 added tg.archery.crit_chance by adding it to the character before the call to the crit calculation and removing it after, that could be simplified with a unified approach that requires only little code changes.

Re: Finish changes to crit functions in Combat.lua

Posted: Wed May 09, 2012 9:48 pm
by darkgod
good idea
done