mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Spells] Add all types to checks for max_targets_allowed rule for AEs (#4682)
- Added all TargetedAE types to IsTargetableAESpell - Added IsTargetableAESpell to IsAnyAESpell and changed order for earlier escapes - IsPBAESpell now checks all PBAE types - The rule Spells, TargetedAOEMaxTargets will now check all Targeted AE types - The rule Spells, PointBlankAOEMaxTargets will now check all remaining types that can be a PBAE and not only Nuke PBAEs
This commit is contained in:
parent
3ba113a91d
commit
9aa0f7c695
@ -93,7 +93,14 @@ bool IsTargetableAESpell(uint16 spell_id)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return spells[spell_id].target_type == ST_AETarget;
|
return (
|
||||||
|
spells[spell_id].target_type == ST_AETarget ||
|
||||||
|
spells[spell_id].target_type == ST_TargetAETap ||
|
||||||
|
spells[spell_id].target_type == ST_AETargetHateList ||
|
||||||
|
spells[spell_id].target_type == ST_TargetAENoPlayersPets ||
|
||||||
|
spells[spell_id].target_type == ST_UndeadAE ||
|
||||||
|
spells[spell_id].target_type == ST_SummonedAE
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsSacrificeSpell(uint16 spell_id)
|
bool IsSacrificeSpell(uint16 spell_id)
|
||||||
@ -675,17 +682,19 @@ bool IsAnyNukeOrStunSpell(uint16 spell_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IsAnyAESpell(uint16 spell_id) {
|
bool IsAnyAESpell(uint16 spell_id) {
|
||||||
return (
|
if (!IsValidSpell(spell_id)) {
|
||||||
IsValidSpell(spell_id) &&
|
return false;
|
||||||
(
|
}
|
||||||
IsAEDurationSpell(spell_id) ||
|
|
||||||
IsAESpell(spell_id) ||
|
return (
|
||||||
IsAERainNukeSpell(spell_id) ||
|
IsTargetableAESpell(spell_id) ||
|
||||||
IsAERainSpell(spell_id) ||
|
IsAESpell(spell_id) ||
|
||||||
IsPBAESpell(spell_id) ||
|
IsPBAESpell(spell_id) ||
|
||||||
IsPBAENukeSpell(spell_id)
|
IsAEDurationSpell(spell_id) ||
|
||||||
)
|
IsAERainNukeSpell(spell_id) ||
|
||||||
);
|
IsAERainSpell(spell_id) ||
|
||||||
|
IsPBAENukeSpell(spell_id)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsAESpell(uint16 spell_id)
|
bool IsAESpell(uint16 spell_id)
|
||||||
@ -740,8 +749,8 @@ bool IsPBAESpell(uint16 spell_id)
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
spell.aoe_range > 0 &&
|
spell.aoe_range > 0 &&
|
||||||
spell.target_type == ST_AECaster
|
!IsTargetRequiredForSpell(spell_id)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1110,7 +1110,7 @@ void EntityList::AESpell(
|
|||||||
) {
|
) {
|
||||||
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
|
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
|
||||||
} else if (
|
} else if (
|
||||||
IsPBAENukeSpell(spell_id) &&
|
IsPBAESpell(spell_id) &&
|
||||||
IsDetrimentalSpell &&
|
IsDetrimentalSpell &&
|
||||||
!is_npc
|
!is_npc
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user