- Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ("MONOCHROME").

- Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.
- Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.
This commit is contained in:
Tercio
2017-01-23 11:09:06 -02:00
parent d76f92a0eb
commit da8cd0359e
5 changed files with 57 additions and 10 deletions
+7 -3
View File
File diff suppressed because one or more lines are too long
+23 -6
View File
@@ -3151,16 +3151,18 @@ function _detalhes:envia_relatorio (linhas, custom)
local segmento = self.segmento
local luta = nil
local combatObject
if (not custom) then
if (not linhas[1]) then
return _detalhes:Msg (Loc ["STRING_ACTORFRAME_NOTHING"])
end
if (segmento == -1) then --overall
--luta = Loc ["STRING_REPORT_LAST"] .. " " .. #_detalhes.tabela_historico.tabelas .. " " .. Loc ["STRING_REPORT_FIGHTS"]
luta = _detalhes.tabela_overall.overall_enemy_name
combatObject = _detalhes.tabela_overall
elseif (segmento == 0) then --current
@@ -3186,6 +3188,9 @@ function _detalhes:envia_relatorio (linhas, custom)
if (not luta) then
luta = _detalhes.segmentos.current
end
combatObject = _detalhes.tabela_vigente
else
if (segmento == 1) then
@@ -3212,6 +3217,8 @@ function _detalhes:envia_relatorio (linhas, custom)
luta = Loc ["STRING_REPORT_LASTFIGHT"]
end
combatObject = _detalhes.tabela_historico.tabelas[1]
else
if (_detalhes.tabela_historico.tabelas[segmento].is_boss) then
@@ -3236,20 +3243,30 @@ function _detalhes:envia_relatorio (linhas, custom)
if (not luta) then
luta = " (" .. segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. ")"
end
combatObject = _detalhes.tabela_historico.tabelas[segmento]
end
end
linhas[1] = linhas[1] .. " " .. Loc ["STRING_REPORT"] .. " " .. luta
end
if (_detalhes.time_type == 2) then
linhas[1] = linhas[1] .. " (Ef)"
else
linhas[1] = linhas[1] .. " (Ac)"
--adicionar o tempo de luta
local segmentTime = ""
if (combatObject) then
local time = combatObject:GetCombatTime()
segmentTime = _detalhes.gump:IntegerToTimer (time or 0)
end
--effective ou active time
if (_detalhes.time_type == 2) then
linhas[1] = linhas[1] .. " [" .. segmentTime .. " EF]"
else
linhas[1] = linhas[1] .. " [" .. segmentTime .. " AC]"
end
local editbox = _detalhes.janela_report.editbox
if (editbox.focus) then --> não precionou enter antes de clicar no okey
local texto = _detalhes:trim (editbox:GetText())
+22
View File
@@ -745,10 +745,32 @@ end
outline = "THICKOUTLINE"
end
end
if (_detalhes.force_font_outline ~= "") then
if (_detalhes.force_font_outline == "OUTLINE") then
outline = "OUTLINE"
elseif (_detalhes.force_font_outline == "THICKOUTLINE") then
outline = "THICKOUTLINE"
elseif (_detalhes.force_font_outline == "MONOCHROME") then
outline = "MONOCHROME"
end
end
fontString:SetFont (fonte, size, outline)
end
function _detalhes:UseOutline (outline)
outline = outline or ""
_detalhes.force_font_outline = outline
for ID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
instance:RefreshBars()
instance:InstanceReset()
instance:ReajustaGump()
end
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal functions
+4 -1
View File
@@ -1059,8 +1059,11 @@ _detalhes.default_profile = default_profile
-- aqui fica as propriedades do jogador que não serão armazenadas no profile
local default_player_data = {
--> force all fonts to have this outline
force_font_outline = "",
--> current combat number
cached_specs = {},
cached_talents = {},
+1
View File
@@ -6133,6 +6133,7 @@ local build_segment_list = function (self, elapsed)
local thisCombat = _detalhes.tabela_vigente
local encounter_name = thisCombat.is_boss.encounter
local instanceID = thisCombat.is_boss.ej_instance_id
instanceID = tonumber (instanceID)
if (encounter_name and instanceID) then
local index, name, description, encounterID, rootSectionID, link = _detalhes:GetEncounterInfoFromEncounterName (instanceID, encounter_name)
if (index and name and encounterID) then