Core/Spelld: fix target selection for ground based aoe spells. use the center of the cast (dynamic object) instead of the caster for checking los

This commit is contained in:
Kandera
2012-05-15 13:26:15 -04:00
parent b72c690905
commit 648321e121
3 changed files with 5 additions and 5 deletions
@@ -943,7 +943,7 @@ namespace Trinity
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
return false;
if (i_funit->_IsValidAttackTarget(u, _spellInfo) && i_obj->IsWithinDistInMap(u, i_range))
if (i_funit->_IsValidAttackTarget(u, _spellInfo,i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : NULL) && i_obj->IsWithinDistInMap(u, i_range))
return true;
return false;