Target Callback in attackTargetWith()

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Target Callback in attackTargetWith()

#1 Post 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?
My feedback meter decays into coding. Give me feedback and I make mods.

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: Target Callback in attackTargetWith()

#2 Post 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

Post Reply