From 7762e29d0023ab25abda610c8851d2d490f12154 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 11 Apr 2022 15:52:24 -0300 Subject: [PATCH] More fixes --- boot.lua | 3 +++ core/parser.lua | 26 ++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/boot.lua b/boot.lua index e21d8f108..58326a408 100644 --- a/boot.lua +++ b/boot.lua @@ -431,6 +431,9 @@ do _detalhes.BitfieldSwapDebuffsIDs = {265646, 272407, 269691, 273401, 269131, 260900, 260926, 284995, 292826, 311367, 310567, 308996, 307832, 327414, 337253, 36797, 37122, 362397} + _detalhes.BitfieldSwapDebuffsSpellIDs = { + [360418] = true + } --> auto run code _detalhes.RunCodeTypes = { diff --git a/core/parser.lua b/core/parser.lua index fc0d80f30..f00a2035d 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -241,9 +241,8 @@ } end - local bitfield_debuffs_ids = _detalhes.BitfieldSwapDebuffsIDs local bitfield_debuffs = {} - for _, spellid in ipairs (bitfield_debuffs_ids) do + for _, spellid in ipairs (_detalhes.BitfieldSwapDebuffsIDs) do local spellname = GetSpellInfo(spellid) if (spellname) then bitfield_debuffs [spellname] = true @@ -252,6 +251,12 @@ end end + for spellId in pairs(_detalhes.BitfieldSwapDebuffsSpellIDs) do + bitfield_debuffs [spellId] = true + end + + Details.bitfield_debuffs_table = bitfield_debuffs + --tbc spell caches local TBC_PrayerOfMendingCache = {} local TBC_EarthShieldCache = {} @@ -1184,6 +1189,15 @@ end end end + + if (_current_encounter_id == 2543) then --malganis REMOVE ON 10.0 + if (bitfield_swap_cache [who_serial] or (meu_dono and bitfield_swap_cache [meu_dono.serial])) then + is_friendly_fire = false + + elseif (bitfield_swap_cache [alvo_serial] or (alvo_dono and bitfield_swap_cache [alvo_dono.serial])) then + is_friendly_fire = false + end + end else if ( (_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx @@ -2547,8 +2561,8 @@ parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname) end - if (bitfield_debuffs [spellname] and raid_members_cache [alvo_serial]) then - bitfield_swap_cache [alvo_serial] = true + if ((bitfield_debuffs[spellname] or bitfield_debuffs[spellid]) and raid_members_cache[alvo_serial]) then + bitfield_swap_cache[alvo_serial] = true end if (raid_members_cache [who_serial]) then @@ -3021,8 +3035,8 @@ end end - if (bitfield_debuffs [spellname] and alvo_serial) then - bitfield_swap_cache [alvo_serial] = nil + if ((bitfield_debuffs[spellname] or bitfield_debuffs[spellid]) and alvo_serial) then + bitfield_swap_cache[alvo_serial] = nil end if (_recording_ability_with_buffs) then