Started the spellcache for tww; "/de spellid" to copy the spellid of the latest hovered over spell in the breakdown; Fixed /dumpt for spellids

This commit is contained in:
Tercio Jose
2024-06-10 00:07:00 -03:00
parent 5bf4d2e220
commit c9029933f8
4 changed files with 80 additions and 1 deletions
+1 -1
View File
@@ -1239,7 +1239,7 @@ do
--check if this is a spellId
local spellId = tonumber(value)
if (spellId) then
local spellInfo = {GetSpellInfo(spellId)}
local spellInfo = {Details222.GetSpellInfo(spellId)}
if (type(spellInfo[1]) == "string") then
return Details:Dump(spellInfo)
end
@@ -172,6 +172,7 @@ local onEnterSpellBar = function(spellBar, motion) --parei aqui: precisa por nom
end
spellsTab.currentSpellBar = spellBar
Details222.FocusedSpellId = spellBar.spellId
---@type instance
local instance = spellsTab.GetInstance()
+51
View File
@@ -777,6 +777,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*(.-)$")
+27
View File
@@ -227,6 +227,33 @@ do
[277185] = {name = GetSpellInfo(277185) .. " (Trinket)"}, --[Dread Gladiator's Badge]
[278057] = {name = GetSpellInfo(278057) .. " (Trinket)"}, --[Vigilant's Bloodshaper]
}
elseif (DetailsFramework.IsTWWWow()) then
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
--v11 all good:
[98021] = {name = Loc ["STRING_SPIRIT_LINK_TOTEM"]},
[108271] = {name = GetSpellInfo(108271), icon = "Interface\\Addons\\Details\\images\\icon_astral_shift"},
[196917] = {name = lightOfTheMartyr_Name .. " (" .. Loc ["STRING_DAMAGE"] .. ")", icon = lightOfTheMartyr_Icon},
[77535] = {name = GetSpellInfo(77535), icon = "Interface\\Addons\\Details\\images\\icon_blood_shield"},
[395296] = {name = GetSpellInfo(395296) .. " (on your self)", icon = "Interface\\Addons\\Details\\images\\ebon_might"},
[424428] = {name = (GetSpellInfo(424428) or "none") .. " (4P)", icon = "Interface\\Addons\\Details\\images\\spells\\eruption_tier4.jpg", defaultName = GetSpellInfo(424428), breakdownCanStack = true}, --augmentation 4pc tier 10.2
[422779] = {name = (GetSpellInfo(422779) or "none") .. " (4P)", icon = "Interface\\Addons\\Details\\images\\spells\\burning_frenzy_tier4.jpg", defaultName = GetSpellInfo(422779)}, --feral 4pc tier 10.2
}
--onUse = true, castId = 427113, defaultName = GetSpellInfo(427113)
customItemList[443539] = {itemId = 219313, isPassive = false, onUse = true, castId = 450561, defaultName = GetSpellInfo(427113), aura1 = 443539, aura2 = 450551} -- [Mereldar's Toll]
else --retail (dragonflight)
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},