Skip to content

Commit

Permalink
Spells: Ensure that Corruption and Seed of Corruption are interchange…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
insunaa authored and killerwife committed May 20, 2024
1 parent f3d2768 commit f1fc76f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5633,7 +5633,7 @@ bool Unit::RemoveNoStackAurasDueToAuraHolder(SpellAuraHolder* holder)
{
// holder cannot remove higher/stronger rank if it isn't from the same caster
// judgement excluded due to invalid comparison of dummy auras
if (specific != SPELL_JUDGEMENT && IsSimilarExistingAuraStronger(holder, existing)) // TROLOLO
if (!IsSpellSpecificInterchangeable(specific) && IsSimilarExistingAuraStronger(holder, existing)) // TROLOLO
return false;

if (!diminished && sSpellMgr.IsSpellAnotherRankOfSpell(spellId, existingSpellId) && sSpellMgr.IsSpellHigherRankOfSpell(existingSpellId, spellId))
Expand Down
12 changes: 12 additions & 0 deletions src/game/Spells/SpellMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,18 @@ inline bool IsSpellSpecificIdentical(SpellSpecific specific, SpellSpecific speci
return false;
}

inline bool IsSpellSpecificInterchangeable(SpellSpecific specific)
{
switch (specific)
{
case SPELL_CORRUPTION_DEBUFF:
case SPELL_JUDGEMENT:
return true;
default: break;
}
return false;
}

inline bool IsSimilarAuraEffect(SpellEntry const* entry, uint32 effect, SpellEntry const* entry2, uint32 effect2)
{
return (entry2->EffectApplyAuraName[effect2] && entry->EffectApplyAuraName[effect] &&
Expand Down

0 comments on commit f1fc76f

Please sign in to comment.