- Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.

- Effective time will automatically be used when inside a battleground and using sync from the score board.
- Added 'hide all' option on the minimap menu.
This commit is contained in:
Tercio
2015-05-30 17:28:10 -03:00
parent 1113bfe3d2
commit 4f6f24ea04
9 changed files with 136 additions and 45 deletions
+9 -4
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -495,6 +495,10 @@
self._ActorTable [size] = novo_objeto --> grava na tabela de indexes
self._NameIndexTable [nome] = size --> grava no hash map o index deste jogador
if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then
novo_objeto.pvp = true
end
return novo_objeto, dono_do_pet, nome
else
return nil, nil, nil
+3 -2
View File
@@ -546,8 +546,9 @@
local tempo_do_combate = _detalhes.tabela_vigente:GetCombatTime()
local invalid_combat
--if ( tempo_do_combate >= _detalhes.minimum_combat_time) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
if ( tempo_do_combate >= 5 or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
--if ( tempo_do_combate >= ) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
--if ( tempo_do_combate >= 5 or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
if ( tempo_do_combate >= _detalhes.minimum_combat_time or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico
_detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico
else
--print ("combat invalid...")
+21 -6
View File
@@ -2888,6 +2888,8 @@
_detalhes.last_zone_type = zoneType
end
_detalhes.time_type = _detalhes.time_type_original
_detalhes:CheckChatOnZoneChange (zoneType)
if (_detalhes.debug) then
@@ -2900,6 +2902,7 @@
if (_detalhes.is_in_battleground and zoneType ~= "pvp") then
_detalhes.pvp_parser_frame:StopBgUpdater()
_detalhes.is_in_battleground = nil
_detalhes.time_type = _detalhes.time_type_original
end
if (zoneType == "pvp") then
@@ -2920,8 +2923,19 @@
_current_combat.pvp = true
_current_combat.is_pvp = {name = zoneName, mapid = zoneMapID}
_detalhes.pvp_parser_frame:StartBgUpdater()
if (_detalhes.use_battleground_server_parser) then
if (_detalhes.time_type == 1) then
_detalhes.time_type_original = 1
_detalhes.time_type = 2
end
_detalhes.pvp_parser_frame:StartBgUpdater()
else
if (_detalhes.force_activity_time_pvp) then
_detalhes.time_type_original = _detalhes.time_type
_detalhes.time_type = 1
end
end
elseif (zoneType == "arena") then
@@ -2929,6 +2943,11 @@
_detalhes:Msg ("(debug) zone type is arena.")
end
if (_detalhes.force_activity_time_pvp) then
_detalhes.time_type_original = _detalhes.time_type
_detalhes.time_type = 1
end
_detalhes.is_in_arena = true
_detalhes:EnteredInArena()
@@ -3717,10 +3736,6 @@
function _detalhes.pvp_parser_frame:StartBgUpdater()
if (not _detalhes.use_battleground_server_parser) then
return
end
_detalhes.pvp_parser_frame:RegisterEvent ("UPDATE_BATTLEFIELD_SCORE")
if (_detalhes.pvp_parser_frame.ticker) then
_detalhes:CancelTimer (_detalhes.pvp_parser_frame.ticker)
+91 -32
View File
@@ -19,19 +19,32 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local _tempo = _time()
local _tempo = _time()
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
timeMachine.ligada = false
function timeMachine:Core()
_tempo = _time()
_detalhes._tempo = _tempo
_detalhes:UpdateGears()
local calc_for_pvp = function (self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs (tabela) do
if (jogador) then
if (jogador.last_event+3 > _tempo) then --> okey o jogador esta dando dps
if (jogador.on_hold) then --> o dps estava pausado, retornar a ativa
jogador:HoldOn (false)
end
else
if (not jogador.on_hold) then --> não ta pausado, precisa por em pausa
--> verifica se esta castando alguma coisa que leve + que 3 segundos
jogador:HoldOn (true)
end
end
end
end
end
end
local calc_for_pve = function (self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs (tabela) do
if (jogador) then
@@ -49,6 +62,18 @@
end
end
end
function timeMachine:Core()
_tempo = _time()
_detalhes._tempo = _tempo
_detalhes:UpdateGears()
if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then
return calc_for_pvp (self)
else
return calc_for_pve (self)
end
end
function timeMachine:Ligar()
self.atualizador = self:ScheduleRepeatingTimer ("Core", 1)
@@ -125,33 +150,67 @@
end
function _detalhes:Tempo()
if (self.end_time) then --> o tempo do jogador esta trancado
local t = self.end_time - self.start_time
if (t < 10) then
t = 10
end
return t
elseif (self.on_hold) then --> o tempo esta em pausa
local t = self.delay - self.start_time
if (t < 10) then
t = 10
end
return t
else
if (self.start_time == 0) then
return 10
end
local t = _tempo - self.start_time
if (t < 10) then
if (_detalhes.in_combat) then
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time < 10) then
return combat_time
end
if (self.pvp) then
--> pvp timer
if (self.end_time) then --> o tempo do jogador esta trancado
local t = self.end_time - self.start_time
if (t < 3) then
t = 3
end
t = 10
return t
elseif (self.on_hold) then --> o tempo esta em pausa
local t = self.delay - self.start_time
if (t < 3) then
t = 3
end
return t
else
if (self.start_time == 0) then
return 3
end
local t = _tempo - self.start_time
if (t < 3) then
if (_detalhes.in_combat) then
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time < 3) then
return combat_time
end
end
t = 3
end
return t
end
else
--> pve timer
if (self.end_time) then --> o tempo do jogador esta trancado
local t = self.end_time - self.start_time
if (t < 10) then
t = 10
end
return t
elseif (self.on_hold) then --> o tempo esta em pausa
local t = self.delay - self.start_time
if (t < 10) then
t = 10
end
return t
else
if (self.start_time == 0) then
return 10
end
local t = _tempo - self.start_time
if (t < 10) then
if (_detalhes.in_combat) then
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time < 10) then
return combat_time
end
end
t = 10
end
return t
end
return t
end
end
+5 -1
View File
@@ -2704,11 +2704,15 @@
--> nova instancia
GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true)
GameCooltip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 16, 16)
--GameCooltip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 10, 10, 4/16, 12/16, 4/16, 12/16)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\icons]], 1, 1, 12, 11, 462/512, 473/512, 1/512, 11/512)
--> reopen all windows
GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Green]], 1, 1, 14, 14, 0.1875, 0.8125, 0.84375, 0.15625)
--> close all windows
GameCooltip:AddMenu (1, _detalhes.ShutDownAllInstances, true, nil, nil, Loc ["STRING_MINIMAPMENU_CLOSEALL"], nil, true)
GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Red]], 1, 1, 14, 14, 0.1875, 0.8125, 0.15625, 0.84375)
GameCooltip:AddLine ("$div")
+2
View File
@@ -889,6 +889,7 @@ local default_profile = {
scroll_speed = 2,
update_speed = 1,
time_type = 2,
time_type_original = 2,
memory_threshold = 3,
memory_ram = 64,
remove_realm_from_name = true,
@@ -937,6 +938,7 @@ local default_profile = {
close_shields = false,
pvp_as_group = true,
use_battleground_server_parser = true,
force_activity_time_pvp = true,
--> skins
standard_skin = false,
+1
View File
@@ -4156,6 +4156,7 @@ function window:CreateFrame2()
--
local onSelectTimeType = function (_, _, timetype)
_detalhes.time_type = timetype
_detalhes.time_type_original = timetype
_detalhes:AtualizaGumpPrincipal (-1, true)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
BIN
View File
Binary file not shown.