Page 1 of 1

Target Callback in attackTargetWith()

Posted: Sat Jun 02, 2018 10:59 am
by HousePet
I need a callback in Combat:attackTargetWith() that allows duplication of the effects of talents like Repel, Buckler Expertise, Warding Weapon, Blade Ward, Intuitive Shots and Dwarven Stoneskin. (and by the looks of it, the code would look much neater if one existed.)

Will this be happening in 1.6?
If not, will it happen if I code it for 1.6?

Re: Target Callback in attackTargetWith()

Posted: Thu Jan 31, 2019 3:16 pm
by isaacssv552
Could callbackOMeleeAttackBonuses be modified to provide this functionality? e.g.

Code: Select all

local hd = {"Combat:attackTargetWith:attackerBonuses", target=target, weapon=weapon, damtype=damtype, mult=mult, dam=dam, apr=apr, atk=atk, def=def, armor=armor}
	self:triggerHook(hd)
	self:fireTalentCheck("callbackOMeleeAttackBonuses", hd)
	target, weapon, damtype, mult, dam, apr, atk, def, armor = hd.target, hd.weapon, hd.damtype, hd.mult, hd.dam, hd.apr, hd.atk, hd.def, hd.armor
changed to

Code: Select all

local hd = {"Combat:attackTargetWith:attackerBonuses", repelled=repelled, target=target, weapon=weapon, damtype=damtype, mult=mult, dam=dam, apr=apr, atk=atk, def=def, armor=armor}
	self:triggerHook(hd)
	self:fireTalentCheck("callbackOMeleeAttackBonuses", hd)
	repelled, target, weapon, damtype, mult, dam, apr, atk, def, armor = hd.repelled, hd.target, hd.weapon, hd.damtype, hd.mult, hd.dam, hd.apr, hd.atk, hd.def, hd.armor