mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
Fix AE Ramp iterator issue
This commit is contained in:
+1
-1
@@ -539,13 +539,13 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
|
||||
auto it = list.begin();
|
||||
while (it != list.end() && (count == -1 || hit_count < count)) {
|
||||
struct_HateList *h = (*it);
|
||||
++it; // advancing the iterator here prevents the iterator being invalidated if they die
|
||||
if (h && h->entity_on_hatelist && h->entity_on_hatelist != caster) {
|
||||
if (caster->CombatRange(h->entity_on_hatelist)) {
|
||||
++hit_count;
|
||||
caster->ProcessAttackRounds(h->entity_on_hatelist, opts);
|
||||
}
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
||||
return hit_count;
|
||||
|
||||
Reference in New Issue
Block a user