[Feature] Add adjustability for AERampage Range. (#3548)

* [Feature] Add adjustability for AERampage Range.

This functionality is needed for fights like Ture to be accurate, where their ramp range was 101% of their melee safe range.

Example in lua of utilizing this scripting

```
e.self:SetSpecialAbilityParam(SpecialAbility.area_rampage,8,101;
```

* Updates to address comments
This commit is contained in:
Fryguy
2023-08-20 00:36:06 -04:00
committed by GitHub
parent 00e02b61ca
commit 5631a0711f
6 changed files with 31 additions and 15 deletions
+4 -2
View File
@@ -714,8 +714,9 @@ void HateList::PrintHateListToClient(Client *c)
int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOptions *opts)
{
if (!target || !caster)
if (!target || !caster) {
return 0;
}
// tank will be hit ONLY if they are the only target on the hate list
// if there is anyone else on the hate list, the tank will not be hit, even if those others aren't hit either
@@ -730,9 +731,10 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
std::vector<uint16> id_list;
for (auto &h : list) {
if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target &&
caster->CombatRange(h->entity_on_hatelist, 1.0, true)) {
caster->CombatRange(h->entity_on_hatelist, 1.0, true, opts)) {
id_list.push_back(h->entity_on_hatelist->GetID());
}
if (count != -1 && id_list.size() > count) {
break;
}