From 662308230637fa8bfa6b6d3d3dbb392e02ffc9a2 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sat, 6 Mar 2021 20:58:19 -0300 Subject: [PATCH] Check if the dispel amount is valid before work with the value --- classes/class_utility.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 2606b070..c0ff7a8a 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -1130,7 +1130,11 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) --> habilidade usada para dispelar local meus_dispells = {} for _spellid, _tabela in _pairs (habilidades) do - meus_dispells [#meus_dispells+1] = {_spellid, _math_floor (_tabela.dispell)} + if (_tabela.dispell) then + meus_dispells [#meus_dispells+1] = {_spellid, _math_floor (_tabela.dispell)} --_math_floor valor é nil, uma magia na tabela de dispel, sem dispel? + else + Details:Msg("D! table.dispell is invalid. spellId:", _spellid) + end end _table_sort (meus_dispells, _detalhes.Sort2)