Modules/Auras: make auras linkable in chat

This commit is contained in:
andrew6180
2023-07-03 18:42:58 -07:00
parent 3ced5b716b
commit e54c3efbd0
4 changed files with 18 additions and 8 deletions
+2 -2
View File
@@ -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
+1 -3
View File
@@ -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")
+14 -2
View File
@@ -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()
+1 -1
View File
@@ -4204,4 +4204,4 @@ do -- cooldown stuff
-- we gonna need this on by default :3
P.cooldown.enable = true
end
end