mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Bug Fix] Correctly limit max targets of PBAOE (#4507)
* fix pbaoe max targets incorrectly set * fix scratch copy
This commit is contained in:
parent
448a33a60c
commit
ed2130f649
@ -515,6 +515,8 @@ RULE_BOOL(Spells, ManaTapsOnAnyClass, false, "Enabling this will allow you to ca
|
|||||||
RULE_INT(Spells, HealAmountMessageFilterThreshold, 100, "Lifetaps below this threshold will not have a message sent to the client (Heal will still process) 0 to Disable.")
|
RULE_INT(Spells, HealAmountMessageFilterThreshold, 100, "Lifetaps below this threshold will not have a message sent to the client (Heal will still process) 0 to Disable.")
|
||||||
RULE_BOOL(Spells, SnareOverridesSpeedBonuses, false, "Enabling will allow snares to override any speed bonuses the entity may have. Default: False")
|
RULE_BOOL(Spells, SnareOverridesSpeedBonuses, false, "Enabling will allow snares to override any speed bonuses the entity may have. Default: False")
|
||||||
RULE_INT(Spells, TargetedAOEMaxTargets, 4, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.")
|
RULE_INT(Spells, TargetedAOEMaxTargets, 4, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.")
|
||||||
|
RULE_INT(Spells, PointBlankAOEMaxTargets, 0, "Max number of targets a Point-Blank AOE spell can cast on. Set to 0 for no limit.")
|
||||||
|
RULE_INT(Spells, DefaultAOEMaxTargets, 4, "Max number of targets that an AOE spell which does not meet other descriptions can cast on. Set to 0 for no limit.")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Combat)
|
RULE_CATEGORY(Combat)
|
||||||
|
|||||||
@ -1096,7 +1096,7 @@ void EntityList::AESpell(
|
|||||||
max_targets = nullptr;
|
max_targets = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int max_targets_allowed = 4;
|
int max_targets_allowed = RuleI(Spells, DefaultAOEMaxTargets);;
|
||||||
if (max_targets) { // rains pass this in since they need to preserve the count through waves
|
if (max_targets) { // rains pass this in since they need to preserve the count through waves
|
||||||
max_targets_allowed = *max_targets;
|
max_targets_allowed = *max_targets;
|
||||||
} else if (spells[spell_id].aoe_max_targets) {
|
} else if (spells[spell_id].aoe_max_targets) {
|
||||||
@ -1109,6 +1109,12 @@ void EntityList::AESpell(
|
|||||||
!IsEffectInSpell(spell_id, SE_Mez)
|
!IsEffectInSpell(spell_id, SE_Mez)
|
||||||
) {
|
) {
|
||||||
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
|
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
|
||||||
|
} else if (
|
||||||
|
IsPBAENukeSpell(spell_id) &&
|
||||||
|
IsDetrimentalSpell &&
|
||||||
|
!is_npc
|
||||||
|
) {
|
||||||
|
max_targets_allowed = RuleI(Spells, PointBlankAOEMaxTargets);
|
||||||
}
|
}
|
||||||
|
|
||||||
int target_hit_counter = 0;
|
int target_hit_counter = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user