Modules/Auras: make auras linkable in chat
This commit is contained in:
@@ -376,9 +376,7 @@ function AB:CreateVehicleLeave()
|
||||
|
||||
vehicle:SetScript("OnClick", Vehicle_ExitVehicle)
|
||||
vehicle:SetScript("OnEvent", Vehicle_OnEvent)
|
||||
if MainMenuBarVehicleLeaveButtonMixin then
|
||||
vehicle:SetScript("OnEnter", MainMenuBarVehicleLeaveButtonMixin.OnEnter)
|
||||
end
|
||||
vehicle:SetScript("OnEnter", MainMenuBarVehicleLeaveButtonMixin.OnEnter)
|
||||
vehicle:SetScript("OnLeave", GameTooltip_Hide)
|
||||
vehicle:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
vehicle:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
|
||||
|
||||
@@ -121,7 +121,19 @@ local OnLeave = function()
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
local OnClick = function(self)
|
||||
local OnClick = function(self, button)
|
||||
if button == "LeftButton" then
|
||||
if IsModifiedClick("CHATLINK") then
|
||||
local spellID = select(11, UnitAura("player", self:GetID(), self:GetParent().filter))
|
||||
if spellID then
|
||||
local link = LinkUtil:GetSpellLink(spellID)
|
||||
if link then
|
||||
ChatEdit_InsertLink(link)
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
if self.IsWeapon then
|
||||
CancelItemTempEnchantment(self:GetID())
|
||||
else
|
||||
@@ -140,7 +152,7 @@ function A:CreateIcon(button)
|
||||
button.auraType = "buffs"
|
||||
end
|
||||
|
||||
button:RegisterForClicks("RightButtonUp")
|
||||
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
|
||||
button.texture = button:CreateTexture(nil, "BORDER")
|
||||
button.texture:SetInside()
|
||||
|
||||
Reference in New Issue
Block a user