General fixes

This commit is contained in:
Tercio Jose
2022-11-01 19:45:51 -03:00
parent 05cf03783a
commit 45a980023c
15 changed files with 93 additions and 74 deletions
+9 -17
View File
@@ -8,10 +8,6 @@
local isTBC = DetailsFramework.IsTBCWow()
local isWOTLK = DetailsFramework.IsWotLKWow()
Details.UnregisteredTokens = {}
Details.IgnoredDamageEvents = {}
Details.RogueRaceCache = {}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
@@ -662,14 +658,12 @@
if (who_serial == "") then
if (who_flags and bitBand(who_flags, OBJECT_TYPE_PETS) ~= 0) then -- um pet
--pets must have a serial
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"INVALID SERIAL", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return
end
end
if (not alvo_name) then
--no target name, just quit
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"INVALID TARGET", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return
elseif (not who_name) then
@@ -681,7 +675,6 @@
--check if the spell isn't in the backlist
if (damage_spells_to_ignore[spellid]) then
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"SPELL IGNORED", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return
end
@@ -4853,6 +4846,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
function _detalhes:CallWipe (from_slash)
Details:Msg("Wipe has been called by your raid leader.")
if (_detalhes.wipe_called) then
if (from_slash) then
return _detalhes:Msg(Loc ["STRING_WIPE_ERROR1"])
@@ -5077,6 +5072,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:Msg("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.")
end
C_Timer.After(1, function()
if (C_CVar.GetCVar("AdvancedCombatLogging") == "1") then
Details:Msg("you have Advanced Combat Logging enabled, your numbers might be different of other players (bug in the game).")
end
end)
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
if (_detalhes.latest_ENCOUNTER_END + 10 > GetTime()) then
return
@@ -5949,9 +5950,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local func = token_list[token]
if (func) then
return func(nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
else
Details.UnregisteredTokens[token] = {time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12}
return
end
end
@@ -6095,12 +6093,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]) then
auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]
end
local _, class = UnitClass("raid"..i)
if (class == "ROGUE") then
local _, race = UnitRace("raid"..i)
Details.RogueRaceCache[name] = race
end
end
elseif (IsInGroup()) then
@@ -6469,4 +6461,4 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end
end
end
end