Finish changes to crit functions in Combat.lua

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Dekar
Spiderkin
Posts: 559
Joined: Wed Jan 26, 2011 3:47 pm

Finish changes to crit functions in Combat.lua

#1 Post 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.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Finish changes to crit functions in Combat.lua

#2 Post by darkgod »

good idea
done
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply