[Rules] Add ResurrectionEffectsBlock (#2990)

* [Rules] Add ResurrectionEffectsBlock

Notes:

This adds the rule Spells:ResurrectionEffectsBlock that will prevent anything from overwrites Resurrection Sickness Effects. Currently they are able to be overwritten by certain spells.

Default state: Disabled/False.

* Update ruletypes.h

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
nytmyr
2023-03-04 17:24:29 -06:00
committed by GitHub
parent c21d47f450
commit 65c14b160e
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -3161,6 +3161,11 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
}
if (sp2_value != sp1_value)
values_equal = false;
if (RuleB(Spells, ResurrectionEffectsBlock) && IsResurrectionEffects(spellid1)) {
LogSpells("ResurrectionEffectsBlock triggered -- [{}] is blocked by [{}]", sp2.name, sp1.name);
return -1; // can't stack
}
//we dont return here... a better value on this one effect dosent mean they are
//all better...