8.3.0 > 9.0.1
This commit is contained in:
+14
-63
@@ -457,60 +457,11 @@
|
||||
_detalhes.atributo_energy:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_misc:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_custom:UpdateSelectedToKFunction()
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
Details:RefreshMainWindow(-1, true)
|
||||
end
|
||||
|
||||
--------end of ToK functions----
|
||||
|
||||
--from weakauras, list of functions to block on scripts
|
||||
--source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66
|
||||
local blockedFunctions = {
|
||||
-- Lua functions that may allow breaking out of the environment
|
||||
getfenv = true,
|
||||
getfenv = true,
|
||||
loadstring = true,
|
||||
pcall = true,
|
||||
xpcall = true,
|
||||
getglobal = true,
|
||||
|
||||
-- blocked WoW API
|
||||
SendMail = true,
|
||||
SetTradeMoney = true,
|
||||
AddTradeMoney = true,
|
||||
PickupTradeMoney = true,
|
||||
PickupPlayerMoney = true,
|
||||
TradeFrame = true,
|
||||
MailFrame = true,
|
||||
EnumerateFrames = true,
|
||||
RunScript = true,
|
||||
AcceptTrade = true,
|
||||
SetSendMailMoney = true,
|
||||
EditMacro = true,
|
||||
SlashCmdList = true,
|
||||
DevTools_DumpCommand = true,
|
||||
hash_SlashCmdList = true,
|
||||
CreateMacro = true,
|
||||
SetBindingMacro = true,
|
||||
GuildDisband = true,
|
||||
GuildUninvite = true,
|
||||
securecall = true,
|
||||
|
||||
--additional
|
||||
setmetatable = true,
|
||||
}
|
||||
|
||||
local functionFilter = setmetatable ({}, {__index = function (env, key)
|
||||
if (key == "_G") then
|
||||
return env
|
||||
|
||||
elseif (blockedFunctions [key]) then
|
||||
return nil
|
||||
|
||||
else
|
||||
return _G [key]
|
||||
end
|
||||
end})
|
||||
|
||||
--> replacing data for custom texts
|
||||
_detalhes.string = {}
|
||||
|
||||
@@ -530,7 +481,7 @@
|
||||
_detalhes:Msg ("|cFFFF9900error compiling script on custom text|r: ", errortext)
|
||||
return 0
|
||||
end
|
||||
setfenv (func, functionFilter)
|
||||
DetailsFramework:SetEnvironment(func)
|
||||
function_cache [str] = func
|
||||
end
|
||||
|
||||
@@ -1372,32 +1323,32 @@ end
|
||||
|
||||
function _detalhes:name_space (barra)
|
||||
--if (barra.icone_secundario_ativo) then
|
||||
-- local tamanho = barra:GetWidth()-barra.texto_direita:GetStringWidth()-16-barra:GetHeight()
|
||||
-- barra.texto_esquerdo:SetSize (tamanho-2, 15)
|
||||
-- local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16-barra:GetHeight()
|
||||
-- barra.lineText1:SetSize (tamanho-2, 15)
|
||||
--else
|
||||
barra.texto_esquerdo:SetSize (barra:GetWidth()-barra.texto_direita:GetStringWidth()-18, 15)
|
||||
barra.lineText1:SetSize (barra:GetWidth()-barra.lineText4:GetStringWidth()-18, 15)
|
||||
--end
|
||||
end
|
||||
|
||||
function _detalhes:name_space_info (barra)
|
||||
if (barra.icone_secundario_ativo) then
|
||||
local tamanho = barra:GetWidth()-barra.texto_direita:GetStringWidth()-16-barra:GetHeight()
|
||||
barra.texto_esquerdo:SetSize (tamanho-10, 15)
|
||||
local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16-barra:GetHeight()
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
else
|
||||
local tamanho = barra:GetWidth()-barra.texto_direita:GetStringWidth()-16
|
||||
barra.texto_esquerdo:SetSize (tamanho-10, 15)
|
||||
local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:name_space_generic (barra, separador)
|
||||
local texto_direita_tamanho = barra.texto_direita:GetStringWidth()
|
||||
local texto_direita_tamanho = barra.lineText4:GetStringWidth()
|
||||
local tamanho = barra:GetWidth()-texto_direita_tamanho-16
|
||||
if (separador) then
|
||||
barra.texto_esquerdo:SetSize (tamanho+separador, 10)
|
||||
barra.texto_direita:SetSize (texto_direita_tamanho+15, 10)
|
||||
barra.lineText1:SetSize (tamanho+separador, 10)
|
||||
barra.lineText4:SetSize (texto_direita_tamanho+15, 10)
|
||||
else
|
||||
barra.texto_esquerdo:SetSize (tamanho-10, 15)
|
||||
barra.texto_direita:SetSize (texto_direita_tamanho+5, 15)
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
barra.lineText4:SetSize (texto_direita_tamanho+5, 15)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user