mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
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())
|
||||
return false;
|
||||
|
||||
if(!u->isTargetableForAttack(false))
|
||||
return false;
|
||||
|
||||
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
|
||||
}
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user