[Spells] AE Duration effect (Rains) will now work with Target Ring and PBAE spells. (#2000)

* done

* Update beacon.cpp

* [Spells] AE Duration effect (Rains) will now work with Target Ring and PBAE spells.

Mackals suggestions implemented.
This commit is contained in:
KayenEQ
2022-02-16 10:12:13 -05:00
committed by GitHub
parent 8ec80644ee
commit ba3c19ad0b
5 changed files with 47 additions and 19 deletions
+1
View File
@@ -412,6 +412,7 @@ RULE_BOOL(Spells, DOTsScaleWithSpellDmg, false, "Allow SpellDmg stat to affect D
RULE_BOOL(Spells, HOTsScaleWithHealAmt, false, "Allow HealAmt stat to affect HoT spells")
RULE_BOOL(Spells, CompoundLifetapHeals, true, "True: Lifetap heals calculate damage bonuses and then heal bonuses. False: Lifetaps heal using the amount damaged to mob.")
RULE_BOOL(Spells, UseFadingMemoriesMaxLevel, false, "Enables to limit field in spell data to set the max level that over which an NPC will ignore fading memories effect and not lose aggro.")
RULE_BOOL(Spells, FixBeaconHeading, false, "Beacon spells use casters heading to fix live bug. False: Live like heading always 0.")
RULE_CATEGORY_END()
RULE_CATEGORY(Combat)
+12 -3
View File
@@ -364,10 +364,19 @@ bool IsImprovedDamageSpell(uint16 spell_id)
bool IsAEDurationSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) &&
(spells[spell_id].target_type == ST_AETarget || spells[spell_id].target_type == ST_UndeadAE) &&
spells[spell_id].aoe_duration != 0)
/*
There are plenty of spells with aoe_duration set at single digit numbers, but these
do not act as duration effects.
*/
if (IsValidSpell(spell_id) &&
spells[spell_id].aoe_duration >= 2500 &&
( spells[spell_id].target_type == ST_AETarget ||
spells[spell_id].target_type == ST_UndeadAE ||
spells[spell_id].target_type == ST_AECaster ||
spells[spell_id].target_type == ST_Ring)
) {
return true;
}
return false;
}