Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Apr 11, 2022
1 parent 80612f2 commit 7762e29
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
26 changes: 20 additions & 6 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7762e29

Please sign in to comment.