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
https://github.com/Gethe/wow-ui-sour...on.lua#L37-L58
https://github.com/Gethe/wow-ui-sour....lua#L368-L386
ArtifactTraitLink.lua
Lua Code:
local oldOnClick = ArtifactPowerButtonMixin.OnClick
-- rather prehook than posthook to prevent purchasing traits
function ArtifactPowerButtonMixin:OnClick(button)
if IsModifiedClick("CHATLINK") then
ChatEdit_InsertLink(GetSpellLink(self.spellID))
else
oldOnClick(self, button)
end
end
ArtifactTraitLink.toc
Code:
## Interface: 70000
## Version: v1.0.3
## Title: ArtifactTraitLink
## Notes: Lets you Shift-Click artifact traits to chat
## LoadOnDemand: 1
## LoadWith: Blizzard_ArtifactUI
ArtifactTraitLink.lua
http://www.wowinterface.com/download...TraitLink.html