Thread Tools Display Modes
04-13-09, 10:12 AM   #1
Lhooq
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 3
Improve spells which target an item

I dislike the way spells like windfury work.
When I program a button with such configuration :
- type : spell
- spell : windfury
- target-slot : 17

I hope that only offhand weapon will be enchanted.
However SpellCanTargetItem will return false if there is no enchant on mainhand weapon, so UseInventoryItem will not be called.
And the result is that mainhand weapon is enchanted.

What I would like is an improved SpellCanTargetItem :
haveToTargetItem, mayTargetItem = SpellCanTargetItem();
So windfury spell will returns (false, true) when there is no enchant on mainhand weapon and (true, true) if both MH and OH weapons are enchanted with flametong.
Then in secureTemplates.lua you check the second boolean.

So I can create buttons which always enchant the MH or always the OH.
  Reply With Quote
04-13-09, 11:06 AM   #2
Lhooq
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 3
Also when listening to UNIT_SPELLCAST_SENT it could be useful to have an additionnal parameter itemLink which will be the target-item selected by the spell.
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Improve spells which target an item

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off