Commit ca2eb5ac authored by NihilisticPandemonium's avatar NihilisticPandemonium

Merge branch 'development' into 'nihilist_playground'

# Conflicts:
#   ElvUI/Modules/ActionBars/ActionBars.lua
parents 1d82f604 68732666
......@@ -1069,6 +1069,7 @@ E.TagInfo = {
['shortclassification'] = { category = 'Classification', description = "Displays the unit's classification in short form (e.g. '+' for ELITE and 'R' for RARE)" },
['classification:icon'] = { category = 'Classification', description = "Displays the unit's classification in icon form (golden icon for 'ELITE' silver icon for 'RARE')" },
['rare'] = { category = 'Classification', description = "Displays 'Rare' when the unit is a rare or rareelite" },
['plus'] = { category = 'Classification', description = "Displays the character '+' if the unit is an elite or rare-elite" },
--Guild
['guild'] = { category = 'Guild', description = "Displays the guild name" },
['guild:brackets'] = { category = 'Guild', description = "Displays the guild name with < > brackets (e.g. <GUILD>)" },
......@@ -1100,6 +1101,7 @@ E.TagInfo = {
['health:deficit'] = { category = 'Health', description = "Displays the health of the unit as a deficit (Total Health - Current Health = -Deficit)" },
['health:deficit-nostatus'] = { category = 'Health', description = "Displays the health of the unit as a deficit, without status" },
['health:deficit-nostatus:shortvalue'] = { category = 'Health', description = "Shortvalue of the health deficit, without status" },
['health:deficit-percent:nostatus'] = { category = 'Health', description = "Displays the health deficit as a percentage, without status" },
['health:deficit-percent:name'] = { category = 'Health', description = "Displays the health deficit as a percentage and the full name of the unit" },
['health:deficit-percent:name-long'] = { category = 'Health', description = "Displays the health deficit as a percentage and the name of the unit (limited to 20 letters)" },
['health:deficit-percent:name-medium'] = { category = 'Health', description = "Displays the health deficit as a percentage and the name of the unit (limited to 15 letters)" },
......@@ -1178,6 +1180,13 @@ E.TagInfo = {
['perpp'] = { category = 'Power', description = "Displays the unit's percentage power without decimals " },
['maxpp'] = { category = 'Power', description = "Displays the max amount of power of the unit in whole numbers without decimals" },
['missingpp'] = { category = 'Power', description = "Displays the missing power of the unit in whole numbers when not at full power" },
--PvP
['pvp'] = { category = 'PvP', description = "Displays 'PvP' if the unit is pvp flagged" },
['pvptimer'] = { category = 'PvP', description = "Displays remaining time on pvp-flagged status" },
['arenaspec'] = { category = 'PvP', description = "Displays the area spec of an unit" },
['arena:number'] = { category = 'PvP', description = "Displays the arena number 1-5" },
['faction'] = { category = 'PvP', description = "Displays 'Aliance' or 'Horde'" },
['faction:icon'] = { category = 'PvP', description = "Displays 'Alliance' or 'Horde' Texture" },
--Classpower
['arcanecharges'] = { category = 'Classpower', description = "Displays the arcane charges (Mage)" },
['chi'] = { category = 'Classpower', description = "Displays the chi points (Monk)" },
......@@ -1224,7 +1233,6 @@ E.TagInfo = {
['afk'] = { category = 'Status', description = "Displays <AFK> if the unit is afk" },
['dead'] = { category = 'Status', description = "Displays <DEAD> if the unit is dead" },
['resting'] = { category = 'Status', description = "Displays 'zzz' if the unit is resting" },
['pvp'] = { category = 'Status', description = "Displays 'PvP' if the unit is pvp flagged" },
['offline'] = { category = 'Status', description = "Displays 'OFFLINE' if the unit is disconnected" },
--Target
['target'] = { category = 'Target', description = "Displays the current target of the unit" },
......@@ -1243,16 +1251,10 @@ E.TagInfo = {
['threat:current'] = { category = 'Threat', description = "Displays the current threat as a value" },
--Miscellanous
['affix'] = { category = 'Miscellanous', description = "Displays low level critter mobs" },
['smartclass'] = { category = 'Miscellanous', description = "Displays the player's class or creature's type" },
['class'] = { category = 'Miscellanous', description = "Displays the class of the unit, if that unit is a player" },
['specialization'] = { category = 'Miscellanous', description = "Displays your current specialization as text" },
['faction'] = { category = 'Miscellanous', description = "Displays 'Aliance' or 'Horde'" },
['faction:icon'] = { category = 'Miscellanous', description = "Displays 'Alliance' or 'Horde' Texture" },
['plus'] = { category = 'Miscellanous', description = "Displays the character '+' if the unit is an elite or rare-elite" },
['arenaspec'] = { category = 'Miscellanous', description = "Displays the area spec of an unit" },
['arena:number'] = { category = 'Miscellanous', description = "Displays the arena number 1-5" },
['pvptimer'] = { category = 'Miscellanous', description = "Displays remaining time on pvp-flagged status" },
['race'] = { category = 'Miscellanous', description = "Displays the race" },
['smartclass'] = { category = 'Miscellanous', description = "Displays the player's class or creature's type" },
['specialization'] = { category = 'Miscellanous', description = "Displays your current specialization as text" },
--Range
['nearbyplayers:8'] = { category = 'Range', description = "Displays all players within 8 yards" },
['nearbyplayers:10'] = { category = 'Range', description = "Displays all players within 10 yards" },
......
......@@ -679,8 +679,7 @@ function TT:SetUnitAura(tt, unit, index, filter)
if id then
if self.MountIDs[id] then
local _, descriptionText, sourceText = C_MountJournal_GetMountInfoExtraByID(self.MountIDs[id])
--tt:AddLine(descriptionText)
local _, _, sourceText = C_MountJournal_GetMountInfoExtraByID(self.MountIDs[id])
tt:AddLine(" ")
tt:AddLine(sourceText, 1, 1, 1)
tt:AddLine(" ")
......@@ -707,26 +706,22 @@ function TT:GameTooltip_OnTooltipSetSpell(tt)
if not id or not self.db.spellID then return end
local displayString = format("|cFFCA3C3C%s|r %d", _G.ID, id)
local lines = tt:NumLines()
local isFound
for i= 1, lines do
for i= 1, tt:NumLines() do
local line = _G[format("GameTooltipTextLeft%d", i)]
if line and line:GetText() and strfind(line:GetText(), displayString) then
isFound = true;
break
local text = line and line.GetText and line:GetText()
if text and strfind(text, displayString) then
return
end
end
if not isFound then
tt:AddLine(displayString)
tt:Show()
end
tt:AddLine(displayString)
tt:Show()
end
function TT:SetItemRef(link)
if strfind(link,"^spell:") and self.db.spellID then
local id = strsub(link,7)
_G.ItemRefTooltip:AddLine(format("|cFFCA3C3C%s|r %d", _G.ID, id))
if link and strfind(link,"^spell:") and self.db.spellID then
_G.ItemRefTooltip:AddLine(format("|cFFCA3C3C%s|r %d", _G.ID, strsub(link,7)))
_G.ItemRefTooltip:Show()
end
end
......@@ -735,11 +730,8 @@ function TT:SetToyByItemID(tt, id)
if tt:IsForbidden() then return end
if not id or not self.db.spellID then return end
local toyID = C_ToyBox_GetToyInfo(id)
if toyID then
tt:AddDoubleLine(format("|cFFCA3C3C%s|r %d", _G.ID, toyID))
tt:Show()
end
tt:AddLine(format("|cFFCA3C3C%s|r %d", _G.ID, id))
tt:Show()
end
function TT:RepositionBNET(frame, _, anchor)
......@@ -853,16 +845,16 @@ function TT:Initialize()
self:SecureHook('SetItemRef')
self:SecureHook('GameTooltip_SetDefaultAnchor')
self:SecureHook(GameTooltip, 'SetToyByItemID')
self:SecureHook(GameTooltip, 'SetUnitAura')
self:SecureHook(GameTooltip, 'SetUnitBuff', 'SetUnitAura')
self:SecureHook(GameTooltip, 'SetUnitDebuff', 'SetUnitAura')
self:SecureHook(GameTooltip, 'SetToyByItemID')
self:SecureHookScript(GameTooltip, 'OnTooltipSetSpell', 'GameTooltip_OnTooltipSetSpell')
self:SecureHookScript(GameTooltip, 'OnTooltipCleared', 'GameTooltip_OnTooltipCleared')
self:SecureHookScript(GameTooltip, 'OnTooltipSetItem', 'GameTooltip_OnTooltipSetItem')
self:SecureHookScript(GameTooltip, 'OnTooltipSetUnit', 'GameTooltip_OnTooltipSetUnit')
self:SecureHookScript(GameTooltip.StatusBar, 'OnValueChanged', 'GameTooltipStatusBar_OnValueChanged')
self:RegisterEvent("MODIFIER_STATE_CHANGED")
self:RegisterEvent('MODIFIER_STATE_CHANGED')
--Variable is localized at top of file, then set here when we're sure the frame has been created
--Used to check if keybinding is active, if so then don't hide tooltips on actionbars
......
......@@ -524,7 +524,7 @@ L["General"] = "一般"
L["Global (Account Settings)"] = "全局(账号设置)"
L["Global Fade Transparency"] = "全局透明渐隐"
L["Global"] = "全局"
L["Glow"] = "闪烁"
L["Glow"] = "边框发光"
L["GM Chat"] = "GM对话框"
L["Gold Format"] = "金币格式"
L["Good Color"] = "正常颜色"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment