mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 15:46:37 +00:00
min_range field
This commit is contained in:
+2
-1
@@ -567,6 +567,7 @@ void HateList::SpellCast(Mob *caster, uint32 spell_id, float range)
|
||||
//So keep a list of entity ids and look up after
|
||||
std::list<uint32> id_list;
|
||||
range = range * range;
|
||||
float min_range2 = spells[spell_id].min_range * spells[spell_id].min_range;
|
||||
float dist_targ = 0;
|
||||
auto iterator = list.begin();
|
||||
while (iterator != list.end())
|
||||
@@ -575,7 +576,7 @@ void HateList::SpellCast(Mob *caster, uint32 spell_id, float range)
|
||||
if(range > 0)
|
||||
{
|
||||
dist_targ = caster->DistNoRoot(*h->ent);
|
||||
if(dist_targ <= range)
|
||||
if(dist_targ <= range && dist_targ >= min_range2)
|
||||
{
|
||||
id_list.push_back(h->ent->GetID());
|
||||
h->ent->CalcSpellPowerDistanceMod(spell_id, dist_targ);
|
||||
|
||||
Reference in New Issue
Block a user