mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +00:00
min_range field
This commit is contained in:
@@ -740,6 +740,7 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
|
||||
float dist = caster->GetAOERange(spell_id);
|
||||
float dist2 = dist * dist;
|
||||
float min_range2 = spells[spell_id].min_range * spells[spell_id].min_range;
|
||||
float dist_targ = 0;
|
||||
|
||||
bool bad = IsDetrimentalSpell(spell_id);
|
||||
@@ -760,6 +761,8 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
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
|
||||
continue;
|
||||
if (isnpc && curmob->IsNPC()) { //check npc->npc casting
|
||||
FACTION_VALUE f = curmob->GetReverseFactionCon(caster);
|
||||
if (bad) {
|
||||
|
||||
Reference in New Issue
Block a user