Quantcast Artifact Trait Linking - WoWInterface
Thread Tools Display Modes
09-04-16, 06:08 PM   #1
A Defias Bandit
Join Date: Sep 2016
Posts: 2
Artifact Trait Linking

Looking for an addon which can create chat links for the proper spells when shift-clicking artifact traits. Thanks!
  Reply With Quote
09-04-16, 10:46 PM   #2
A Molten Giant
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 840
Don't know if there are any other addons already doing this, but something like this could work

I'm not sure if prehooking instead of posthooking would taint the Artifact UI, but it prevents accidentally buying traits if you wanted to shift-click instead
(drycoded/untested since I'm still waiting for my Legion package and don't have any AP on the beta)

There is C_ArtifactUI.GetPowerInfo() but we can already grab the Spell ID I suppose


Lua Code:
  1. local oldOnClick = ArtifactPowerButtonMixin.OnClick
  3. -- rather prehook than posthook to prevent purchasing traits
  4. function ArtifactPowerButtonMixin:OnClick(button)
  5.     if IsModifiedClick("CHATLINK") then
  6.         ChatEdit_InsertLink(GetSpellLink(self.spellID))
  7.     else
  8.         oldOnClick(self, button)
  9.     end
  10. end

## Interface: 70000
## Version: v1.0.3
## Title: ArtifactTraitLink
## Notes: Lets you Shift-Click artifact traits to chat
## LoadOnDemand: 1
## LoadWith: Blizzard_ArtifactUI


Last edited by Ketho : 09-07-16 at 05:04 PM.
  Reply With Quote
09-05-16, 11:50 AM   #3
A Defias Bandit
Join Date: Sep 2016
Posts: 2
Works great, thanks!!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Artifact Trait Linking

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