Merge remote-tracking branch 'fork/master'
This commit is contained in:
@@ -9,6 +9,8 @@ This is a high level API for Details! Damage Meter
|
||||
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
|
||||
--local helpers
|
||||
local getCombatObject = function(segmentNumber)
|
||||
---@type combat
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
--initialize buffs name container
|
||||
_detalhes.Buffs.BuffsTable = {} -- armazenara o [nome do buff] = { tabela do buff }
|
||||
_detalhes.Buffs.__index = _detalhes.Buffs
|
||||
|
||||
@@ -3,6 +3,7 @@ local Details = _G.Details
|
||||
local DF = _G.DetailsFramework
|
||||
local C_Timer = _G.C_Timer
|
||||
local addonName, Details222 = ...
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
|
||||
--get the sectionInfo and try to extract the spellID from it
|
||||
--sectionInfo is always a valid table
|
||||
|
||||
@@ -6,7 +6,7 @@ do
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
local unpack = table.unpack or _G.unpack
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
local UnitClass = UnitClass
|
||||
local UnitGUID = UnitGUID
|
||||
|
||||
@@ -589,4 +589,4 @@ do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,6 +11,7 @@ local UIParent = UIParent
|
||||
local UnitGUID = UnitGUID
|
||||
local tonumber= tonumber
|
||||
local LoggingCombat = LoggingCombat
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
|
||||
SLASH_PLAYEDCLASS1 = "/playedclass"
|
||||
function SlashCmdList.PLAYEDCLASS(msg, editbox)
|
||||
@@ -779,6 +780,57 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (command == "spellid") then
|
||||
if (Details222.FocusedSpellId) then
|
||||
local npcId = Details222.FocusedSpellId
|
||||
if (not Details.id_frame) then
|
||||
local backdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
tile = true, edgeSize = 1, tileSize = 5,
|
||||
}
|
||||
|
||||
Details.id_frame = CreateFrame("Frame", "DetailsID", UIParent, "BackdropTemplate")
|
||||
Details.id_frame:SetHeight(14)
|
||||
Details.id_frame:SetWidth(120)
|
||||
Details.id_frame:SetPoint("center", UIParent, "center")
|
||||
Details.id_frame:SetBackdrop(backdrop)
|
||||
|
||||
table.insert(UISpecialFrames, "DetailsID")
|
||||
|
||||
Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate")
|
||||
Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft")
|
||||
Details.id_frame.texto:SetAutoFocus(false)
|
||||
Details.id_frame.texto:SetFontObject(GameFontHighlightSmall)
|
||||
Details.id_frame.texto:SetHeight(14)
|
||||
Details.id_frame.texto:SetWidth(120)
|
||||
Details.id_frame.texto:SetJustifyH("CENTER")
|
||||
Details.id_frame.texto:EnableMouse(true)
|
||||
Details.id_frame.texto:SetBackdropColor(0, 0, 0, 0.5)
|
||||
Details.id_frame.texto:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
|
||||
Details.id_frame.texto:SetText("")
|
||||
Details.id_frame.texto.perdeu_foco = nil
|
||||
|
||||
Details.id_frame.texto:SetScript("OnEnterPressed", function()
|
||||
Details.id_frame.texto:ClearFocus()
|
||||
Details.id_frame:Hide()
|
||||
end)
|
||||
|
||||
Details.id_frame.texto:SetScript("OnEscapePressed", function()
|
||||
Details.id_frame.texto:ClearFocus()
|
||||
Details.id_frame:Hide()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
C_Timer.After(0.1, function()
|
||||
Details.id_frame:Show()
|
||||
Details.id_frame.texto:SetFocus()
|
||||
Details.id_frame.texto:SetText("" .. npcId)
|
||||
Details.id_frame.texto:HighlightText()
|
||||
end)
|
||||
end
|
||||
|
||||
elseif (command == "profile") then
|
||||
|
||||
local profile = rest:match("^(%S*)%s*(.-)$")
|
||||
|
||||
@@ -7,7 +7,6 @@ do
|
||||
local rawget = rawget
|
||||
local rawset = rawset
|
||||
local setmetatable = setmetatable
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local unpack = unpack
|
||||
local tinsert = table.insert
|
||||
local tremove = tremove
|
||||
|
||||
@@ -3,6 +3,8 @@ do
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
|
||||
--import potion list from the framework
|
||||
_detalhes.PotionList = {}
|
||||
for spellID, _ in pairs(DetailsFramework.PotionIDs) do
|
||||
|
||||
Reference in New Issue
Block a user