Modules/Auras: make auras linkable in chat
This commit is contained in:
+2
-2
@@ -54,7 +54,7 @@ E.noop = function() end
|
||||
E.title = format("|cff1784d1E|r|cffe5e3e3lvUI|r")
|
||||
E.myfaction, E.myLocalizedFaction = UnitFactionGroup("player")
|
||||
E.mylevel = UnitLevel("player")
|
||||
E.myLocalizedClass, E.myclass = UnitClass("player")
|
||||
E.myLocalizedClass, E.myclass = UnitClass("player") -- On Ascension, this is always (Hero, HERO)
|
||||
E.myLocalizedRace, E.myrace = UnitRace("player")
|
||||
E.myname = UnitName("player")
|
||||
E.myrealm = GetRealmName()
|
||||
@@ -1243,4 +1243,4 @@ function E:Initialize()
|
||||
if GetCVar("scriptProfile") ~= "1" then
|
||||
collectgarbage("collect")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -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()
|
||||
|
||||
@@ -4204,4 +4204,4 @@ do -- cooldown stuff
|
||||
|
||||
-- we gonna need this on by default :3
|
||||
P.cooldown.enable = true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user