mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 15:31:33 +00:00
Fix infinite loops
This commit is contained in:
parent
aabf7b9b5a
commit
a6f5571750
@ -5653,12 +5653,16 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust)
|
|||||||
auto fac = (*iter)->GetReverseFactionCon(this);
|
auto fac = (*iter)->GetReverseFactionCon(this);
|
||||||
if (beneficial_targets) {
|
if (beneficial_targets) {
|
||||||
// only affect mobs we would assist.
|
// only affect mobs we would assist.
|
||||||
if (!(fac <= FACTION_AMIABLE))
|
if (!(fac <= FACTION_AMIABLE)) {
|
||||||
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// affect mobs that are on our hate list, or which have bad faction with us
|
// affect mobs that are on our hate list, or which have bad faction with us
|
||||||
if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS))
|
if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS)) {
|
||||||
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5721,12 +5725,16 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust)
|
|||||||
auto fac = (*iter)->GetReverseFactionCon(this);
|
auto fac = (*iter)->GetReverseFactionCon(this);
|
||||||
if (beneficial_targets) {
|
if (beneficial_targets) {
|
||||||
// only affect mobs we would assist.
|
// only affect mobs we would assist.
|
||||||
if (!(fac <= FACTION_AMIABLE))
|
if (!(fac <= FACTION_AMIABLE)) {
|
||||||
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// affect mobs that are on our hate list, or which have bad faction with us
|
// affect mobs that are on our hate list, or which have bad faction with us
|
||||||
if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS))
|
if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS)) {
|
||||||
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user