Small bug fixes and improvements

This commit is contained in:
Tercio Jose
2022-10-10 13:26:13 -03:00
parent b588d5e30c
commit 1ed29008aa
119 changed files with 6556 additions and 6650 deletions
+168 -168
View File
@@ -1,7 +1,7 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
local CreateFrame = CreateFrame
@@ -33,7 +33,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (command == Loc ["STRING_SLASH_NEW"] or command == "new") then
_detalhes:CriarInstancia (nil, true)
_detalhes:CriarInstancia(nil, true)
elseif (command == Loc ["STRING_SLASH_HISTORY"] or command == "history" or command == "score" or command == "rank" or command == "ranking" or command == "statistics" or command == "stats") then
_detalhes:OpenRaidHistoryWindow()
@@ -55,7 +55,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (instance) then
local this_instance = _detalhes:GetInstance(instance)
if (not this_instance) then
return _detalhes:Msg (Loc ["STRING_WINDOW_NOTFOUND"])
return _detalhes:Msg(Loc ["STRING_WINDOW_NOTFOUND"])
end
if (this_instance:IsEnabled() and this_instance.baseframe) then
this_instance:ShutDown()
@@ -97,7 +97,7 @@ function SlashCmdList.DETAILS (msg, editbox)
for instanceID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance.hide_in_combat_type > 1) then
instance:SetWindowAlphaForCombat (true)
instance:SetWindowAlphaForCombat(true)
end
end
end
@@ -106,7 +106,7 @@ function SlashCmdList.DETAILS (msg, editbox)
for instanceID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance.hide_in_combat_type > 1) then
instance:SetWindowAlphaForCombat (false)
instance:SetWindowAlphaForCombat(false)
end
end
end
@@ -117,10 +117,10 @@ function SlashCmdList.DETAILS (msg, editbox)
if (instance.hide_in_combat_type > 1) then
if (instance.baseframe:GetAlpha() > 0.1) then
--show
instance:SetWindowAlphaForCombat (true)
instance:SetWindowAlphaForCombat(true)
else
--hide
instance:SetWindowAlphaForCombat (false)
instance:SetWindowAlphaForCombat(false)
end
end
end
@@ -134,7 +134,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (instance) then
local this_instance = _detalhes:GetInstance(instance)
if (not this_instance) then
return _detalhes:Msg (Loc ["STRING_WINDOW_NOTFOUND"])
return _detalhes:Msg(Loc ["STRING_WINDOW_NOTFOUND"])
end
if (not this_instance:IsEnabled() and this_instance.baseframe) then
this_instance:EnableInstance()
@@ -158,7 +158,7 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes:CaptureSet (false, "aura", true)
_detalhes:CaptureSet (false, "spellcast", true)
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREOFF"])
print(Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREOFF"])
elseif (command == Loc ["STRING_SLASH_ENABLE"] or command == "enable") then
@@ -169,7 +169,7 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes:CaptureSet (true, "aura", true)
_detalhes:CaptureSet (true, "spellcast", true)
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREON"])
print(Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREON"])
elseif (command == Loc ["STRING_SLASH_OPTIONS"] or command == "options" or command == "config") then
@@ -195,7 +195,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local questIds = {{"Tarlna the Ageless", 81535}, {"Drov the Ruiner ", 87437}, {"Rukhmar", 87493}}
for _, _table in pairs(questIds) do
print (format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
print(format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
end
elseif (command == Loc ["STRING_SLASH_CHANGES"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS1"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS2"] or command == "news" or command == "updates") then
@@ -269,20 +269,20 @@ function SlashCmdList.DETAILS (msg, editbox)
local profile = _detalhes:GetProfile (rest)
if (not profile) then
return _detalhes:Msg ("Profile Not Found.")
return _detalhes:Msg("Profile Not Found.")
end
if (not _detalhes:ApplyProfile (rest)) then
return
end
_detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_LOADED"], rest)
_detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], rest)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
_G.DetailsOptionsWindow:Hide()
GameCooltip:Close()
end
else
_detalhes:Msg ("/details profile <profile name>")
_detalhes:Msg("/details profile <profile name>")
end
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -293,17 +293,17 @@ function SlashCmdList.DETAILS (msg, editbox)
local exitlog = _detalhes_global.exit_log
local exiterrors = _detalhes_global.exit_errors
print ("EXIT LOG:")
print("EXIT LOG:")
for index, text in ipairs(exitlog) do
print (text)
print(text)
end
print ("ERRORS:")
print("ERRORS:")
if (exiterrors) then
for index, text in ipairs(exiterrors) do
print (text)
print(text)
end
else
print ("|cFF00FF00No error occured!|r")
print("|cFF00FF00No error occured!|r")
end
elseif (msg == "tr") then
@@ -323,7 +323,7 @@ function SlashCmdList.DETAILS (msg, editbox)
b:SetTarget (texture)
A:Play()
C_Timer.NewTicker (1, function()
C_Timer.NewTicker(1, function()
texture:SetTexCoord (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
end)
@@ -331,7 +331,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "realmsync") then
_detalhes.realm_sync = not _detalhes.realm_sync
_detalhes:Msg ("Realm Sync: ", _detalhes.realm_sync and "Enabled" or "Disabled")
_detalhes:Msg("Realm Sync: ", _detalhes.realm_sync and "Enabled" or "Disabled")
if (not _detalhes.realm_sync) then
LeaveChannelByName ("Details")
@@ -341,10 +341,10 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "load") then
print (DetailsDataStorage)
print(DetailsDataStorage)
local loaded, reason = LoadAddOn ("Details_DataStorage")
print (loaded, reason, DetailsDataStorage)
print(loaded, reason, DetailsDataStorage)
elseif (msg == "owner2") then
@@ -358,18 +358,18 @@ function SlashCmdList.DETAILS (msg, editbox)
return text:GetText()
end
print (GetGuardianOwner(UnitGUID ("target")))
print(GetGuardianOwner(UnitGUID("target")))
elseif (msg == "chat") then
elseif (msg == "chaticon") then
_detalhes:Msg ("|TInterface\\AddOns\\Details\\images\\icones_barra:" .. 14 .. ":" .. 14 .. ":0:0:256:32:0:32:0:32|tteste")
_detalhes:Msg("|TInterface\\AddOns\\Details\\images\\icones_barra:" .. 14 .. ":" .. 14 .. ":0:0:256:32:0:32:0:32|tteste")
elseif (msg == "align") then
local c = RightChatPanel
local w,h = c:GetSize()
print (w,h)
print(w,h)
local instance1 = _detalhes.tabela_instancias [1]
local instance2 = _detalhes.tabela_instancias [2]
@@ -386,7 +386,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "addcombat") then
local combat = _detalhes.combate:NovaTabela (true, _detalhes.tabela_overall, 1)
local self = combat[1]:PegarCombatente (UnitGUID ("player"), UnitName ("player"), 1297, true)
local self = combat[1]:PegarCombatente (UnitGUID("player"), UnitName ("player"), 1297, true)
self.total = 100000
self.total_without_pet = 100000
@@ -435,10 +435,10 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes.tabela_historico:adicionar (combat)
_detalhes:InstanciaCallFunction (Details.FadeHandler.Fader, "in", nil, "barras")
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "in", nil, "barras")
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:RefreshMainWindow(-1, true) --atualiza todas as instancias
@@ -464,11 +464,11 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes.tabela_vigente.saved_pets [k] = {v[1], v[2], v[3]}
end
_detalhes:Msg ("pet table has been saved on current combat.")
_detalhes:Msg("pet table has been saved on current combat.")
elseif (msg == "move") then
print ("moving...")
print("moving...")
local instance = _detalhes.tabela_instancias [1]
instance.baseframe:ClearAllPoints()
@@ -504,8 +504,8 @@ function SlashCmdList.DETAILS (msg, editbox)
end
elseif (msg == "time") then
print ("GetTime()", GetTime())
print ("time()", time())
print("GetTime()", GetTime())
print("time()", time())
elseif (msg == "copy") then
_G.DetailsCopy:Show()
@@ -525,7 +525,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (realm) then
nome = nome.."-"..realm
end
print (nome, realm)
print(nome, realm)
elseif (msg == "raid") then
@@ -538,14 +538,14 @@ function SlashCmdList.DETAILS (msg, editbox)
actorName = player
end
print (actorName)
print(actorName)
local guid = _detalhes:FindGUIDFromName ("Ditador")
print (guid)
print(guid)
for i = 1, GetNumGroupMembers()-1, 1 do
local name, realm = UnitName ("party"..i)
print (name, " -- ", realm)
print(name, " -- ", realm)
end
elseif (msg == "cacheparser") then
@@ -555,10 +555,10 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "captures") then
for k, v in pairs(_detalhes.capture_real) do
print ("real -",k,":",v)
print("real -",k,":",v)
end
for k, v in pairs(_detalhes.capture_current) do
print ("current -",k,":",v)
print("current -",k,":",v)
end
elseif (msg == "slider") then
@@ -591,17 +591,17 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "bcollor") then
--local instancia = _detalhes.tabela_instancias [1]
_detalhes.ResetButton.Middle:SetVertexColor (1, 1, 0, 1)
_detalhes.ResetButton.Middle:SetVertexColor(1, 1, 0, 1)
--print (_detalhes.ResetButton:GetHighlightTexture())
--print(_detalhes.ResetButton:GetHighlightTexture())
local t = _detalhes.ResetButton:GetHighlightTexture()
t:SetVertexColor (0, 1, 0, 1)
--print (t:GetObjectType())
t:SetVertexColor(0, 1, 0, 1)
--print(t:GetObjectType())
--_detalhes.ResetButton:SetHighlightTexture(t)
_detalhes.ResetButton:SetNormalTexture(t)
print ("backdrop", _detalhes.ResetButton:GetBackdrop())
print("backdrop", _detalhes.ResetButton:GetBackdrop())
_detalhes.ResetButton:SetBackdropColor(0, 0, 1, 1)
@@ -610,14 +610,14 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (command == "mini") then
local instance = _detalhes.tabela_instancias [1]
--Details.VarDump ()
--print (instance, instance.StatusBar.options, instance.StatusBar.left)
print (instance.StatusBar.options [instance.StatusBar.left.mainPlugin.real_name].textSize)
print (instance.StatusBar.left.options.textSize)
--print(instance, instance.StatusBar.options, instance.StatusBar.left)
print(instance.StatusBar.options [instance.StatusBar.left.mainPlugin.real_name].textSize)
print(instance.StatusBar.left.options.textSize)
elseif (command == "owner") then
local petname = rest:match ("^(%S*)%s*(.-)$")
local petGUID = UnitGUID ("target")
local petGUID = UnitGUID("target")
if (not _G.DetailsScanTooltip) then
local scanTool = CreateFrame("GameTooltip", "DetailsScanTooltip", nil, "GameTooltipTemplate")
@@ -630,7 +630,7 @@ function SlashCmdList.DETAILS (msg, editbox)
scanTool:ClearLines()
print (petName)
print(petName)
scanTool:SetUnit (petName)
local ownerText = scanText:GetText()
@@ -642,33 +642,33 @@ function SlashCmdList.DETAILS (msg, editbox)
return owner -- This is the pet's owner
end
--print (getPetOwner (petname))
print (getPetOwner (petGUID))
--print(getPetOwner (petname))
print(getPetOwner (petGUID))
elseif (command == "buffsof") then
local playername, segment = rest:match("^(%S*)%s*(.-)$")
segment = tonumber (segment or 0)
print ("dumping buffs of ", playername, segment)
print("dumping buffs of ", playername, segment)
local c = _detalhes:GetCombat ("current")
local c = _detalhes:GetCombat("current")
if (c) then
local playerActor
if (segment and segment ~= 0) then
local c = _detalhes:GetCombat (segment)
local c = _detalhes:GetCombat(segment)
playerActor = c (4, playername)
print ("using segment", segment, c, "player actor:", playerActor)
print("using segment", segment, c, "player actor:", playerActor)
else
playerActor = c (4, playername)
end
print ("actor table: ", playerActor)
print("actor table: ", playerActor)
if (not playerActor) then
print ("actor table not found")
print("actor table not found")
return
end
@@ -676,7 +676,7 @@ function SlashCmdList.DETAILS (msg, editbox)
for spellid, spellTable in pairs(playerActor.buff_uptime_spells._ActorTable) do
local spellname = GetSpellInfo(spellid)
if (spellname) then
print (spellid, spellname, spellTable.uptime)
print(spellid, spellname, spellTable.uptime)
end
end
end
@@ -685,7 +685,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "teste") then
local a, b = _detalhes:GetEncounterEnd (1098, 3)
print (a, unpack (b))
print(a, unpack(b))
elseif (msg == "yesno") then
--_detalhes:Show()
@@ -693,9 +693,9 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "imageedit") then
local callback = function(width, height, overlayColor, alpha, texCoords)
print (width, height, alpha)
print ("overlay: ", unpack (overlayColor))
print ("crop: ", unpack (texCoords))
print(width, height, alpha)
print("overlay: ", unpack(overlayColor))
print("crop: ", unpack(texCoords))
end
_detalhes.gump:ImageEditor (callback, "Interface\\TALENTFRAME\\bg-paladin-holy", nil, {1, 1, 1, 1}) -- {0.25, 0.25, 0.25, 0.25}
@@ -703,7 +703,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "chat") then
local name, fontSize, r, g, b, a, shown, locked = FCF_GetChatWindowInfo (1);
print (name,"|",fontSize,"|", r,"|", g,"|", b,"|", a,"|", shown,"|", locked)
print(name,"|",fontSize,"|", r,"|", g,"|", b,"|", a,"|", shown,"|", locked)
--local fontFile, unused, fontFlags = self:GetFont();
--self:SetFont(fontFile, fontSize, fontFlags);
@@ -722,7 +722,7 @@ function SlashCmdList.DETAILS (msg, editbox)
}
_detalhes.capture_current = _detalhes.capture_real
_detalhes:CaptureRefresh()
print (Loc ["STRING_DETAILS1"] .. "capture has been reseted.")
print(Loc ["STRING_DETAILS1"] .. "capture has been reseted.")
--debug
elseif (command == "barra") then
@@ -734,11 +734,11 @@ function SlashCmdList.DETAILS (msg, editbox)
for i = 1, barra:GetNumPoints() do
local point, relativeTo, relativePoint, xOfs, yOfs = barra:GetPoint (i)
print (point, relativeTo, relativePoint, xOfs, yOfs)
print(point, relativeTo, relativePoint, xOfs, yOfs)
end
elseif (msg == "opened") then
print ("Instances opened: " .. _detalhes.opened_windows)
print("Instances opened: " .. _detalhes.opened_windows)
--debug, get a guid of something
elseif (command == "backdrop") then --localize-me
@@ -748,18 +748,18 @@ function SlashCmdList.DETAILS (msg, editbox)
Details.VarDump (backdrop)
Details.VarDump (backdrop.insets)
print ("bgcolor:",f:GetBackdropColor())
print ("bordercolor",f:GetBackdropBorderColor())
print("bgcolor:",f:GetBackdropColor())
print("bordercolor",f:GetBackdropBorderColor())
elseif (command == "myguid") then --localize-me
local g = UnitGUID ("player")
print (type(g))
print (g)
print (string.len (g))
local g = UnitGUID("player")
print(type(g))
print(g)
print(string.len(g))
local serial = g:sub (12, 18)
serial = tonumber ("0x"..serial)
print (serial)
print(serial)
--tonumber((UnitGUID("target")):sub(-12, -9), 16))
@@ -871,7 +871,7 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes.id_frame.texto:SetFocus()
if (pass_guid == "-") then
local guid = UnitGUID ("target")
local guid = UnitGUID("target")
if (guid) then
local g = _detalhes:GetNpcIdFromGuid (guid)
_detalhes.id_frame.texto:SetText("" .. g)
@@ -879,7 +879,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
else
print (pass_guid.. " -> " .. tonumber (pass_guid:sub(6, 10), 16))
print(pass_guid.. " -> " .. tonumber (pass_guid:sub(6, 10), 16))
_detalhes.id_frame.texto:SetText(""..tonumber (pass_guid:sub(6, 10), 16))
_detalhes.id_frame.texto:HighlightText()
end
@@ -888,7 +888,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local profile = rest:match("^(%S*)%s*(.-)$")
print ("Force apply profile: ", profile)
print("Force apply profile: ", profile)
_detalhes:ApplyProfile (profile, false)
@@ -898,33 +898,33 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "users" or msg == "version" or msg == "versioncheck") then
Details.SendHighFive()
print (Loc ["STRING_DETAILS1"] .. "highfive sent, HI!")
print(Loc ["STRING_DETAILS1"] .. "highfive sent, HI!")
C_Timer.After (0.3, function()
C_Timer.After(0.3, function()
Details.RefreshUserList()
end)
C_Timer.After (0.6, function()
C_Timer.After(0.6, function()
Details.RefreshUserList (true)
end)
C_Timer.After (0.9, function()
C_Timer.After(0.9, function()
Details.RefreshUserList (true)
end)
C_Timer.After (1.3, function()
C_Timer.After(1.3, function()
Details.RefreshUserList (true)
end)
C_Timer.After (1.6, function()
C_Timer.After(1.6, function()
Details.RefreshUserList (true)
end)
C_Timer.After (3, function()
C_Timer.After(3, function()
Details.RefreshUserList (true)
end)
C_Timer.After (4, function()
C_Timer.After(4, function()
Details.RefreshUserList (true)
end)
C_Timer.After (5, function()
C_Timer.After(5, function()
Details.RefreshUserList (true)
end)
C_Timer.After (8, function()
C_Timer.After(8, function()
Details.RefreshUserList (true)
end)
@@ -933,7 +933,7 @@ function SlashCmdList.DETAILS (msg, editbox)
t = tonumber (t)
if (not t) then
return print ("not T found.")
return print("not T found.")
end
local f = _detalhes.ListPanel
@@ -949,7 +949,7 @@ function SlashCmdList.DETAILS (msg, editbox)
f:add (name, i)
end
print (i, "names found.")
print(i, "names found.")
f:Show()
@@ -959,7 +959,7 @@ function SlashCmdList.DETAILS (msg, editbox)
t = tonumber (t)
if (not t) then
return print ("not T found.")
return print("not T found.")
end
local f = _detalhes.ListPanel
@@ -968,7 +968,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
local container = _detalhes.tabela_vigente [t]._ActorTable
print (#container, "actors found.")
print(#container, "actors found.")
for index, actor in ipairs(container) do
f:add (actor.nome, index, filter)
end
@@ -977,7 +977,7 @@ function SlashCmdList.DETAILS (msg, editbox)
--debug
elseif (msg == "save") then
print ("running... this is a debug command, details wont work until next /reload.")
print("running... this is a debug command, details wont work until next /reload.")
_detalhes:PrepareTablesForSave()
elseif (msg == "buffs") then
@@ -986,7 +986,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (not name) then
return
end
print (spellid, name)
print(spellid, name)
end
elseif (msg == "id") then
@@ -1012,21 +1012,21 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (command == "debug") then
if (_detalhes.debug) then
_detalhes.debug = false
print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned off.")
print(Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned off.")
return
else
_detalhes.debug = true
print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned on.")
print(Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned on.")
if (rest and rest ~= "") then
if (rest == "-clear") then
_detalhes_global.debug_chr_log = ""
print (Loc ["STRING_DETAILS1"] .. "log for characters has been wiped.")
print(Loc ["STRING_DETAILS1"] .. "log for characters has been wiped.")
return
end
_detalhes.debug_chr = rest
_detalhes_global.debug_chr_log = _detalhes_global.debug_chr_log or ""
print (Loc ["STRING_DETAILS1"] .. "diagnostic for character " .. rest .. " turned on.")
print(Loc ["STRING_DETAILS1"] .. "diagnostic for character " .. rest .. " turned on.")
return
end
end
@@ -1035,11 +1035,11 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "combatlog") then
if (_detalhes.isLoggingCombat) then
LoggingCombat (false)
print ("Wow combatlog record turned OFF.")
print("Wow combatlog record turned OFF.")
_detalhes.isLoggingCombat = nil
else
LoggingCombat (true)
print ("Wow combatlog record turned ON.")
print("Wow combatlog record turned ON.")
_detalhes.isLoggingCombat = true
end
@@ -1065,7 +1065,7 @@ function SlashCmdList.DETAILS (msg, editbox)
BigWigs.RegisterMessage(addon, "BigWigs_Message")
function addon:BigWigs_Message(event, module, key, text)
if module.journalId == 1197 and text:match("^Phase %d$") then -- 1197 = Margok
print ("Phase Changed!", event, module, key, text)
print("Phase Changed!", event, module, key, text)
end
end
@@ -1091,7 +1091,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local instancia = _detalhes.tabela_instancias [1]
for _, barra in ipairs(instancia.barras) do
local _, _, flags = barra.lineText1:GetFont()
print ("outline:",flags)
print("outline:",flags)
end
elseif (msg == "sell") then
@@ -1107,7 +1107,7 @@ function SlashCmdList.DETAILS (msg, editbox)
q = i[2]
c = c+v[11]*q
UseContainerItem (b, s)
print (n, q)
print(n, q)
end
end
end
@@ -1122,7 +1122,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local itemName, itemLink, itemRarity, itemLevel, _, itemType, itemSubType = GetItemInfo (itemLink)
if (itemType == "Armor" or itemType == "Weapon") then --a weapon or armor
if (itemLevel < 460) then
print ("Selling", itemName, itemType)
print("Selling", itemName, itemType)
UseContainerItem (b, s)
end
end
@@ -1167,7 +1167,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local name, description, encounterID, rootSectionID, link = DetailsFramework.EncounterJournal.EJ_GetEncounterInfoByIndex (i, 669)
if (name) then
DetailsFramework.EncounterJournal.EJ_SelectEncounter (encounterID)
print (name, encounterID, DetailsFramework.EncounterJournal.EJ_GetNumLoot())
print(name, encounterID, DetailsFramework.EncounterJournal.EJ_GetNumLoot())
for o = 1, DetailsFramework.EncounterJournal.EJ_GetNumLoot() do
local name, icon, slot, armorType, itemID, link, encounterID = DetailsFramework.EncounterJournal.EJ_GetLootInfoByIndex (o)
@@ -1178,7 +1178,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
end
print ("total loot", total)
print("total loot", total)
_detalhes_global.ALOOT = r
elseif (msg == "ilvl" or msg == "itemlevel" or msg == "ilevel") then
@@ -1193,7 +1193,7 @@ function SlashCmdList.DETAILS (msg, editbox)
["INVTYPE_RANGEDRIGHT"] = true,
}
_detalhes:Msg ("======== Item Level Debug ========")
_detalhes:Msg("======== Item Level Debug ========")
for equip_id = 1, 17 do
if (equip_id ~= 4) then --shirt slot
@@ -1202,7 +1202,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local _, _, itemRarity, iLevel, _, _, _, _, equipSlot = GetItemInfo (item)
if (iLevel) then
item_level = item_level + iLevel
print (iLevel, item)
print(iLevel, item)
--16 = main hand 17 = off hand
-- if using a two-hand, ignore the off hand slot
if (equip_id == 16 and two_hand [equipSlot]) then
@@ -1220,7 +1220,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
local average = item_level / item_amount
_detalhes:Msg ("gear score: " .. item_level, "| item amount:", item_amount, "| ilvl:", average)
_detalhes:Msg("gear score: " .. item_level, "| item amount:", item_amount, "| ilvl:", average)
_detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
@@ -1245,7 +1245,7 @@ function SlashCmdList.DETAILS (msg, editbox)
bar:SetTimer (start, fim)
--C_Timer.After (5, function() bar:CancelTimerBar() end)
--C_Timer.After(5, function() bar:CancelTimerBar() end)
elseif (msg == "q") then
@@ -1262,9 +1262,9 @@ function SlashCmdList.DETAILS (msg, editbox)
if (myframe.texture:IsShown()) then
myframe.texture:Hide()
else
print (myframe.texture:GetTexture())
print(myframe.texture:GetTexture())
myframe.texture:Show()
print (myframe.texture:GetTexture())
print(myframe.texture:GetTexture())
end
end
@@ -1286,7 +1286,7 @@ function SlashCmdList.DETAILS (msg, editbox)
local a = CreateFrame("statusbar", nil, UIParent)
a:SetPoint("topleft", UIParent, "topleft", i*32, y)
a:SetSize(32, 32)
a:SetMinMaxValues (0, 1)
a:SetMinMaxValues(0, 1)
local texture = a:CreateTexture(nil, "overlay")
texture:SetSize(32, 32)
@@ -1299,9 +1299,9 @@ function SlashCmdList.DETAILS (msg, editbox)
-- /run for o=1,10 do local f=CreateFrame("frame");f:SetPoint("center");f:SetSize(300,300); local t=f:CreateTexture(nil,"overlay");t:SetAllPoints();f:SetScript("OnUpdate",function() t:SetTexture("Interface\\1024")end);end;
-- https://www.dropbox.com/s/ulyeqa2z0ummlu7/1024.tga?dl=0
local time = 0
local elapsedTime = 0
a:SetScript("OnUpdate", function(self, deltaTime)
time = time + deltaTime
elapsedTime = elapsedTime + deltaTime
--texture:SetSize(math.random (50, 300), math.random (50, 300))
--local spec = allspecs [math.random (#allspecs)]
@@ -1309,16 +1309,16 @@ function SlashCmdList.DETAILS (msg, editbox)
--texture:SetTexture([[Interface\Store\Store-Splash]])
--texture:SetTexture([[Interface\AddOns\Details\images\options_window]])
--texture:SetTexture([[Interface\CHARACTERFRAME\Button_BloodPresence_DeathKnight]])
--texture:SetTexCoord (unpack (_detalhes.class_specs_coords [spec]))
--texture:SetTexCoord (unpack(_detalhes.class_specs_coords [spec]))
--a:SetAlpha (abs (math.sin (time)))
--a:SetValue(abs (math.sin (time)))
--a:SetAlpha(abs(math.sin (time)))
--a:SetValue(abs(math.sin (time)))
end)
end
elseif (msg == "alert") then
--local instancia = _detalhes.tabela_instancias [1]
local f = function(a, b, c, d, e, f, g) print (a, b, c, d, e, f, g) end
local f = function(a, b, c, d, e, f, g) print(a, b, c, d, e, f, g) end
--instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {f, 1, 2, 3, 4, 5})
local lower_instance = _detalhes:GetLowerInstanceNumber()
@@ -1364,13 +1364,13 @@ function SlashCmdList.DETAILS (msg, editbox)
if (spec) then
local specID = DetailsFramework.GetSpecializationInfo (spec)
if (specID and specID ~= 0) then
print ("Current SpecID: ", specID)
print("Current SpecID: ", specID)
end
end
elseif (msg == "senditemlevel") then
_detalhes:SendCharacterData()
print ("Item level dispatched.")
print("Item level dispatched.")
elseif (msg == "talents") then
local talents = {}
@@ -1384,16 +1384,16 @@ function SlashCmdList.DETAILS (msg, editbox)
end
end
print ("talentID", "name", "texture", "selected", "available", "spellID", "unknown", "row", "column", "unknown", "unknown")
print("talentID", "name", "texture", "selected", "available", "spellID", "unknown", "row", "column", "unknown", "unknown")
for i = 1, #talents do
print (GetTalentInfoByID (talents [i]))
print(GetTalentInfoByID (talents [i]))
end
elseif (msg == "merge") then
--at this point, details! should not be in combat
if (_detalhes.in_combat) then
_detalhes:Msg ("already in combat, closing current segment.")
_detalhes:Msg("already in combat, closing current segment.")
_detalhes:SairDoCombate()
end
@@ -1428,7 +1428,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
newCombat.is_trash = false
_detalhes:Msg ("done merging, segments: " .. segmentsAdded .. ", total time: " .. DetailsFramework:IntegerToTimer (totalTime))
_detalhes:Msg("done merging, segments: " .. segmentsAdded .. ", total time: " .. DetailsFramework:IntegerToTimer (totalTime))
--[[ --mythic+ debug
--tag the segment as mythic overall segment
@@ -1466,10 +1466,10 @@ function SlashCmdList.DETAILS (msg, editbox)
--clear memory
collectgarbage()
_detalhes:InstanciaCallFunction (Details.FadeHandler.Fader, "in", nil, "barras")
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos)
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset)
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump)
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "in", nil, "barras")
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos)
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset)
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump)
_detalhes:RefreshMainWindow(-1, true)
elseif (msg == "ej") then
@@ -1489,13 +1489,13 @@ function SlashCmdList.DETAILS (msg, editbox)
while (nextID [1]) do
--get the deepest section in the hierarchy
local ID = tremove (nextID)
local ID = tremove(nextID)
local sectionInfo = C_EncounterJournal.GetSectionInfo (ID)
if (sectionInfo) then
tinsert(result, sectionInfo)
if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
if (sectionInfo.spellID and type(sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
tinsert(spellIDs, sectionInfo.spellID)
end
@@ -1541,17 +1541,17 @@ function SlashCmdList.DETAILS (msg, editbox)
end
elseif (msg == "9") then
print ("skin:", Details.skin)
print ("current profile:", _detalhes:GetCurrentProfileName())
print ("always use profile:", _detalhes.always_use_profile)
print ("profile name:", _detalhes.always_use_profile_name)
print ("version:", _detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
print("skin:", Details.skin)
print("current profile:", _detalhes:GetCurrentProfileName())
print("always use profile:", _detalhes.always_use_profile)
print("profile name:", _detalhes.always_use_profile_name)
print("version:", _detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
elseif (msg == "record") then
_detalhes.ScheduleLoadStorage()
_detalhes.TellDamageRecord = C_Timer.NewTimer (0.6, _detalhes.PrintEncounterRecord)
_detalhes.TellDamageRecord = C_Timer.NewTimer(0.6, _detalhes.PrintEncounterRecord)
_detalhes.TellDamageRecord.Boss = 2032
_detalhes.TellDamageRecord.Diff = 16
@@ -1617,15 +1617,15 @@ function SlashCmdList.DETAILS (msg, editbox)
t1, t2 = t1.t1, t1.t2
end
for key, value in pairs(t2) do
if (not ignoredKeys [key] and type (value) ~= "function") then
if (not ignoredKeys [key] and type(value) ~= "function") then
if (key == "targets") then
t1 [key] = {}
elseif (type(value) == "table") then
t1 [key] = t1 [key] or {}
--print (key, value)
--local d = C_Timer.NewTimer (1, f.copy)
--print(key, value)
--local d = C_Timer.NewTimer(1, f.copy)
--d.t1 = t1 [key]
--d.t2 = t2 [key]
--d.Timer = true
@@ -1647,7 +1647,7 @@ function SlashCmdList.DETAILS (msg, editbox)
--the segment received is raw and does not have metatables, need to refresh them
local zipData = Details:CompressData (copySegment, "print")
--print (zipData)
--print(zipData)
--Details:Dump (keys)
Details:Dump ({zipData})
else
@@ -1660,38 +1660,38 @@ function SlashCmdList.DETAILS (msg, editbox)
--check if the line passed is a parameters in the default profile
if (_detalhes.default_profile [command]) then
if (rest and (rest ~= "" and rest ~= " ")) then
local whichType = type (_detalhes.default_profile [command])
local whichType = type(_detalhes.default_profile [command])
--attempt to cast the passed value to the same value as the type in the profile
if (whichType == "number") then
rest = tonumber (rest)
if (rest) then
_detalhes [command] = rest
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
else
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a number")
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a number")
end
elseif (whichType == "string") then
rest = tostring (rest)
if (rest) then
_detalhes [command] = rest
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
else
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a string")
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a string")
end
elseif (whichType == "boolean") then
if (rest == "true") then
_detalhes [command] = true
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to true")
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to true")
elseif (rest == "false") then
_detalhes [command] = false
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to false")
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to false")
else
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects true or false")
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects true or false")
end
end
@@ -1700,7 +1700,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (type(value) == "boolean") then
value = value and "true" or "false"
end
print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' current value is: " .. value)
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' current value is: " .. value)
end
return
@@ -1708,15 +1708,15 @@ function SlashCmdList.DETAILS (msg, editbox)
end
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_SHOW"] .. " " .. Loc ["STRING_SLASH_HIDE"] .. " " .. Loc ["STRING_SLASH_TOGGLE"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_SHOWHIDETOGGLE_DESC"])
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_RESET"] .. "|r: " .. Loc ["STRING_SLASH_RESET_DESC"])
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
print ("|cffffaeae/details|r |cffffff33" .. "API" .. "|r: " .. Loc ["STRING_SLASH_API_DESC"])
print ("|cffffaeae/details|r |cffffff33" .. "me" .. "|r: open the player breakdown for you.") --localize-me
print ("|cffffaeae/details|r |cffffff33" .. "spells" .. "|r: list of spells already saw.") --localize-me
print("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_SHOW"] .. " " .. Loc ["STRING_SLASH_HIDE"] .. " " .. Loc ["STRING_SLASH_TOGGLE"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_SHOWHIDETOGGLE_DESC"])
print("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_RESET"] .. "|r: " .. Loc ["STRING_SLASH_RESET_DESC"])
print("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
print("|cffffaeae/details|r |cffffff33" .. "API" .. "|r: " .. Loc ["STRING_SLASH_API_DESC"])
print("|cffffaeae/details|r |cffffff33" .. "me" .. "|r: open the player breakdown for you.") --localize-me
print("|cffffaeae/details|r |cffffff33" .. "spells" .. "|r: list of spells already saw.") --localize-me
print("|cFFFFFF00DETAILS! VERSION|r:|cFFFFAA00" .. " " .. Details.GetVersionString())
print ("|cffffaeae/details|r |cffffff33" .. "version" .. "|r: copy version.")
print("|cffffaeae/details|r |cffffff33" .. "version" .. "|r: copy version.")
end
end
@@ -1758,7 +1758,7 @@ end
function Details:UpdateUserPanel (usersTable)
if (not Details.UserPanel) then
DetailsUserPanel = DetailsFramework:CreateSimplePanel (UIParent)
DetailsUserPanel = DetailsFramework:CreateSimplePanel(UIParent)
DetailsUserPanel:SetSize(707, 505)
DetailsUserPanel:SetTitle ("Details! Version Check")
DetailsUserPanel.Data = {}
@@ -1806,7 +1806,7 @@ function Details:UpdateUserPanel (usersTable)
local userTable = data [index]
if (userTable) then
local userName, userRealm, userVersion = unpack (userTable)
local userName, userRealm, userVersion = unpack(userTable)
if (not userShown[userName]) then
local line = self:GetLine(lineId)
line.UserNameText.text = userName
@@ -1821,17 +1821,17 @@ function Details:UpdateUserPanel (usersTable)
local lineOnEnter = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack (backdrop_color_is_critical_on_enter))
self:SetBackdropColor(unpack(backdrop_color_is_critical_on_enter))
else
self:SetBackdropColor(unpack (backdrop_color_on_enter))
self:SetBackdropColor(unpack(backdrop_color_on_enter))
end
end
local lineOnLeave = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack (backdrop_color_is_critical))
self:SetBackdropColor(unpack(backdrop_color_is_critical))
else
self:SetBackdropColor(unpack (backdrop_color))
self:SetBackdropColor(unpack(backdrop_color))
end
GameTooltip:Hide()
@@ -1843,7 +1843,7 @@ function Details:UpdateUserPanel (usersTable)
line:SetSize(scroll_width - 2, scroll_line_height)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdrop_color))
line:SetBackdropColor(unpack(backdrop_color))
DetailsFramework:Mixin (line, DetailsFramework.HeaderFunctions)
@@ -1895,7 +1895,7 @@ function Details:UpdateUserPanel (usersTable)
end
function _detalhes:CreateListPanel()
_detalhes.ListPanel = _detalhes.gump:NewPanel (UIParent, nil, "DetailsActorsFrame", nil, 300, 600)
_detalhes.ListPanel = _detalhes.gump:NewPanel(UIParent, nil, "DetailsActorsFrame", nil, 300, 600)
_detalhes.ListPanel:SetPoint("center", UIParent, "center", 300, 0)
_detalhes.ListPanel.barras = {}
@@ -1922,9 +1922,9 @@ function _detalhes:CreateListPanel()
container_barras:SetAllPoints(container_barras_window)
container_barras:SetWidth(500)
container_barras:SetHeight(150)
container_barras:EnableMouse (true)
container_barras:EnableMouse(true)
container_barras:SetResizable(false)
container_barras:SetMovable (true)
container_barras:SetMovable(true)
container_barras_window:SetWidth(460)
container_barras_window:SetHeight(550)
@@ -1935,7 +1935,7 @@ function _detalhes:CreateListPanel()
container_barras_window.slider:Altura (560)
container_barras_window.slider:cimaPoint (0, 1)
container_barras_window.slider:baixoPoint (0, -3)
container_barras_window.slider:SetFrameLevel (10)
container_barras_window.slider:SetFrameLevel(10)
container_barras_window.ultimo = 0