Support for all remaining known spell target types.

Implemented target type (32) AE Target HateList
Implemented target type (36) Area Client Only
Implemented target type (37) Area PC Only
Implemented target type (39) Group No Pet
This commit is contained in:
KayenEQ
2014-11-13 05:19:01 -05:00
parent 738fa38047
commit 352d6fd83c
8 changed files with 78 additions and 15 deletions
+7 -4
View File
@@ -557,12 +557,15 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
return ret;
}
void HateList::SpellCast(Mob *caster, uint32 spell_id, float range)
void HateList::SpellCast(Mob *caster, uint32 spell_id, float range, Mob* ae_center)
{
if(!caster)
{
return;
}
Mob* center = caster;
if (ae_center)
center = ae_center;
//this is slower than just iterating through the list but avoids
//crashes when people kick the bucket in the middle of this call
@@ -578,7 +581,7 @@ void HateList::SpellCast(Mob *caster, uint32 spell_id, float range)
tHateEntry *h = (*iterator);
if(range > 0)
{
dist_targ = caster->DistNoRoot(*h->ent);
dist_targ = center->DistNoRoot(*h->ent);
if(dist_targ <= range && dist_targ >= min_range2)
{
id_list.push_back(h->ent->GetID());