mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 03:58:27 +00:00
Manual merge of TargetRing pull request #286.
This commit is contained in:
+10
-2
@@ -765,7 +765,13 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
if (curmob == caster && !affect_caster) //watch for caster too
|
||||
continue;
|
||||
|
||||
dist_targ = center->DistNoRoot(*curmob);
|
||||
if (spells[spell_id].targettype == ST_Ring) {
|
||||
dist_targ = curmob->DistNoRoot(caster->GetTargetRingX(), caster->GetTargetRingY(), caster->GetTargetRingZ());
|
||||
}
|
||||
else if (center) {
|
||||
dist_targ = center->DistNoRoot(*curmob);
|
||||
}
|
||||
|
||||
if (dist_targ > dist2) //make sure they are in range
|
||||
continue;
|
||||
if (dist_targ < min_range2) //make sure they are in range
|
||||
@@ -787,7 +793,9 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
if (bad) {
|
||||
if (!caster->IsAttackAllowed(curmob, true))
|
||||
continue;
|
||||
if (!center->CheckLosFN(curmob))
|
||||
if (center && !center->CheckLosFN(curmob))
|
||||
continue;
|
||||
if (!center && !caster->CheckLosFN(caster->GetTargetRingX(), caster->GetTargetRingY(), caster->GetTargetRingZ(), curmob->GetSize()))
|
||||
continue;
|
||||
} else { // check to stop casting beneficial ae buffs (to wit: bard songs) on enemies...
|
||||
// This does not check faction for beneficial AE buffs..only agro and attackable.
|
||||
|
||||
Reference in New Issue
Block a user