Skip to content

Commit

Permalink
Merge pull request #575 from Flamanis/Combine-non-combat-starting-spe…
Browse files Browse the repository at this point in the history
…ll-lists

Use single table for spell lookup when avoiding starting combat
  • Loading branch information
Tercioo authored Jul 31, 2023
2 parents c464282 + c52f71c commit a28fd29
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,24 @@
Details.SpecialSpellActorsName[Details.NeltharusWeaponActorName] = Details.NeltharusWeaponActorSpellId
end

--Damage spells that trigger outside of combat, which we don't want to have start a combat.
--387846 Fel Armor
--352561 Undulating Maneuvers
--111400 warlock's burning rush
--368637 is buff from trinket "Scars of Fraternal Strife" which make the player bleed even out-of-combat
--371070 is "Iced Phial of Corrupting Rage" effect triggers randomly, even out-of-combat
--401394 is "Vessel of Seared Shadows" trinket
--146739 is corruption that doesn't expire

local spells_cant_start_combat = {
[387846] = true,
[352561] = true,
[111400] = true,
[371070] = true,
[368637] = true,
[401394] = true,
[146739] = true,
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internal functions

Expand Down Expand Up @@ -834,8 +852,8 @@
(not Details.in_group and sourceFlags and bitBand(sourceFlags, AFFILIATION_GROUP) ~= 0)
)
) then
--avoid Fel Armor and Undulating Maneuvers from starting a combat.
if ((spellId == 387846 or spellId == 352561) and sourceName == Details.playername) then

if (spells_cant_start_combat[spellId] and sourceName == Details.playername) then
return
end

Expand All @@ -860,17 +878,7 @@
else
--entrar em combate se for dot e for do jogador e o ultimo combate ter sido a mais de 10 segundos atr�s
if (token == "SPELL_PERIODIC_DAMAGE" and sourceName == Details.playername) then
--ignora burning rush se o jogador estiver fora de combate
--111400 warlock's burning rush
--368637 is buff from trinket "Scars of Fraternal Strife" which make the player bleed even out-of-combat
--371070 is "Iced Phial of Corrupting Rage" effect triggers randomly, even out-of-combat
--401394 is "Vessel of Seared Shadows" trinket
if (spellId == 111400 or spellId == 371070 or spellId == 368637 or spellId == 401394) then
return
end

--warlock corruption dot that never expires
if (spellId == 146739) then
if (spells_cant_start_combat[spellId]) then
return
end

Expand Down

0 comments on commit a28fd29

Please sign in to comment.