Core/Grids: Traps shouldn't target unattackable units.
Hunter traps and Basic Campfire will no longer activate unattackable creatures.
This commit is contained in:
@@ -808,6 +808,9 @@ namespace Trinity
|
|||||||
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
|
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(!u->isTargetableForAttack(false))
|
||||||
|
return false;
|
||||||
|
|
||||||
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
|
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user