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
+12 -12
View File
@@ -8,7 +8,7 @@
--local pointers
local _table_insert = table.insert --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _math_floor = math.floor --lua local
local _time = time --lua local
@@ -27,8 +27,8 @@
timeMachine.ligada = false
local calc_for_pvp = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs(tabela) do
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
@@ -46,8 +46,8 @@
end
local calc_for_pve = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs(tabela) do
for tipo, tabela in _pairs(self.tabelas) do
for nome, jogador in ipairs(tabela) do
if (jogador) then
if (jogador.last_event+10 > _tempo) then --okey o jogador esta dando dps
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
@@ -82,7 +82,7 @@
self.tabelas = {{}, {}} --1 dano 2 cura
local danos = _detalhes.tabela_vigente[1]._ActorTable
for _, jogador in _ipairs(danos) do
for _, jogador in ipairs(danos) do
if (jogador.dps_started) then
jogador:RegistrarNaTimeMachine()
end
@@ -93,7 +93,7 @@
self.ligada = false
self.tabelas = nil
if (self.atualizador) then
self:CancelTimer (self.atualizador)
self:CancelTimer(self.atualizador)
self.atualizador = nil
end
end
@@ -130,10 +130,10 @@
end
function _detalhes:ManutencaoTimeMachine()
for tipo, tabela in _ipairs(timeMachine.tabelas) do
for tipo, tabela in ipairs(timeMachine.tabelas) do
local t = {}
local removed = 0
for index, jogador in _ipairs(tabela) do
for index, jogador in ipairs(tabela) do
if (jogador) then
t [#t+1] = jogador
jogador.timeMachine = #t
@@ -145,7 +145,7 @@
timeMachine.tabelas [tipo] = t
if (_detalhes.debug) then
--_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo)
--_detalhes:Msg("timemachine r"..removed.."| e"..#t.."| t"..tipo)
end
end
end
@@ -257,6 +257,6 @@
end
function _detalhes:PrintTimeMachineIndexes()
print ("timemachine damage", #timeMachine.tabelas [1])
print ("timemachine heal", #timeMachine.tabelas [2])
print("timemachine damage", #timeMachine.tabelas [1])
print("timemachine heal", #timeMachine.tabelas [2])
end